468,134 Members | 1,261 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,134 developers. It's quick & easy.

Namespace Management

Hi There!

I just need some advice on Namespace management for creating reusable VB.NET
applications.

I would like my applications to have this namespace structure...

Namespace MyCompany

Namespace MyApplication1

Namespace Module1

End Namespace

End Namespace

End Namespace

However, I find it hard to enforce this structure throughout many different
VB.NET files and projects. For example, I need to manually type in Namespace
for MyCompany, MyApplication1 and Module(n) for every VB.NET class files.

Is there anyway to define a namespace on the Root directory and all the
VB.NET files in the child directory automatically inherits the parent
Namespace?

Thanks in advance!

Don
Jul 21 '05 #1
6 1620
Hi,

In the projects properties you can set the root namespace.
Ken
----------------
"Don Wash" <do*@wash.com> wrote in message
news:us**************@tk2msftngp13.phx.gbl...
Hi There!

I just need some advice on Namespace management for creating reusable VB.NET
applications.

I would like my applications to have this namespace structure...

Namespace MyCompany

Namespace MyApplication1

Namespace Module1

End Namespace

End Namespace

End Namespace

However, I find it hard to enforce this structure throughout many different
VB.NET files and projects. For example, I need to manually type in Namespace
for MyCompany, MyApplication1 and Module(n) for every VB.NET class files.

Is there anyway to define a namespace on the Root directory and all the
VB.NET files in the child directory automatically inherits the parent
Namespace?

Thanks in advance!

Don

Jul 21 '05 #2
Hi Ken,

Thanks for the reply. I can now set it. However, as I presented the
Namespace structure in my previous post, my Namespace structure looks like
following...

Namespace MyCompany

Namespace MyApplication1

Namespace Module1

End Namespace

End Namespace

End Namespace

So as you can see, there will be no projects whatsoever using 'MyCompany'
namespace. It will just be a wrapper Namespace which will wrap the actual
applications such as 'MyApplication1' and children. So do I need to create a
dummy project just to create a wrapper Namespace 'MyCompany' ?

Thanks again,
Don

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:OX*************@tk2msftngp13.phx.gbl...
Hi,

In the projects properties you can set the root namespace.
Ken
----------------
"Don Wash" <do*@wash.com> wrote in message
news:us**************@tk2msftngp13.phx.gbl...
Hi There!

I just need some advice on Namespace management for creating reusable VB.NET applications.

I would like my applications to have this namespace structure...

Namespace MyCompany

Namespace MyApplication1

Namespace Module1

End Namespace

End Namespace

End Namespace

However, I find it hard to enforce this structure throughout many different VB.NET files and projects. For example, I need to manually type in Namespace for MyCompany, MyApplication1 and Module(n) for every VB.NET class files.

Is there anyway to define a namespace on the Root directory and all the
VB.NET files in the child directory automatically inherits the parent
Namespace?

Thanks in advance!

Don

Jul 21 '05 #3
Can't you just set the root to MyCompany.MyApplication1 ?

Greg

"Don Wash" <do*@wash.com> wrote in message
news:uC*************@TK2MSFTNGP09.phx.gbl...
Hi Ken,

Thanks for the reply. I can now set it. However, as I presented the
Namespace structure in my previous post, my Namespace structure looks like
following...

Namespace MyCompany

Namespace MyApplication1

Namespace Module1

End Namespace

End Namespace

End Namespace

So as you can see, there will be no projects whatsoever using 'MyCompany'
namespace. It will just be a wrapper Namespace which will wrap the actual
applications such as 'MyApplication1' and children. So do I need to create a dummy project just to create a wrapper Namespace 'MyCompany' ?

Thanks again,
Don

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:OX*************@tk2msftngp13.phx.gbl...
Hi,

In the projects properties you can set the root namespace.
Ken
----------------
"Don Wash" <do*@wash.com> wrote in message
news:us**************@tk2msftngp13.phx.gbl...
Hi There!

I just need some advice on Namespace management for creating reusable

VB.NET
applications.

I would like my applications to have this namespace structure...

Namespace MyCompany

Namespace MyApplication1

Namespace Module1

End Namespace

End Namespace

End Namespace

However, I find it hard to enforce this structure throughout many

different
VB.NET files and projects. For example, I need to manually type in

Namespace
for MyCompany, MyApplication1 and Module(n) for every VB.NET class files.
Is there anyway to define a namespace on the Root directory and all the
VB.NET files in the child directory automatically inherits the parent
Namespace?

Thanks in advance!

Don


Jul 21 '05 #4
Yes, I could. But then again, I have to set this information to every
application I develop which is very redundant and really a pain when I need
to change company name.

