更新global.asax不仅global.asax.cs

use*_*862 4 c# asp.net asp.net-mvc asp.net-mvc-4

在我的本地发布文件夹我有Global.asaxGlobal.asax.cs没有更新的Global.asax其中(日期一个月前)和Global.asax.cs中被更新.

我检查文件的"构建操作",该Global.asax文件设置为"内容",复制始终在文件属性中.

如何在publish命令中将global.asax与global.asax.cs一起更新?

Pat*_*man 5

Global.asax通常不会改变.Global.asax被编译成一个派生自Global你的类中的类Global.asax.cs.

你不必为此做任何事情.服务器的编译器会自己选择它.您只需将其复制Global.asax到生产服务器,然后Global.asax.cs将其编译为程序集.