Closed FolkerKinzel closed 3 years ago
Can you provide a small example of how it was working and how it differs now? If so, I can look into it. I don't recall taking any specific steps to use different language XML files in the build in standard .NET Framework projects so it may have just been a side effect of how the projects are parsed or an accident of ordering such that the alternate language file was seen last and overrode the project copy.
Have a look at FolkerKinzel.VCards.Doku.de.shfbproj which documents a .NET Framework dll:
<DocumentationSources>
<DocumentationSource sourceFile="..\FolkerKinzel.VCards\bin\Release\net40\FolkerKinzel.VCards.dll" />
<DocumentationSource sourceFile="..\FolkerKinzel.VCards\bin\Release\net40\de\FolkerKinzel.VCards.xml" />
</DocumentationSources>
This documents "de\FolkerKinzel.VCards.xml".
Have another look at FolkerKinzel.Strings.Doku.de.shfbproj which documents a netstandard 2.0 dll:
<DocumentationSources>
<DocumentationSource sourceFile="..\FolkerKinzel.Strings\FolkerKinzel.Strings.csproj" />
</DocumentationSources>
Setting an additional documentation source "..\FolkerKinzel.Strings\bin\Release\netstandard2.0\de\FolkerKinzel.Strings.xml" has no effect: It documents always "..\FolkerKinzel.Strings\bin\Release\netstandard2.0\FolkerKinzel.Strings.xml".
(It's necessary to document the netstandard dll in this multitargeting project, because the .NET Famework variants doesn't contain all classes.)
I've updated handling of the comments files so that XML comments files added to the SHFB project are handled after any found in the project file documentation sources. This allows their content to override the copies that occur earlier in the list. The change will be in the next update due out soon.
Hi Eric,
I used successfully the workaround that you describe in Issue #747 "Support for netstandard 2.1?" to document my netstandard 2.1 library: build an additional netstandard 2.0 dll as first build target and set the csproj file as Documentation Sources.
Unfortunately when doing so (in the VS extension of SHFB) an additional XML documentation file set as documentation source is ignored: SHFB reads always the "standard" XML documentation file which is located next to the compiled dll.
To build documentation in different languages (English and German) I use to translate the XML file and pack the translated XML file in a folder named "de" to have also German IntelliSense on a computer set to this language.
Building a .NET Framework project reference in German I could easily give the dll and the XML file from the "de" folder as Documentation sources. With netstandard this this doesn't seem to work.
I have found a bit laborious workaround for myself, but it would be very nice if you could take the opportunity to use different xml documentation files as Documentation Sources into account.
Thanks a lot. Folker