Skip to content

Commit 64ecc94

Browse files
authored
VS2022 and .NET Core Build Support (#874)
* Major overhaul to support both .NET Framework and .NET Core builds Significant breaking changes were made to support both .NET Framework (MSBuild.exe) and .NET Core (dotnet.exe) builds. - Updated all but the VSIX package and MPF projects to the new SDK project format. - Made updates throughout the code base to fix code analysis issues and to use current language syntax features. - Consolidated the SHFB and Sandcastle tools projects into a single solution file. The VSIX package still has its own solution file for now. - Consolidated the code into common namespaces and merged the SHFB build components into the main build components project. - Updated all tool projects to target .NET 4.7.2 and .NETCoreApp 3.1. The latter allows for builds using the dotnet.exe tool. The core libraries, build components, plug-ins, and presentation styles target .NETStandard 2.0 so that they are universal. - Restructured the tools folders to allow for the tool version and platform-specific code to be cleanly separated. - Separated Windows platform-specific code out into separate assemblies. The Sandcastle.Platform.Windows assembly contains the shared code. Reworked all build components and plug-ins to separate the configuration UIs into separate Windows platform-specific assemblies. This allows the components themselves to be used with both .NET Framework and .NET Core builds while allowing the IDEs to still configure them interactively. - All build tasks were moved from SandcastleBuilder.Utils to their own assembly (SandcastleBuilder.MSBuild). - The AddNamespaceGroups tool was removed. The code was merged into the build engine under a new build step (BuildStep.AddNamespaceGroups). - The standalone VersionBuilder tool was removed and the code from it was merged into the related plug-in were it runs directly now at build time. - The XslTransform tool and the related production XSL transformations were removed. The XSL transformation code was moved into the build engine in three new build steps. BuildStep.ApplyDocumentModel handles the ApplyVsDocModel.xsl code, BuildStep.AddApiTopicFilenames handles the AddFilenames.xsl code, and BuildStep.GenerateApiTopicManifest handles the ReflectionToManifest.xsl code. Along with BuildStep.AddNamespaceGroups, these new build steps replace BuildStep.TransformReflectionInfo which was removed. The code in CreateVSToc.xsl is handled by new code in the build engine that runs under the existing build step BuildStep.GenerateIntermediateTableOfContents. These changes should allow for better extensibility of the related build steps in the future. - Updated all presentation styles to use the code-based interfaces for applying the document model to the reflection information file and generating the intermediate table of contents. These replace the old properties that specified the related XSL transformations to use. Custom presentation styles are free to use the default implementations or supply their own. It is also now possible for plug-ins to replace them at runtime as long as the replacements meet the requirements of the presentation style. - Removed the GenerateHelpFormatTableOfContents and GenerateHelpFileIndex build steps as they effectively did nothing anymore. - Removed the BuildAssembler build components DisplayComponent, InheritDocumentationComponent, PlatformsComponent, SnippetComponent, TaskGrabberComponent, and ValidateComponent as they were never used. - The AjaxDoc plug-in has been deprecated. AjaxDoc itself has been deprecated in favor of JSDoc. The plug-in is also dependent on Windows platform-specific features and cannot be used with .NET Core builds. - All build component and plug-in configuration forms were updated to use WPF for better high DPI scaling support on 4K displays (#344). The standalone GUI hosts all of the WPF controls and UI forms but is a Windows Forms application at its core. That probably won't change anytime soon. New folder structure under SHFBROOT: - The root folder only contains the Sandcastle Help File Builder MSBuild targets file. - Components - Contains build components, plug-ins, and presentation style related files. - Data - Contains the framework reflection information files. - Extras - Contains optional tools that are not part of Sandcastle or SHFB such as the HTML to MAML converter and the web project code providers. - Help - Contains the Help 1 (CHM) help files. - net472 - Contains the .NET Framework build tools for MSBuild.exe. - netcoreapp3.1 - Contains the .NET Core build tools for dotnet.exe. - Schemas - Contains the XML schemas for the reflection data file and the MAML topic files. - Snippets - Contains Visual Studio snippet files used to insert common block and inline MAML elements. - Templates - Contains template project files used by the build tools. - Tools - Contains the Windows platform specific tools (reflection data manager, standalone GUI, SHFB project launcher, and help library manager launcher). Current Known Issues and Limitations - The Visual Studio project templates for components, plug-ins, and presentation styles need updating to match the new format that separates the platform-specific UI configuration code into its own assembly. For now, they will not work at all if you create new projects from them. You will need to manually fix them to separate the UI code and use the new structure. Any existing build components, plug-ins, and presentation styles will also need updating to work with the new system. Information on porting them will be provided at a later date. - The XSL transform in the Completion Notification plug-in currently fails on .NET Core probably because script code is not supported. - Data caches built using the .NET Framework ESent and SQL cached data components cannot be used by the .NET Core versions of the same components and vice versa due to differences in the serialized framework types. May need to introduce separate caches based on the build type. - The ESent cached data components are not currently working under .NET Core due to some non-serializable types. - The SQL cached data components are not currently working under .NET Core due to System.Data.SqlClient not being supported. It probably needs to be switched to Microsoft.Data.SqlClient. - The help file is now out of date with regard to all of the above changes. It will be updated at a later date to reflect the new functionality. * Template project updates and NuGet support - Updated all template projects so that they work with the updated build engine. - Updated all template projects so that they use the new SDK format and generate their output as NuGet packages. This makes them easier to find and use and no longer requires a common component path setting be used in the help file builder projects to locate them. - Updated the standalone GUI and Visual Studio package to support adding package references to help file builder projects for build components, plug-ins, presentation styles, and syntax generators interactively with a search dialog box . The component packages are shown in a separate node in the project/solution explorer tool window. - Updated the build engine to search for build components, plug-ins, presentation styles, and syntax generators added to the project as NuGet packages by looking for their SHFBComponentPath items. * Minor update Minor update to package code to use more up to date APIs for main window handle and solution events. * Minor updates to prepare for VS2022 support * Changes to prepare for VS2022 support * VS2022 support MPF project refactoring - Moved the common MPF project code into a shared project. - Added MPFProj_VS2022. * VS2022 support VSIX project refactory - Moved the common VSIX project code into a shared project. - Added the SandcastleBuilderPackage_VS2022 project. * Installer updates - Updated the VSIX package to install the MAML schemas. - Updated the guided installer to support the VS2022 package and VSIX MAML schemas. - Added the HTML Help Workshop installer to the project for use by the guided installer as the official download seems to be permanently broken. * Updates and fixes for test deployment * Doc updates and minor fixes for issues found during testing * Template project fixes - Reworked how the project and project item template files are included in the package projects so that the VS2022 project can used linked items. - Added a hack so that the root container added to the Add New Item dialog in VS2019 and VS2022 shows "Documentation" rather than "Token File". - VS2022 is doing something odd with selected item icons. As such, I modified the folder icons shown in the Solution Explorer so that they look a little better in VS2022 when selected in the Dark and Light themes. - Fixed some spelling errors in the MAML schemas. * Documentation updates * Minor fixes and new visibility option and transform option - Added a new visibility option to exclude internal members in other assemblies and private members of base types. - Fixed F# parameter with a single quote causing BuildAssembler to crash. - Fixed sitemap API content placement not working. - Added a new logoUrl transform argument property to the VS2010 and VS2013 presentation styles. This allows you to specify a URL to navigate to when the logo is clicked. * Documentation updates * Documentation updates
1 parent 84082c3 commit 64ecc94

File tree

1,537 files changed

+213493
-215017
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,537 files changed

+213493
-215017
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ StyleCop.Cache
1010
_ReSharper*/
1111
*.[Rr]e[Ss]harper
1212
*.DotSettings.user
13+
launchSettings.json
1314

1415
# Build results
1516
[Dd]ebug/
@@ -18,6 +19,7 @@ _ReSharper*/
1819
[Rr]eleases/
1920
x64/
2021
x86/
22+
build/
2123
bld/
2224
[Bb]in/
2325
[Oo]bj/
@@ -65,6 +67,7 @@ UpgradeLog*.XML
6567
UpgradeLog*.htm
6668

6769
# Non-distributable and private local stuff
70+
Deployment/
6871
NonDist/
6972
/SHFB/Source/Setup/Temp/
7073

Deployment/InstallerConfiguration.xml

+15-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<configuration>
3-
<!-- This indicates the version of Sandcastle with which this installer is associated.-->
4-
<sandcastle version="v2021.4.9.0" />
3+
<!-- This indicates the tools version with which this installer is associated.-->
4+
<tools version="2021.10.23.0" />
55

66
<!-- Define the installer pages. Third-party build tool and component providers can add new pages that
77
they have created to install their own products as well. -->
@@ -13,24 +13,29 @@
1313
<page type="Sandcastle.Installer.InstallerPages.WelcomePage" />
1414

1515
<page type="Sandcastle.Installer.InstallerPages.WhatsNewPage">
16-
<whatsNew url="https://EWSoftware.github.io/SHFB/html/52c2409d-0a0a-4b6e-bd0a-5d2b03d1d332.htm"
17-
description="Sandcastle Help File Builder and Tools v2021.4.9.0 Release Notes" />
16+
<whatsNew url="https://EWSoftware.github.io/SHFB/html/003c85ec-45ad-4123-a31d-fd63a695b1f3.htm"
17+
description="Current Version Release Notes" />
18+
<whatsNew url="https://EWSoftware.github.io/SHFB/html/bc933f8f-e792-45bf-afec-62aa2c46aa3b.htm"
19+
description="Third-Party Component Migration Support" />
1820
</page>
1921

2022
<page type="Sandcastle.Installer.InstallerPages.HelpFileFormatsPage">
2123
<page type="Sandcastle.Installer.InstallerPages.Help1CompilerPage" />
2224
</page>
2325

2426
<page type="Sandcastle.Installer.InstallerPages.SandcastleHelpFileBuilderPage"
25-
shfbVersion="2021.4.9.0" installerName="SandcastleHelpFileBuilder.msi"/>
27+
installerName="SandcastleHelpFileBuilder.msi"/>
2628

27-
<page type="Sandcastle.Installer.InstallerPages.SHFBVisualStudioPackagePage"
28-
packageGuid="c997d569-ee8e-4947-a46f-9a0717ce39a0">
29-
<package name="SHFBVisualStudioPackage_VS2017AndLater.vsix" supportedVersions="15,16" />
29+
<page type="Sandcastle.Installer.InstallerPages.SHFBVisualStudioPackagePage">
30+
<package name="SHFBVisualStudioPackage_VS2017AndLater.vsix"
31+
id="c997d569-ee8e-4947-a46f-9a0717ce39a0" supportedVersions="15,16" />
32+
<package name="SHFBVisualStudioPackage_VS2022AndLater.vsix"
33+
id="SHFB.A8C96335-DAF7-4D30-89E2-B004400E4525" supportedVersions="17" />
34+
35+
<page type="Sandcastle.Installer.InstallerPages.MamlIntelliSensePage" supportedVersions="15,16,17" />
36+
<page type="Sandcastle.Installer.InstallerPages.MamlSnippetsPage" supportedVersions="15,16,17" />
3037
</page>
3138

32-
<page type="Sandcastle.Installer.InstallerPages.MamlIntelliSensePage" supportedVersions="15,16" />
33-
<page type="Sandcastle.Installer.InstallerPages.MamlSnippetsPage" supportedVersions="15,16" />
3439
<page type="Sandcastle.Installer.InstallerPages.VisualStudioSpellCheckerPage" />
3540
<page type="Sandcastle.Installer.InstallerPages.ExtendedDocCommentsProviderPage" />
3641
<page type="Sandcastle.Installer.InstallerPages.CompletionPage" />

Documentation/AllDocumentation.sln

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.28010.2003
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.31424.327
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{21CF8CF5-DA35-41C6-B04F-B307C0CA80B1}"
77
ProjectSection(SolutionItems) = preProject
@@ -24,8 +24,6 @@ Project("{7CF6DF6D-3B04-46F8-A40B-537D21BCA0B4}") = "EWSoftwareCodeDom", "..\SHF
2424
EndProject
2525
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XMLCommentsExamples", "..\SHFB\Source\XMLCommentsExamples\XMLCommentsExamples.csproj", "{46157C34-C925-4733-8682-957F3D97345A}"
2626
EndProject
27-
Project("{7CF6DF6D-3B04-46F8-A40B-537D21BCA0B4}") = "ReferenceLinks", "SandcastleBuilder\ReferenceLinks.shfbproj", "{F3891797-F0B5-4B49-95F0-03F0D292A399}"
28-
EndProject
2927
Global
3028
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3129
Debug|Any CPU = Debug|Any CPU
@@ -56,8 +54,6 @@ Global
5654
{46157C34-C925-4733-8682-957F3D97345A}.Debug|Any CPU.Build.0 = Debug|Any CPU
5755
{46157C34-C925-4733-8682-957F3D97345A}.Release|Any CPU.ActiveCfg = Release|Any CPU
5856
{46157C34-C925-4733-8682-957F3D97345A}.Release|Any CPU.Build.0 = Release|Any CPU
59-
{F3891797-F0B5-4B49-95F0-03F0D292A399}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
60-
{F3891797-F0B5-4B49-95F0-03F0D292A399}.Release|Any CPU.ActiveCfg = Release|Any CPU
6157
EndGlobalSection
6258
GlobalSection(SolutionProperties) = preSolution
6359
HideSolutionNode = FALSE

Documentation/AllDocumentation.sln.vsspell

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<Ignore>ctor</Ignore>
1616
<Ignore>ddue</Ignore>
1717
<Ignore>de</Ignore>
18+
<Ignore>dotnet</Ignore>
1819
<Ignore>endregion</Ignore>
1920
<Ignore>filterpriority</Ignore>
2021
<Ignore>inheritdoc</Ignore>
@@ -32,4 +33,5 @@
3233
<InheritExclusionExpressions>True</InheritExclusionExpressions>
3334
<InheritIgnoredFilePatterns>True</InheritIgnoredFilePatterns>
3435
<InheritXmlSettings>True</InheritXmlSettings>
36+
<IgnoredWordsFile></IgnoredWordsFile>
3537
</SpellCheckerConfiguration>
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<content xml:space="preserve" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
33
<item id="BuildDate">{@BuildDate:MMMM d, yyyy}</item>
4-
<item id="SandcastleVersion">v2021.4.9.0</item>
54
<item id="SHFB"><ddue:externalLink xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5">
65
<ddue:linkText>Sandcastle Help File Builder</ddue:linkText>
76
<ddue:linkUri>https://GitHub.com/EWSoftware/SHFB</ddue:linkUri>
87
<ddue:linkTarget>_blank</ddue:linkTarget>
98
</ddue:externalLink></item>
9+
<item id="SandcastleVersion">v2021.10.23.0</item>
1010
<item id="VisualStudioMinVersion">Visual Studio 2017</item>
1111
</content>

Documentation/SandcastleBuilder/Content/BenefitsAndFeatures.aml

+9-40
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ feature is available as well with support for ASP.NET, PHP, and client-side scri
5454

5555
<listItem>
5656
<para>The project settings are saved in a standard MSBuild-format project file and can be built from
57-
within the standalone GUI, from the command line using <application>MSBuild</application>, or in a post-build
58-
step for a Visual Studio project that runs <application>MSBuild</application>. Support for full Visual Studio
59-
integration is also available with the above mentioned extension package.</para>
57+
within the standalone GUI, from the command line using <application>MSBuild</application> or <application>dotnet
58+
build</application>, or in a post-build step for a Visual Studio project that runs <application>MSBuild</application>.
59+
Support for full Visual Studio integration is also available with the above mentioned extension package.</para>
6060
</listItem>
6161

6262
<listItem>
@@ -142,9 +142,7 @@ file builder resource files in several languages and information is provided on
142142

143143
<listItem>
144144
<para>Support is included for the <codeInline>&lt;inheritdoc /&gt;</codeInline> tag which allows you
145-
to inherit documentation from base types/members. This is implemented via a standalone tool so it can also be
146-
used by other third-party tools and build scripts. This tool provides features beyond those found in the build
147-
component supplied with Sandcastle.</para>
145+
to inherit documentation from base types/members.</para>
148146
</listItem>
149147
</list>
150148

@@ -170,16 +168,6 @@ additional content items in a project (no API content).</para>
170168
libraries or online content that does not appear in your help file.</para>
171169
</listItem>
172170

173-
<listItem>
174-
<para>AjaxDoc Builder - Build help files for Atlas script libraries in conjunction with
175-
<externalLink>
176-
<linkText>AjaxDoc</linkText>
177-
<linkUri>http://AjaxDoc.codeplex.com</linkUri>
178-
<linkTarget>_blank</linkTarget>
179-
</externalLink>.
180-
</para>
181-
</listItem>
182-
183171
<listItem>
184172
<para>Completion Notification - E-mail the build results to someone, optionally attaching the log
185173
file (raw or transformed via XSL).</para>
@@ -191,26 +179,11 @@ locale to overcome its encoding issues when using non-English languages that use
191179
(DBCS).</para>
192180
</listItem>
193181

194-
<listItem>
195-
<para>Hierarchical Table of Contents - Used to rearrange the table of contents such that
196-
namespaces are nested within their parent namespaces.
197-
</para>
198-
</listItem>
199-
200182
<listItem>
201183
<para>Output Deployment - Copy the resulting help file to a file share, web server, FTP site,
202184
etc.</para>
203185
</listItem>
204186

205-
<listItem>
206-
<para>Script# Reflection File Fixer - Fixes up the reflection information file so that
207-
<externalLink>
208-
<linkText>Script#</linkText>
209-
<linkUri>http://scriptsharp.com/</linkUri>
210-
<linkTarget>_blank</linkTarget>
211-
</externalLink> assemblies are documented correctly.</para>
212-
</listItem>
213-
214187
<listItem>
215188
<para>Table of Contents Exclusion - Used to exclude API members from the table of contents (the
216189
members still appear in the help file).</para>
@@ -261,17 +234,13 @@ details when only documenting the public API.</para>
261234
insert common elements or sections of documentation.</para>
262235
</listItem>
263236

264-
<listItem>
265-
<para>A set of cached build data components that cache key information such as comment, reflection
266-
index information, and member ID URLs across builds in order to speed them up.</para>
267-
</listItem>
268237
</list>
269238

270-
<para>The custom build components can also be used outside of the help file builder in other custom build
271-
scripts and third-party tools as well. All build components are Managed Extensibility Framework (MEF) components
272-
and can be selected for inclusion in your projects. There is also support for defining additional language
273-
syntax generators used to generate the syntax sections in the API reference topics. See the
274-
<link xlink:href="8dcbb69b-7a1a-4049-8e6b-2bf344efbbc9" /> topic for more information.</para>
239+
<para>All build components are Managed Extensibility Framework (MEF) components and can be selected for
240+
inclusion in your projects. You can also create your own components using the
241+
<link xlink:href="e6d18448-2459-46f1-bbdc-a7db415f2bda">documenation</link> in this help file. There is also
242+
support for defining additional <link xlink:href="5e80d139-811c-48ed-9b52-dcd8a3f5aef3">language syntax generators</link>
243+
used to generate the syntax sections in the API reference topics.</para>
275244
</content>
276245
</section>
277246

Documentation/SandcastleBuilder/Content/CompConfig/CompConfig.aml

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ projects that run out of memory during the build.</para>
6161
</section>
6262

6363
<relatedTopics>
64+
<link xlink:href="c8258d52-6664-4e96-86cd-6f75a854a69c" />
6465
<link xlink:href="e6d18448-2459-46f1-bbdc-a7db415f2bda" />
6566
<link xlink:href="5e80d139-811c-48ed-9b52-dcd8a3f5aef3" />
6667
<link xlink:href="e32086c6-de17-4e54-a746-1ac80bf0c45a" />

0 commit comments

Comments
 (0)