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

Skip NuGet package XML doc extraction by default #212

Merged
merged 2 commits into from
Mar 5, 2025

Conversation

runesoerensen
Copy link
Contributor

This PR changes the NuGet package restore behavior to skip extracting XML documentation files by default. These files are typically not needed for non-interactive/CI build scenarios, but can add substantially to the NuGet cache layer size.

As an example, publishing the .NET Getting Started app (on an M1 Mac) adds ~813MB to the NuGet cache when XML docs are extracted (default), compared to ~570MB when skipped.

The environment variable is set as a default, respecting build-time environment configuration. Users may set NUGET_XMLDOC_MODE to none, compress, or skip as documented here.

This default should be documented in this Dev Center article when released.

@runesoerensen runesoerensen added the enhancement New feature or request label Mar 5, 2025
@runesoerensen runesoerensen marked this pull request as ready for review March 5, 2025 09:49
@runesoerensen runesoerensen requested a review from a team as a code owner March 5, 2025 09:49
@runesoerensen runesoerensen merged commit 4791052 into main Mar 5, 2025
6 checks passed
@runesoerensen runesoerensen deleted the skip-nuget-xml-doc-extraction branch March 5, 2025 09:56
heroku-linguist bot added a commit that referenced this pull request Mar 10, 2025
## heroku/dotnet

### Changed

- The .NET SDK inventory was updated with new download URLs for version 9.0 release artifacts. ([#203](#203))
- The buildpack will now skip NuGet package XML doc extraction when running `dotnet publish`. ([#212](#212))
- The build configuration is no longer written to the log before the `dotnet publish` command (which still includes the build configuration value when specified). ([#213](#213))
@heroku-linguist heroku-linguist bot mentioned this pull request Mar 10, 2025
heroku-linguist bot added a commit that referenced this pull request Mar 10, 2025
## heroku/dotnet

### Changed

- The .NET SDK inventory was updated with new download URLs for version 9.0 release artifacts. ([#203](#203))
- The buildpack will now skip NuGet package XML doc extraction when running `dotnet publish`. ([#212](#212))
- The build configuration is no longer written to the log before the `dotnet publish` command (which still includes the build configuration value when specified). ([#213](#213))

Co-authored-by: heroku-linguist[bot] <136119646+heroku-linguist[bot]@users.noreply.github.com>
heroku-linguist bot added a commit to heroku/cnb-builder-images that referenced this pull request Mar 10, 2025
## heroku/dotnet

### Changed

- The .NET SDK inventory was updated with new download URLs for version 9.0 release artifacts. ([#203](heroku/buildpacks-dotnet#203))
- The buildpack will now skip NuGet package XML doc extraction when running `dotnet publish`. ([#212](heroku/buildpacks-dotnet#212))
- The build configuration is no longer written to the log before the `dotnet publish` command (which still includes the build configuration value when specified). ([#213](heroku/buildpacks-dotnet#213))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants