Hi group, (VB.Net 2003)
in one solution, there are two WindowsApplication projects. They don't have
a relation to each other (are no classlibraries). In the solution
properties, there are no dependencies either. When compiling one project I
get the following error:
g:\bla\calendar\Form1.vb(1): class "Form1" and class "Form1", defined in
"G:\bla\WindowsApplication3\Form1.vb", conflict in Namespace
"WindowsApplication3".
(roughly translated from German)
The solution is stored in g:\bla.
project 1 in g:\bla\calendar
project 2 in g:\bla\WindowsApplication3
Project 2 is the only startproject in the solution.
After searching for the reason of the error, I found out that project 1
("calendar") had the same root namespace as the second (both
"WindowsApplication3"). BTW, both are not "real" projects, only for testing.
Q: Why mustn't the projects have the same namespace? They don't have to do
anything with each other. What does the compiler want to "link" together? Is
there an explanation for this?

Signature
Armin
CT - 07 May 2004 13:40 GMT
They can have the same namespace, but youn can't define two or more classes
with the same name within a single namespace. How would the compiler know
which to choose?

Signature
Carsten Thomsen
Enterprise Development with VS .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105
> Hi group, (VB.Net 2003)
>
[quoted text clipped - 24 lines]
> Is
> there an explanation for this?
Armin Zingler - 07 May 2004 15:36 GMT
> They can have the same namespace, but youn can't define two or more
> classes with the same name within a single namespace. How would the
> compiler know which to choose?
The other class is in a *different* project. The projects have no relation
to each other.

Signature
Armin
Armin Zingler - 12 May 2004 13:03 GMT
Anybody?
Steps to reproduce:
1. Create new Winforms project
2. Add new Winforms project to the same solution
3. Set root namespace of 2nd project equal the one of the 1st project
In VB.Net: error, Form1 defined twice (not only in the tasklist, also when
building one of the projects). That's not ok because they are completeley
independent projects!
Same steps done in C#: No error! That there is no error in C#, as expected,
shows that it must be a bug in the VB.Net integration.

Signature
Armin
How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
Dan Moseley - 30 May 2004 10:57 GMT
Yep, you're right, looks like a bug. I guess most people don't set them to
the same value. I can see it in VS 2003 but not in my build of VS 2005 so
looks like they already fixed it there.
Dan [ms]

Signature
This posting is provided "AS IS" with no warranties, and confers no rights.
> Anybody?
>
[quoted text clipped - 10 lines]
> Same steps done in C#: No error! That there is no error in C#, as expected,
> shows that it must be a bug in the VB.Net integration.
Armin Zingler - 31 May 2004 13:56 GMT
> > Steps to reproduce:
> >
[quoted text clipped - 15 lines]
> them to the same value. I can see it in VS 2003 but not in my build
> of VS 2005 so looks like they already fixed it there.
Ok, thx. I've only set it to the same value by accident.

Signature
Armin
How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html