Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does my VB.NET class library show "My" and "My.Resources" namespaces in Reflector?

I have no intention of using "My" for anything in any of my projects. I haven't done anything with it (that I know of). But every one of class libraries shows a "My" namespace in Reflector and NDepend. This adds a lot of unnecessary clutter.

1) Why does it show up?

2) How can I remove it?

like image 905
Larsenal Avatar asked Jan 16 '09 17:01

Larsenal


1 Answers

Steps to remove the "My" Namespace

  • In the project properties, turn off "Enable application framework"
  • Under advanced compile options, turn on "Enable Optimizations"
  • Show all files in the project
  • Delete the Application.myapp node, Resources.resx, and Settings.settings nodes.
  • Unload the project, open the .vbproj in notepad, change the <MyType> to <MyType>Empty</MyType>
  • Reload the project and compile.

For resources, use standard resource files and their constructors (My just did a wrapper of this).

For Settings, use the config file.

like image 112
Tom Anderson Avatar answered Sep 21 '22 08:09

Tom Anderson