-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3rd party library docs not resolved when running in Docker #15
Comments
Running with
but in the Docker build:
... even though it looks like they're looking at the same set of files (131 in each), and both including |
Running Ubuntu 20.04 via WSL, with only .NET 8.0 and .NET 6.0 SDKs installed, I don't see a problem. I don't understand what's different under Docker... |
It's looking for the doc file there, but the file isn't actually in the image, which is a silent error (perhaps I should be logging those in verbose mode). Looks like the .NET SDK container images have the NuGet client set to not extract the XML files, as described in https://learn.microsoft.com/en-us/nuget/reference/cli-reference/cli-ref-environment-variables I was able to get your sample to process correctly by adding the following to the dockerfile
Edit: Found the source of that setting. Rationale is given in dotnet/dotnet-docker#2790 |
Will give that a try tomorrow - thank you so much for the quick response! |
Happy to help! I reckon this surprising behavior warrants a readme note. |
And I see you've already done so :) Will close this issue - again, thanks so much. |
Fixes nodatime/nodatime.serialization#117 See saucecontrol/InheritDoc#15 for rationale
Fixes nodatime/nodatime.serialization#117 See saucecontrol/InheritDoc#15 for rationale
Context: NodaTime and NodaTime.Serialization libraries
.NET SDK: 8.0
I've managed to get the main NodaTime build to work with InheritDoc across all its target frameworks (netstandard2.0, net6.0, net8.0) but I'm struggling with NodaTime.Serialization libraries, e.g. NodaTime.Serialization.SystemTextJson which targets netstandard2.0 and netcoreapp3.1.
(I'm aware that netcoreapp3.1 is out of support; updating that target is a separate matter...)
I've reproduced the issue with the code below (inline and in a zip file). It's just a class library targeting netstandard2.0, with an abstract class derived from
System.Text.Json.Serialization.JsonConverter<>
. On my Windows box this builds correctly:When I run
docker build --progress=plain .
I get the following warning (I've wrapped it for readability):Using a target framework of net8.0, the build works fine in both Windows and Docker. For the main NodaTime build, it made sense that I needed to add extra SDKs in order to get appropriate XML files for the BCL - but in this case the only thing we're inheriting is the System.Text.Json library, which presumably comes with its own XML files. (If it would help to rewrite this example using Newtonsoft.Json, I could do that - it has the same issue.)
Files:
LibraryClass.cs:
InheritDocDemo.csproj:
Dockerfile:
InheritDocDemo.zip
The text was updated successfully, but these errors were encountered: