views:

188

answers:

2

Hello,

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 release folder on build anymore.

How can I make sure the App_GlobalResources directory is copied along?

A: 

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.

Darin Dimitrov
Hi, Where would I specificy the attribute appliesTo="All"? At the moment the deployed app. gives exc. "The resource object with classname 'adminNav' and key 'Default' was not found." at GetExplicitResourceString.Is it normal that globalresources don't work by default when using web deployment projects?
richard
A: 

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.

richard