473,395 Members | 1,763 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,395 software developers and data experts.

Visual Studio generated namespaces

VS 2005:

If I create a folder in my project, when I add new classes to that folder,
VS generates a namespace which is the project default namespace concatenated
with the folder name. Is it possible to turn this (immensely infuriating)
feature off so that it just uses the project default namespace regardless of
any folder structure?
Aug 26 '08 #1
3 1265
I was hopeful that a custom template might do it; the content is
controlled by specific tokens in the template file (which you can
create yourself), but it looks like (contrary to the documentation),
$rootnamespace$ actually contains the folder info. One option would be
to use "namespace $projectname$" - if you can live with the namespace
being the same as the project name (which often they might be...).

You can find out about creating your own template here:

http://codebetter.com/blogs/david.ha...06/134343.aspx

The available tokens are listed here:

http://msdn.microsoft.com/en-us/library/eehb4faa.aspx

(see also the 3.0 page - there is some mention there [in the user
content] of unlisted tokens).

Marc
Aug 26 '08 #2
Clive Dixon wrote:
this (immensely infuriating) feature off so that it just uses the
I know this doesn't help you, but its nice to know I am not alone in my
annoyance at that "feature"
--

Aug 26 '08 #3
Thanks

Hoped there might be a quick way to do it, but I suspected that I would have
to go the roll my own route.

"Marc Gravell" <ma**********@gmail.comwrote in message
news:64**********************************@i76g2000 hsf.googlegroups.com...
>I was hopeful that a custom template might do it; the content is
controlled by specific tokens in the template file (which you can
create yourself), but it looks like (contrary to the documentation),
$rootnamespace$ actually contains the folder info. One option would be
to use "namespace $projectname$" - if you can live with the namespace
being the same as the project name (which often they might be...).

You can find out about creating your own template here:

http://codebetter.com/blogs/david.ha...06/134343.aspx

The available tokens are listed here:

http://msdn.microsoft.com/en-us/library/eehb4faa.aspx

(see also the 3.0 page - there is some mention there [in the user
content] of unlisted tokens).

Marc

Aug 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Novice | last post by:
Hi all, I'm afraid this is the second posting of this information as I didn't get a response on the previous post. I will try to shorten my message (i.e. be more concise) in the hopes that it will...
11
by: olle | last post by:
Hi everyone. I am an Access developer having worked with Access-dev. projects for many years on Sql server databases and Access. For the internet I have been using traditional asp. But now I have...
4
by: Jan Michalski | last post by:
Does anyone know how to incorporate classes with different namespaces within a project? I have two classes with the same name but different namespace. When I try to add the the second class of the...
4
by: martin.skarsaune | last post by:
We have some SOAP compatilibility issues with Visual Studio .NET. Procedure: 1. Add web reference by importing WSDL from an external system 2. Generate C# classes 3. Try to invoke the remote...
54
by: m.roello | last post by:
In the book: "Working with Microsoft Visual Studio 2005" Craig Skibo wrote: "The power of Visual Studio 2005 lies in its ability to empower users to build, test, and debug powerful applications...
0
by: fiona | last post by:
Innovasys Ltd., a leader in help authoring and documentation tools, today announced the inclusion of a tailored version of the Innovasys HelpStudio help authoring product, HelpStudio Lite, in the...
10
by: Steve | last post by:
I am trying to create a DLL in Visual Studio 2005-Visual Basic that contains custom functions. I believe I need to use COM interop to allow VBA code in Excel 2002 to access it. I've studied...
8
by: WT | last post by:
Is it normal that Visual Studio sets the PreInit handler for a Page from the OnInit code ? No chance to fire it as OnPreInit is run befor OnInit. ??? CS
4
by: kurt.kurtsmith | last post by:
I am trying to import a tlb from a COM server(exe) I wrote with the following statement: #import "C:\\em2\\EM\\src\\core\\UMOSEFax\\Debug\\UMOSEFax.tlb" no_namespace auto_search the tlh and...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.