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

[Bug] Generated source files can't be embedded by Source Link #2297

Closed
bording opened this issue May 29, 2020 · 1 comment · Fixed by #2298
Closed

[Bug] Generated source files can't be embedded by Source Link #2297

bording opened this issue May 29, 2020 · 1 comment · Fixed by #2298
Labels
Milestone

Comments

@bording
Copy link
Contributor

bording commented May 29, 2020

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.

@github-actions
Copy link

🎉 This issue has been resolved in version 5.3.5 🎉
The release is available on:

Your GitReleaseManager bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants