(Note the WordPress bug: you cannot have <Default> in a topic title, but having it in the text is fine, hence the [Default] in the title).
When porting some projects from .NET 1.x to .NET 4.x, I got these two errors:
Error 17 Type 'MyProject.My.MySettings' is not defined.
Error 18 'MyProject' is not a member of '<Default>'.
Both errors in the file ...\My Project\Settings.Designer.vb
relative to the MyProject.vbproj
file.
This was not the result of something like this Visual Studio 2005 bug, but of how the designer generated files are not being regenerated when you change the root namespace only in the MyProject.vbproj file, not through the IDE.
Steps to reproduce:
- Create a MyProject class library in VB.NET
- In the MyProject.vbproj, change the RootNameSpace into MyNameSpace.MyProject.vbproj
- Build
Lesson learned: when using text compare tools, some .vbproj changes should be propagated through the IDE, not through your favourite text compare tool.
When you change it in the IDE, it regenerates the *.Designer.vb files to reflect the changed namespace.
The solution is simple, in the IDE follow these steps:
- In the Project Options change the RootNameSpace to a dummy
- Build your project
- Chante the RootNameSpace to what you want
- Build your project
–jeroen
via: type “my.mysettings” “is not defined.” – Google Search.