Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to set Assembly version to the web application?

Tags:

c#

asp.net

i have developed the application in ASP.NET with C#. i want to set the Assembly version to this project but in property page this option can not be displayed .how to set Assembly version to the web application ?

like image 484
user847455 Avatar asked Apr 01 '12 12:04

user847455


2 Answers

There's a Properties/AssemblyInfo.cs file in which you could set the assembly version:

// 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 Revision and Build Numbers 
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

Although normally you should be able to do that in the properties of the project in Visual Studio.

If you have created an ASP.NET Site (and not ASP.NET Application) you cannot set the assembly version as there's no assembly. ASP.NET sites are not precompiled. The ASP.NET will dynamically emit assemblies at runtime.

like image 94
Darin Dimitrov Avatar answered Sep 28 '22 08:09

Darin Dimitrov


View the Property Pages by either:

  1. Right clicking on the Web project and then choosing Properties in the context menu, or,
  2. Double clicking the Properties node under the project

enter image description here

In the Application Tab, find the button that says "Assembly Information..." there you'll get a dialog to edit the assembly version.

enter image description here

like image 35
Mzn Avatar answered Sep 28 '22 09:09

Mzn