CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Peter's Gekko

public Blog MyNotepad : Imho { }

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.


Published Feb 16 2007, 06:26 AM by pvanooijen
Filed under:

Comments

Peter's Gekko said:

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

# January 28, 2008 3:48 PM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add
Check out Devlicio.us!

This Blog

Syndication

News