-
Notifications
You must be signed in to change notification settings - Fork 657
Description
When using Source Link with EmbedUntrackedSources
set to true
, any generated source files that aren't committed to the repo are supposed to be embedded in the PDB instead.
However, GitVersionInformation.g.cs is not being embedded despite being a generated file.
This is happening because the target that creates it is running too late for Source Link to know that it needs to embed it.
FYI this was also a problem for the AssemblyInfo.cs
generated by the .NET Core SDK, and was fixed for that file in the 3.1.300 SDK.
Expected Behavior
Source files generated by GitVersion should be embedded in the PDB when using Source Link.
Actual Behavior
The files are not embedded in the PDB.
Fix
The UpdateAssemblyInfo and GenerateGitVersionInformation targets should have BeforeCompile
added to their BeforeTargets
attributes.