473,379 Members | 1,174 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Skip creation of My classes?

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
3 938
"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
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

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Andre Meyer | last post by:
Hi all I have been searching everywhere for this, but have not found a solution, yet. What I need is to create an object that is an instance of a class (NOT a class instance!) of which I only...
5
by: Tappy Tibbons | last post by:
I have a class I am serializing, and need the resultant XML to skip/omit classes that are not initialized, or their member variables have not been set. Is this possible? Say for the following...
24
by: Robin Cole | last post by:
I'd like a code review if anyone has the time. The code implements a basic skip list library for generic use. I use the following header for debug macros: /* public.h - Public declarations and...
6
by: Tappy Tibbons | last post by:
I do not know exactly how to explain what I am asking for, but here goes... Say I have a simple set of classes: ========= Public Class clsPerson Public FirstName As String Public LastName As...
10
by: John | last post by:
Hi, How can I achieve that a childs constructor is only callable from it's parent? Must I declare the class Private within A? Thanks in Advance Public MustInherit Class A Protected Sub...
3
by: Paul | last post by:
I am running VB.NET 2005. I have a multi-project solution. One project contains all my base classes and user-controls. My other project is my application that uses the base classes and UCs. I...
13
by: Alex | last post by:
For example, i have some part of XML file. <AppSettings> <Object ClassVersion="1.0.0.0" Type="AppSettings"> <Fields> <Field Name="App_ID" Type="System.Int32"> <Value> <int>-1</int> </Value>...
23
by: Frank Millman | last post by:
Hi all I have a small problem. I have come up with a solution, but I don't know if it is a) safe, and b) optimal. I have a class with a number of attributes, but for various reasons I cannot...
31
by: Tom P. | last post by:
I am doing quite a bit of custom painting and it means I have to create a lot of brushes (think one for every file system object in a directory) per paint. How expensive is this? Should I find a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.