Repository navigation
Release builds map the repository folder to a neutral prefix, so a package does not embed the build machine's folders - #134
Merged
Conversation
…ckage does not embed the build machine's folders In a Release build the SDK now maps the repository root (DeterministicSourcePaths) in every path it embeds: the source files, the debug-symbol path inside each dll, and the Source Link mapping inside the symbols. A package built on a developer machine no longer carries that machine's folder names. Debug builds are unchanged, so local debugging still finds the sources. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release builds map the repository folder to a neutral prefix, so a package does not embed the build machine's folders.
The problem
What changes
Source/Directory.Build.props: in a Release build,DeterministicSourcePathsistrue. The SDK then maps the repository root to a neutral prefix in every path it embeds: the source files, the symbol path inside each dll, and the Source Link mapping. Debug builds are unchanged, so local debugging still finds the sources.Checked on the package
dotnet packof Core in Release: the four dlls in the.nupkgand the four.pdbfiles in the.snupkgcontain neither the build folder nor its drive path. The same pack without this setting embedded the build folder in the dlls and in the Source Link mapping. The other source projects share this props file.dotnet build, thendotnet pack --no-build); a pack that has to build from scratch fails in this repository with NU5026, with or without this change.Checks
MappedQuerySelectTests.TheAsyncProjection_AllocatesNothingPerRow(a test from Select on IMappedQuery<T> composes a projection without running the query (query factories) #124): it fails on net11.0 in Release only, in this run and in an earlier one, and passes everywhere else; it is being investigated and does not involve this change. Samples: 117 of 117 pass. Style and analyzers: 0 findings. DocFX: 0 warnings. Visual Studio 2026's MSBuild on the whole solution (Debug): 0 errors.🤖 Generated with Claude Code