Recently I upgraded to Visual Studio version 17.8, and now some of my unit tests are failing.
In the test project, I'm setting the assembly version with property <Version>1.0.0</Version>
, but in the compiled DLL, the version becomes 1.0.0+67a555...
; which seems to be a hash or a GUID.
This never happened with previous Visual Studio versions.
Because some tests rely on the version string being 1.0.0
, this behavior breaks them.
Is there any way to disable the compiler (?) from appending to the version string?
PS The test project in this example targets .NET Framework 4.8 and .NET 6.0 (<TargetFrameworks>net48;net6.0</TargetFrameworks>
); in both cases, the +67a555...
string is appended.
Set this property in the project file to get rid of this messed up behaviour:
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
Source
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With