dotnet / sourcelink

Source Link enables a great source debugging experience for your users, by adding source control metadata to your built assets
MIT License
1.25k stars 122 forks source link

How to include git SHA hash in a WPF application that is not netcore #537

Open rollsch opened 4 years ago

rollsch commented 4 years ago

It is not clear whether this is even possible, or if it is possible how to achieve it.

We have a WPF application (not netcore) which is not going to be ported to netcore anytime in the near future as its a gigantic application and we have a huge number of dependencies which are not available for netcore.

Can we get the git SHA hash included in the assembly attributes using this package? If so how?

Thanks

tmat commented 4 years ago

You certainly can. You'll need to take some of the msbuild targets from the .NET Core SDK and copy them to your project/targets. See https://github.com/dotnet/sourcelink/issues/331#issuecomment-539643155 for pointers.