Skip to content

Stop NGen for SAC assemblies - #14882

Merged
rainersigwald merged 2 commits into
dotnet:mainfrom
pieandcakes:users/piel/ngenremove
Sep 17, 2026
Merged

rainersigwald merged 2 commits into
dotnet:mainfrom
pieandcakes:users/piel/ngenremove

Conversation

@pieandcakes

Copy link
Copy Markdown
Contributor

Since adding the support to use assemblies to the SAC, no longer need to mark them for ngen for VS

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 0b87e8f4-e62c-4e4d-8b59-37f031ca7565
Copilot AI lite review requested due to automatic review settings August 28, 2026 22:42
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Hello @pieandcakes, I noticed that you’re changing an .swr file or any file under src/Package/MSBuild.VSSetup.. Please make sure to validate this change by an experimental VS insertion. This is accomplished by pushing to an exp/* branch, which requires write permissions to this repo.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes Visual Studio NGen registration metadata for assemblies that are now expected to be provided via devenv’s shared assembly cache (SAC), reducing installer-time NGen work for MSBuild’s VS setup payload.

Changes:

  • Drops vs.file.ngenApplications / vs.file.ngenArchitecture / vs.file.ngenPriority metadata for a set of dependencies (x86 + amd64 sections).
  • Adds inline comments explaining why those assemblies are no longer NGen-marked (because VS/MSBuild will use the SAC copy).
Suppressed comments (1)

src/Package/MSBuild.VSSetup/files.swr:49

  • This same long comment is repeated before many consecutive file entries (x86 and amd64 sections). That repetition makes future edits noisy and increases merge-conflict risk; consider replacing the per-file comments with a single block comment before the group of SAC-sourced assemblies (or a shorter, standardized marker) rather than duplicating the full sentence each time.
  # This assembly is in the devenv SAC. MSBuild in Visual Studio uses that copy; remove this packaged copy in a future version after compatibility is confirmed.
  file source=$(X86BinPath)System.Buffers.dll
  file source=$(X86BinPath)System.Formats.Nrbf.dll vs.file.ngenApplications="[installDir]\MSBuild\Current\Bin\MSBuild.exe" vs.file.ngenArchitecture=all vs.file.ngenPriority=2
  # This assembly is in the devenv SAC. MSBuild in Visual Studio uses that copy; remove this packaged copy in a future version after compatibility is confirmed.
  file source=$(X86BinPath)System.IO.Pipelines.dll

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/Package/MSBuild.VSSetup/files.swr Resolved
@rainersigwald rainersigwald linked an issue Aug 31, 2026 that may be closed by this pull request
@AR-May AR-May self-assigned this Sep 7, 2026
We're avoiding ngen of our local copies of SAC assemblies, but since the
Coordinator exe wasn't pointed to the SAC copy that might have regressed
it.
@AR-May

AR-May commented Sep 10, 2026

Copy link
Copy Markdown
Member

We should wait for the new exp/ insertion to pass before merging.

@rainersigwald
rainersigwald merged commit fd83ea6 into dotnet:main Sep 17, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stop ngening SAC assemblies

4 participants