asp.net – 在部署时复制App_GlobalResources

我有一个ASP.NET Web应用程序,以前使用VS2008的Publish功能发布.

最近我切换到VS2008的“Web部署项目”.部署时,我注意到〜/ App_GlobalResources目录不再复制到构建版本文件夹中.

如何确保复制App_GlobalResources目录?

最佳答案 Web部署项目使用aspnet_compiler.exe.引自
documentation

These files are compiled into
assemblies and placed in the Bin
directory. No App_GlobalResources
subdirectory is created under the main
output directory. If the configuration
file specifies appliesTo=”All”, .resx
and .resources files are copied to the
output directories. They are not
copied if they are referenced by a
BuildProvider.

所有资源都编译成程序集并放入bin文件夹.这就是Web部署项目的设计方式.

点赞