title: Adding MSBuild version to ASP.NET Web Project in VS2012
body: <p>I'm working on a Web Site solution (not a Web Application shame on me) in Visual Studio 2012 on a ASP.NET Web Forms (double shame on me) project.
  I would like to have an auto-increment version on each build so that I can retrieve it in my code and use for static files versioning (mostly css and js) to avoid chache it.</p>
  
  <p>What I want to obtain are links like /mydir/mystyle.css?v=buildversionhere</p>
  
  <p>I found a nice code to retrieve the version:</p>
  
  <pre class="lang-vb prettyprint-override"><code>Dim web As Assembly = Assembly.GetExecutingAssembly()
  Dim webName As AssemblyName = web.GetName()
  Dim myVersion As String = webName.Version.ToString()
  </code></pre>
  
  <p>And it works, the problem is I always get 0.0.0.0.
  What I need to know is how to set an auto-increment on each website build, like where to set something like this:</p>
  
  <pre><code>[assembly:AssemblyFileVersion("1.0.*")]
  </code></pre>
  
  <p>Remember I'm on a Web Site project not on a Web Application.
  Thanks in advance</p>