Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

make the assemblyversion similar to publish version

how do i make the [assembly: AssemblyVersion("1.0.*")] in the assemblyInfo.cs for aboutbox to be similar with the publish version at the project property?

currently it seem that i have to enter twice.. i refered to this link example, and i don get the result as expected..

like image 258
VeecoTech Avatar asked Nov 06 '22 02:11

VeecoTech


2 Answers

Use ApplicationDeployment.CurrentDeployment.CurrentVersion to get the Publish version

like image 65
dbu Avatar answered Nov 09 '22 12:11

dbu


Just comment out the line:

[assembly: AssemblyFileVersion("1.0.0.0")]

in AssemblyInfo.cs file. So, two last lines of that file will be:

[assembly: AssemblyVersion("1.0.*")]
//[assembly: AssemblyFileVersion("1.0.0.0")]

Rebuild the project and your Assembly version and the .dll file version will be identical.

like image 34
myroslav Avatar answered Nov 09 '22 13:11

myroslav