C# – Web Application Project, and App_GlobalResources

cdllresourcesvisual studioweb-applications

I currently have a C# Web Application Project with a multitude of pages as well as their corresponding codebehind files (aspx, cs, designer.cs). When I open the dll created during the build process and open it in the visual studio object explorer, I can clearly see all of the codebehind.

Within the same project I have a number of .resx files under the App_GlobalResources folder of the project. Associated with these .resx files is the generated designer.cs files. These designer.cs files have the Resources namespace. However, after building the web application the Resources namespace is not present within the dll indicating that they were not compiled in.

Would anyone have any ideas as to how I can have these resource code files included in my dll. This would allow be to avoid running the web application through a web deployment project simply to generate a App_GlobalResources.dll

Thanks in advance!

Best Answer

Right click on the resource file and view the properties then change the "Build Action" to "Embedded Resource".