Copy App_GlobalResources on deployment
I have an ASP.NET web application which was previously published using the Publish feature of VS2008.
Recently I switched to "Web Deployment Projects" for VS2008. When deploying I noticed that the ~/App_GlobalResources directory is not copied to the relea开发者_开发知识库se folder on build anymore.
How can I make sure the App_GlobalResources directory is copied along?
Web deployment projects use the aspnet_compiler.exe
. Quote from the 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.
All resources are compiled into assemblies and put into the bin
folder. That's the way web deployment projects is designed.
The app_globalresources directory shouldn't be copied. In the property pages of the Web Deployment project I had to check "Treat as library component".
This made sure a deployment.resources.dll is generated, which wasn't the case before.
精彩评论