Any other methods?

Thanks,
Don

"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Can't you just set the root to MyCompany.MyApplication1 ?

Greg

"Don Wash" <do*@wash.com> wrote in message
news:uC*************@TK2MSFTNGP09.phx.gbl...
Hi Ken,

Thanks for the reply. I can now set it. However, as I presented the
Namespace structure in my previous post, my Namespace structure looks like
following...

Namespace MyCompany

Namespace MyApplication1

Namespace Module1

End Namespace

End Namespace

End Namespace

So as you can see, there will be no projects whatsoever using 'MyCompany' namespace. It will just be a wrapper Namespace which will wrap the actual applications such as 'MyApplication1' and children. So do I need to
create a
dummy project just to create a wrapper Namespace 'MyCompany' ?

Thanks again,
Don

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:OX*************@tk2msftngp13.phx.gbl...
Hi,

In the projects properties you can set the root namespace.
Ken
----------------
"Don Wash" <do*@wash.com> wrote in message
news:us**************@tk2msftngp13.phx.gbl...
Hi There!

I just need some advice on Namespace management for creating reusable

VB.NET
applications.

I would like my applications to have this namespace structure...

Namespace MyCompany

Namespace MyApplication1

Namespace Module1

End Namespace

End Namespace

End Namespace

However, I find it hard to enforce this structure throughout many

different
VB.NET files and projects. For example, I need to manually type in

Namespace
for MyCompany, MyApplication1 and Module(n) for every VB.NET class

files.
Is there anyway to define a namespace on the Root directory and all the VB.NET files in the child directory automatically inherits the parent
Namespace?

Thanks in advance!

Don



Jul 21 '05 #5
I do a lot of work with a Global insurance company that has a standard that
all applications will start with the company name followed by other company
specific information.

Developers are simply told that when they create a new project, set the root
namespace to Companyname.otherInfo.etc. It isn't really a big deal because
they are not making new projects every 2 seconds and it only takes 2 seconds
to set the root namespace.
"Don Wash" <do*@wash.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Yes, I could. But then again, I have to set this information to every
application I develop which is very redundant and really a pain when I need to change company name.

Any other methods?

Thanks,
Don

"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Can't you just set the root to MyCompany.MyApplication1 ?

Greg

"Don Wash" <do*@wash.com> wrote in message
news:uC*************@TK2MSFTNGP09.phx.gbl...
Hi Ken,

Thanks for the reply. I can now set it. However, as I presented the
Namespace structure in my previous post, my Namespace structure looks like following...

Namespace MyCompany

Namespace MyApplication1

Namespace Module1

End Namespace

End Namespace

End Namespace

So as you can see, there will be no projects whatsoever using 'MyCompany' namespace. It will just be a wrapper Namespace which will wrap the actual applications such as 'MyApplication1' and children. So do I need to create
a
dummy project just to create a wrapper Namespace 'MyCompany' ?

Thanks again,
Don

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:OX*************@tk2msftngp13.phx.gbl...
> Hi,
>
> In the projects properties you can set the root namespace.
>
>
> Ken
> ----------------
> "Don Wash" <do*@wash.com> wrote in message
> news:us**************@tk2msftngp13.phx.gbl...
> Hi There!
>
> I just need some advice on Namespace management for creating reusable VB.NET
> applications.
>
> I would like my applications to have this namespace structure...
>
> Namespace MyCompany
>
> Namespace MyApplication1
>
> Namespace Module1
>
> End Namespace
>
> End Namespace
>
> End Namespace
>
> However, I find it hard to enforce this structure throughout many
different
> VB.NET files and projects. For example, I need to manually type in
Namespace
> for MyCompany, MyApplication1 and Module(n) for every VB.NET class

files.
>
> Is there anyway to define a namespace on the Root directory and all

the > VB.NET files in the child directory automatically inherits the parent > Namespace?
>
> Thanks in advance!
>
> Don
>
>
>



Jul 21 '05 #6
"Don Wash" <do*@wash.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Yes, I could. But then again, I have to set this information to every
application I develop which is very redundant and really a pain when I need to change company name.

Any other methods?

Thanks,
Don


That's pretty much the limit of your choices, I'm afraid. Nothing that
can't be handled with a good program editor's file search/replace
functionality - on those rare occasions when the company name changes. :-)

Best Regards,

Andy
Jul 21 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by PaulThomas | last post: by
1 post views Thread by Pablo Garcia | last post: by
4 posts views Thread by raffelm | last post: by
2 posts views Thread by TRW | last post: by
3 posts views Thread by Jennifer | last post: by
6 posts views Thread by Don Wash | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.