Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Designer fails - My.Resources.Resources' has no property named

Tags:

.net

winforms

I have a problem that the designer won't display forms. It fails with the error Designer giving a warning as follows:

enter image description here

How can I fix this problem ?

like image 590
Renaud is Not Bill Gates Avatar asked Nov 29 '12 23:11

Renaud is Not Bill Gates


2 Answers

I had the same problem after changing the namespace of the project. After that I received the same error message and was looking in this post and none of the solutions worked for me. Now that I have found the solution, I write it here to guide other developers struggeling with the same problem.
The reason of the problem was that changing the namespace didn't change the "Default namespace". To change the "Default namespace":

  1. Right click on the project and select properties
  2. On the left panel select "Application"
  3. Set the correct "Default namespace".
like image 168
Code Pope Avatar answered Sep 27 '22 20:09

Code Pope


This can happen if your project references itself.

Visual Studio randomly does this automatically when some controls/forms defined in the project use other (user-)controls defined in this same project.

You can safely remove the self-reference in the project's "References" node.

Then rebuild and the designer should reload without these errors.

like image 23
Pragmateek Avatar answered Sep 27 '22 22:09

Pragmateek