ASP.NET Web Application and AssemblyInfo.cs

I have a web application that I create and publish using the Publish Website feature in Visual Studio 2012. The settings for pre-compiling the website are shown in the figure.

precompilation website settings

Now I want to give the final assembly the version of the file that I made using AssemblyInfo.csin accordance with this article

project structure

The problem is that although I install the file version in AssemblyInfo.cs, the output version of the assembly is always 1.0.0.0 .

In fact, the compiler creates its own AssemblyInfo.cssomewhere else, which is displayed in the picture and builds it, and then finally combines it with the application assembly.

enter image description here

, " -" , AssemblyInfo.cs .

UPDATE:

web.config ( -)

enter image description here

compilerOptions web.config, web.debug.config .

+4
1

, AssemblyInfo.cs Web.config, , , Web.config, , .

<system.codedom>
  <compilers>
    <compiler language="c#;cs;csharp" extension=".cs"
      type="Microsoft.CSharp.CSharpCodeProvider, System,
      Version=2.0.3600.0, Culture=neutral, 
      PublicKeyToken=b77a5c561934e089" warningLevel="1" 
      compilerOptions="path\AssemblyInfo.cs" />
  </compilers>
</system.codedom>

, , Web.Debug.config, , .

+2

Source: https://habr.com/ru/post/1624700/


All Articles