Asssembly Version Wrong
It was working for a little bit, but now it's displaying
v1.0.0-alpha+9fb67d6af368e6cd5a05c8f4013272d4a644ca89
instead of v1.0.0-alpha
after adding user secrets.
11 Replies
@SyncRооt Seems like we have an issue again
oh, i ran into this exact problem recently
the problem is .NET 8 added new MSBuild tasks that automatically sniff out version control information and force it into your informational version
you want to add
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
to your project properties
see above
i don't know why this was added without announcing it or telling you how to turn it off, i had to sniff around the binlog and dotnet source to figure it outTrying this!
Breaking change: Source Link included in the .NET SDK - .NET
Learn about a breaking change in the .NET 8 SDK where Source Link is included, and commit information is included in InformationalVersion.
i didn't see it in the .NET 8 release notes
Actually that's pretty badass
sure if you didn't already have your informational version set up the way you like it
i already had a short hash in mine and had to spend a couple hours figuring out why it suddenly became the full hash
I mean fair, I usually use gitversion and my scheme is a bit different
I wonder if you can specify the pattern to use
not that i saw, but i was mostly looking for how to turn it off
i set my informational version as the output of
git describe --long --tags --always --dirty
where my tags are always <major>.<minor>.<patch>
so i know the most recent tag, how many commits ahead a build is, and if it was built with a dirty working treefor context Source Link is automatically recognized by the VS debugger
so it downloads sources for the project when debugging when they're stored in the DLL
Is this just for public projects?