Skip to content
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

NUGET_XMLDOC_MODE=skip has consequences and is not recommended by TeamCity documentation. #42

Open
tg73 opened this issue Sep 14, 2018 · 2 comments
Labels

Comments

@tg73
Copy link

tg73 commented Sep 14, 2018

The Dockerfile sets NUGET_XMLDOC_MODE=skip. I can see that this would help performance. However, I can find no general TeamCity documentation that advises making this change on build agents. Therefore it would seem likely that this is not set on most users' non-Docker-based agents. And so it seems odd that it would be set on the Docker image, which, arguably, should represent the typical agent configuration that a user would have created by hand following the best practices advocated by the relevant TeamCity documentation.

In our case, we have a custom code generation tool (consumed as a NuGet package) that, among other things, mirrors documentation from base classes into overridden methods in the generated classes - and the XML documentation files are needed for this. So this setting breaks our builds.

@dtretyakov
Copy link
Contributor

@tg73, the NUGET_XMLDOC_MODE=skip setting comes from the original docker images provided by Microsoft, e.g: https://github.com/dotnet/dotnet-docker/blob/master/2.1/sdk/nanoserver-1803/amd64/Dockerfile

If you need different setting you could easily create derived image from jetbrains/teamcity-agent or define required env.NUGET_XMLDOC_MODE environment parameter in your build configuration.

@tg73
Copy link
Author

tg73 commented Sep 14, 2018

@dtretyakov, I'm slightly confused: for example, https://github.com/JetBrains/teamcity-docker-agent/blob/master/windowsservercore/Dockerfile appears to be based on microsoft/dotnet-framework:4.7.2-sdk-windowsservercore-$TAG, which comes from https://github.com/Microsoft/dotnet-framework-docker/blob/master/4.7.2-windowsservercore-1803/sdk/Dockerfile, which is based on microsoft/dotnet-framework:4.7.2-runtime-windowsservercore-1803 which comes from https://github.com/Microsoft/dotnet-framework-docker/blob/master/4.7.2-windowsservercore-1803/runtime/Dockerfile, which is based on microsoft/windowsservercore:1803. None of those Dockerfiles introduce NUGET_XMLDOC_MODE=skip. None of those are based on microsoft/dotnet (which comes from the url you mentioned https://github.com/dotnet/dotnet-docker/blob/master/2.1/sdk/nanoserver-1803/amd64/Dockerfile), and the actual ENV directive appears to be introduced for the first time in https://github.com/JetBrains/teamcity-docker-agent/blob/master/windowsservercore/Dockerfile.

It's still not clear to me why having this setting in a general-purpose TC agent image is a good idea, notably when compared to the general TC documentation. For my own purposes, I've had to create my own Dockerfile "flattened" all the way down including the content microsoft/dotnet-framework:4.7.2-sdk Dockerfile because our builds need additional workloads from the buildtools installer, and despite my best efforts I could not successfully get the buildtools installer to add further components to the existing installation - so instead we add what we need from the very beginning. So I can of course use my desired setting. I'm raising the issue because it might be a subtle pitfall for other users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants