Make assemblyversion look like the publication version

how do I build: AssemblyVersion (". 1.0. *")] in assemblyInfo.cs for aboutbox to look like the publication version in the project property?

Currently it seems that I should type twice .. I referenced this link and I did not get the result as expected.

+4
source share
3 answers

The answer is how it appeared in 2011

You can modify the AssemblyInfo.cs file. This exists for every project. In recent versions of Visual Studio, it can be nested in the "properties" folder of visual studio within the project.

Go to your project, expand it, go to "Properties", expand it, open the file "AssemblyInfo.cs".

You will most likely see this ending:

// Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] 

So you can change the attributes.

Update (February 2011)

Also check:

0
source

Use ApplicationDeployment.CurrentDeployment.CurrentVersion to get the publication version

0
source

Just comment out the line:

 [assembly: AssemblyFileVersion("1.0.0.0")] 

in the AssemblyInfo.cs file. So, the last two lines of this file:

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

Restore the project, and the version of your assembly and the version of .dll will be identical.

0
source

Source: https://habr.com/ru/post/1341494/


All Articles