Where to specify version number in ASP.NET Web Site

codeulike picture codeulike · Oct 5, 2009 · Viewed 10.1k times · Source

So I have an ASP.NET 'Web Site' (as opposed to a Web Application) which has no AssemblyInfo.cs file or Bin folder or anything like that.

I want to have a way to specify an Assembly version number (e.g. 7.0.2.0). In a Web Application you would do this in an AssemblyInfo.cs file.

I've tried adding a Properties folder with an AssemblyInfo.cs file but I don't think its being picked up - because when I call Assembly.GetExecutingAssembly().GetName().Version.ToString() I get 0.0.0.0

So: What do I have to do to get AssemblyInfo.cs working OR how can I specify a version number?

Answer

RichardOD picture RichardOD · Oct 5, 2009

K Scott Allen has a post here, but personally i'd recommend you move to a Web Application Project.