views:

48

answers:

3

..like you can on other project types?

+1  A: 

You can set the AssemblyVersion and AssemblyFileVersion within

/YourWebApplication/Properties/AssemblyInfo.cs
Robin Day
I am using VS2010. I have no AssemblyInfo file. How do I create one?
Velika
+1  A: 

Depends if its a compiled web application you can set it on the assembly. As you are saying like others I assume you are using VS 2005.

Microsoft changed their approach in VS 2005 to use a Web Site project instead of a Web Application Project. Have a look at this article for further details http://webproject.scottgu.com/

I would recommend converting your solution and then setting it via the AssemblyInfo.cs file. http://webproject.scottgu.com/

Might be worthwhile checking this out. http://stackoverflow.com/questions/1446153/versioning-an-asp-net-web-app

Jonathan
I am using VS2010. I have no AssemblyInfo file. How do I create one?
Velika
I understand your problem. I would recommend converting your solution to a Web Application Project and setting via the AssemblyInfo.cs file. http://webproject.scottgu.com/ Its not as daunting as it may sound. Should take you a couple of minutes.
Jonathan
Hmm. I didn't know that there were multiple web site projects in VS2010. I was thinking that article didn't apply. OK, if it does, I'll check it out.
Velika
A: 

use:

using System.Reflection;
Assembly.GetExecutingAssembly().GetName().Version;

and set your assemblyinfo.cs as

[assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyFileVersion("1.0.*")]
garpunkal
I am using VS2010. I have no AssemblyInfo file. How do I create one?
Velika