vscode-dev-containers icon indicating copy to clipboard operation
vscode-dev-containers copied to clipboard

Nuget restore of .NET projects does not include XML docs due to NUGET_XMLDOC_MODE env var from .NET SDK container

Open jcotton42 opened this issue 3 years ago • 1 comments

  • VSCode Version: Version: 1.68.0-insider (c0769274fa136b45799edeccc0d0a2f645b75caf)
  • Local OS Version: Windows 11
  • Local chip architecture: amd64
  • Reproduces in: Remote - Containers
  • Name of Dev Container Definition with Issue: dotnet

Steps to Reproduce:

  1. Set up a devcontainer environment based on the dotnet dev container, the .NET 6 variant
  2. Perform a dotnet restore for any .NET project (it may need to reference a 3rd-party library), observe that IntelliSense docs aren't present for members. Also observe that in ~/.nuget/packages/<nuget package name>/<nuget package version>/lib/net6.0 there are no XML files
  3. Add ENV NUGET_XMLDOC_MODE=none somewhere in your local devcontainer Dockerfile, to override the setting from the .NET SDK image
  4. Rebuild the dev container
  5. IntelliSense docs now exist, and XML files are present in nuget package folders

I suspect this could be fixed by adding the above mentioned ENV NUGET_XMLDOC_MODE=none to https://github.com/microsoft/vscode-dev-containers/blob/main/containers/dotnet/.devcontainer/base.Dockerfile, but I'm not sure if that's truly the right file to put it, or where in that Dockerfile it should go.

jcotton42 avatar May 24 '22 02:05 jcotton42

Thanks for opening this issue.

Opening a PR as you describe above sounds reasonable, cc @joshspicer in case you have any other thoughts.

bamurtaugh avatar Jun 01 '22 17:06 bamurtaugh