I got an issue which already cost me some evenings to resolve. I migrated a ASP.NET Web Project to a Web Application.
My main issue are the .resx files below App_GlobalResources. Let's say that I have MyStrings.resx (= default culture) and MyStrings.en.resx (yes, english is not my default).
If I create the files in the solution in Solution Explorer with "Add...", I am getting the following settings: * Build Action: Content * Custom Tool: GlobalResourceProxyGenerator
I would guess that the default setting is fine for most cases but I already have two issues with that: a) If I leave the Build Action as "Content", I will get a MissingManifestResourceException when using ResourceManager.GetString in code. Solution: Change it to "EmbeddedResource". b) The GlobalResourceProxyGenerator seems to missing on my computer. If I choose "Run Custom Tool" on the .resx I get the error message "Cannot find custom tool '...' on this system. Great. Solution: Change it to "PublicResXFileCodeGenerator". This works.
Now, if I leave the setting at PublicResXFileCodeGenerator, everything compiles but when I run the solution (IIS and VS Express 2013 for Web) I get the friendly message that I got "Resources.MyStrings" both in MyWebSite.dll and in App_GlobalResources.dll.
OK, I change the Custom Tool to "ResXFileCodeGenerator". Now, everything's working fine. I am now deploying the solution to the webserver. There I get CS0122: Resources.MyStrings is inaccessible due to its protection level. That's probably due to it's "internal" declaration.
By now I am completely lost. Any help to clean up the situation?
Environment: IIS locally and online VS Express 2013 for Web Two languages. For both the settings are: Build Action: Embedded Resource Copy to Output Directory: Do not copy Custom Tool: ResXfileCodeGenerator Custom Tool Namespace: Resources
For the generated designer files (only default language) the settings are: Build Action: Compile Copy to Output Directory: Do not copy
Any help is appreciated