0

When I publish a .NET application, it will (if enabled) auto-increment the version number, in the assembly. Is there any way to mimic this behavior, in an ASP.NET site?

We have a test enviroment that we publish to, and a live enviroment, and it would be really helpful, if I could add a label somewhere, showing the version.

Nicolai
  • 2,835
  • 7
  • 42
  • 52
  • ASP.NET itself doesn't auto-increment any build numbers or anything. ASP.NET doesn't build any source code and apply build numbers - that would be **Visual Studio** (ASP.NET is a **runtime environment** for web applications...) – marc_s Nov 30 '11 at 08:23
  • 2
    I don't really see how this is a duplicate. The other article has to do with, from what I can tell, a winform application, where I have no problem doing this. – Nicolai Nov 30 '11 at 09:10

2 Answers2

1

Try this Visual Studio add-in:

http://autobuildversion.codeplex.com/

Stefan Steiger
  • 78,642
  • 66
  • 377
  • 442
0

I haven't worked on Asp.Net in a long time but I think if you have "Web Application" instead of "Web Site" that should do what you are looking for.

Nitin Rastogi
  • 1,446
  • 16
  • 30
  • The web app does seem to have an assembly version, but how can I get the publish function, in Visual Studio, to auto-increment it? – Nicolai Nov 30 '11 at 09:17
  • 2
    Visual Studio does it for you automatically. You just need to setup your AssemblyInfo.cs appropriately. i.e. Something like this for example - [assembly: AssemblyVersion("1.0.0.*")] [assembly: AssemblyFileVersion("1.0.0.0")] *******Remove the AssemblyFileVersion entry – Nitin Rastogi Nov 30 '11 at 10:14