【发布时间】:2016-04-23 01:16:08
【问题描述】:
我有一个 Web 应用程序,我使用 Visual Studio 2012 中的“发布网站”功能构建并发布它。预编译网站的设置如图所示
现在我想根据article 使用AssemblyInfo.cs 为最终程序集提供一个文件版本
问题是虽然我在AssemblyInfo.cs中设置了文件版本,但输出的汇编版本始终是1.0.0.0。
事实上,编译器会在其他地方创建自己的AssemblyInfo.cs,如图所示并构建它,然后最终将其与应用程序程序集合并。
我不知道如何将“发布网站”功能的这种行为更改为复制提供的 AssemblyInfo.cs 而不是创建自己的方式。
感谢任何帮助
更新:
web.config 设置为此处所说的 (How to: Create Versioned Assemblies for Precompiled Web Site Projects)
我在web.config 和web.debug.config 中设置了compilerOptions,但没有运气。
【问题讨论】:
标签: c# asp.net visual-studio visual-studio-2012