Mich Mich - 6 months ago 26
ASP.NET (C#) Question

The namespace 'Resources' already contains a definition for 'SiteResources'

Ok I have a issue with my resx files for some reason I have this error

The namespace 'Resources' already contains a definition for 'SiteResources'

all files are within App_GlobalResources but I keep getting this error

any pointers


There is the likelihood even if you have them hidden in Visual Studio that it’s trying to read a file which is similarly named,

If within GlobalResources you have more than 1 file try renaming the extension like this




(this might still be read)

try changing the extension of the latter so that its complete not a resx file like:


this will 100% not be a resx file now and should stop asp.net confusing the file you wish to use.

Hope this will solve your problems.