473,241 Members | 1,500 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,241 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 1260
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: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.