Peter's Gekko

Sponsors

The Lounge

Wicked Cool Jobs

News

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Resources in an asp.net site, MissingManifestResourceException and custom tool

In my last post I described a problem I had with localized resources in an asp.net site. Investigating another side of the matter I found out what really went wrong with my resources. Here's the real gotcha:

When you add a resource file to a project it is assigned a custom tool:

Now what the custom tool is depends on the location the resource file is created. Adding the resource to the App_GlobalResources folder it will be GlobalResourceProxyGenerator. With this tool the resources do work right both in markup and in code. Adding it to the project root the tool will be ResXFileCodeGenerator. This tool will result in the MissingManifestResourceException. Moving the resource around in the project does not change the custom tool. Having changed the tool setting by hand my site now completely works as expected.


Posted Fri, Feb 16 2007 6:26 AM by pvanooijen
Filed under:

[Advertisement]

Comments

Peter's Gekko wrote How to set the UI culture of an ASP.NET page from code
on Mon, Jan 28 2008 3:48 PM

The globalization of an asp.net web site is not that difficult. When rendering a page the language preferences

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Devlicio.us