ASP.NET Web Application and AssemblyInfo.cs
<p>I have a web application that I build and publish it using “<strong>Publish Web Site</strong>” feature in Visual Studio 2012. The settings for precompile web site is as shown in the picture</p>

<p><a href="https://i.stack.imgur.com/AhWol.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AhWol.png" alt="settings for precompile web site"></a></p>

<p>Now I want to give the final assembly a file version which I’ve done that using <code>AssemblyInfo.cs</code> according to this <a href="https://msdn.microsoft.com/en-us/library/ms228042.aspx" rel="nofollow noreferrer">article</a></p>

<p><a href="https://i.stack.imgur.com/mwhOL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mwhOL.png" alt="project structure"></a></p>

<p>The problem is that although I set the file version in the <code>AssemblyInfo.cs</code>, the output assembly version is always <strong>1.0.0.0</strong>.</p>

<p>In fact, the compiler creates its own <code>AssemblyInfo.cs</code> somewhere else that is shown in picture and builds it and then finally merges it with application assembly.</p>

<p><a href="https://i.stack.imgur.com/xK1tG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xK1tG.png" alt="enter image description here"></a></p>

<p>I don’t know how to change this behavior of “Publish Web Site” feature the way that it copy the provided AssemblyInfo.cs and not create its own.</p>

<p>Any help is appreciated</p>

<p><strong>UPDATE:</strong></p>

<p>the <code>web.config</code> is set as said here (<a href="https://msdn.microsoft.com/en-us/library/ms228042.aspx" rel="nofollow noreferrer">How to: Create Versioned Assemblies for Precompiled Web Site Projects</a>)</p>

<p><a href="https://i.stack.imgur.com/xWXi0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xWXi0.png" alt="enter image description here"></a></p>

<p>I have set the <code>compilerOptions</code> in <code>web.config</code> as well as <code>web.debug.config</code> with no luck.</p>