You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
When using Source Link with
EmbedUntrackedSources
set totrue
, 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 theirBeforeTargets
attributes.The text was updated successfully, but these errors were encountered: