I have two ASP.NET Web projects (ProjectA and ProjectB). When class in ProjectA is instantiating a class of ProjectB which uses a resource file Blah.resx, I get this error:
Sibi Elangos answer alone was not sufficient for me, so I had to
This will generate an App_GlobalResources in your /bin
folder, now copy that folder also to the root of the web application
No-one seems to have mentioned this solution. Obvious really - but tripped me over for a moment...
The default access modifier for a new resources file is Internal
(or Friend
in VB.Net.)
Make sure you change this to Public
(in the resx designer there is a dropdown at the top for the access modifier)
Right-click on the resources and select Run Custom Tool
This will fix the designer
In my case I had placed a new class on top of a Windows form, within the same file.
Moving the newly added class out of that file fixed the problem.
See here: http://i.stack.imgur.com/wVu6c.png
This can also occur when putting a class above the main winform class (Form1, for example) You can see this when you look at the design, as it fails to be rendered.
For users who facing this isssue in .NET Core 3.0, this could be related to a breaking change that made in .NET Core 3.0, to resolve it just set EmbeddedResourceUseDependentUponConvention
to false in your project csproj:
<PropertyGroup>
<EmbeddedResourceUseDependentUponConvention>false</EmbeddedResourceUseDependentUponConvention>
</PropertyGroup>