By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,033 Members | 1,270 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,033 IT Pros & Developers. It's quick & easy.

Skip creation of My classes?

P: n/a
Hi,

In visualbasic2005, classes from the My namespace (e.g. My.MyProject) are
automatically added to the assemblies created by vbc. Is there a compiler
option to skip the creation of these classes?

Thanks in advance,

Dirk
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Dirk Theune" <Dirk Th****@discussions.microsoft.com> schrieb:
In visualbasic2005, classes from the My namespace (e.g. My.MyProject) are
automatically added to the assemblies created by vbc. Is there a compiler
option to skip the creation of these classes?


AFAIK there is no way to prevent the compiler from generating the 'My'
namespace and object hierarchy. However, 'My' will be hidden under certain
circumstances:

<URL:http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=2f30cc52-5ea6-4ee2-986e-d8ae6d747ea5>

I encourage everybody to make use of the 'My' feature.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2

P: n/a
AFAIK there is no way to prevent the compiler from generating the 'My'
namespace and object hierarchy.
There is. First Show All Files in Solution explorer and remove all
auto generated stuff under My Project, like Resources.resx and
Settings.settings. Then close the project, open the .vbproj in a text
editor and change the value of the Project/PropertyGroup/MyType tag to
something other than the default (<MyType>None</MyType> works fine).
When the project is recompiled after that, all My things should
hopefully be gone.

I encourage everybody to make use of the 'My' feature.


Sure, but for people who choose not to use it, it's just plain rude
that the compiler still bloats your assemblies with useless stuff.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 21 '05 #3

P: n/a

Mattias Sjögren wrote:
Sure, but for people who choose not to use it, it's just plain rude
that the compiler still bloats your assemblies with useless stuff.


I completely agree. I have always been a proponent of VB.Net but when
2005 comes out, I will be switching to C#. The My namespaces are one
of the reasons why. MS should make the My classes an option to turn on
or off.

Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.