Compile Error with for multiple Resource Files RRS feed

  • Question

  • User-388018234 posted

    When adding a second resource file to my ASP.NET 2.0 app, I am getting a compile error "The namespace 'Resources' already contains a definition for 'PageControls'".

     The layout of my App_GlobalResources folder is like this :


    The files are both located in the same folder.

    The error mentioned above appears in PageControls.en-UK.Designer.cs.  Here is a snippet of the code generated in the designer.cs file (error is highlighted):

    namespace Resources.PageControls {
        using System;

    I added the files to App_GlobalResources by right-clicking on App_GlobalResources and selecting new item, Resource file. Do I need to create the resource files in a different way?

    I have tried manually modify the en-UK.resx file but I had no luck.

    Thanks for your help.


    My Environment:

    VS 2008 SP1


    Wednesday, February 18, 2009 8:49 AM


  • User-388018234 posted

    I found my problem. The language I specified was not correct.  en-UK is not valid.  I changed this to en-GB and everything worked.


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 18, 2009 10:01 AM