By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,290 Members | 1,263 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,290 IT Pros & Developers. It's quick & easy.

Namespace changing case?

P: n/a
Having changed a VB.Net(2003) DLL project, I'm getting Type
Loading problems in other code that uses my DLL. In my source
code, I have a Namespace Statement something like this:

Namespace XYZ.AProject

but when I build the DLL project and open the resulting DLL up
in ILDASM, the Namespace has been *translated* to
"XYZ.Aproject".

(Start of ILDASM Dump)

___[MOD] ...\AProject\MyClass\bin\XYZ.AProject.MyClass.dll
| M A N I F E S T
|___[NSP] XYZ.Aproject
.. . .

As you can imagine, this is causing huge problems as the new
version of my assembly is breaking all the other code compiled
against the previous version.
Please note: I've compiled this project *many* times before and
this is the first time I've seen this problem) and no; I don't want to
create a new assembly version; older code MUST use the new code (there's a
rather nasty bug in the old one).

I've already compared all the source files and none of them show
a change to the Namespace statement, nor does the
"case-converted" form of the namespace appear anywhere
(except in the compiled DLL!).

Any ideas what might be causing this?

TIA,
Phill W.
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I /think/ I've found what's causing this. The confusion arose
because of inconsistent use of Namespace statements.

Some developers used

Namespace XYZ.AProject

while others used

Namespace XYZ.Aproject

It appears that Referencing an assembly with the "same"
namespace (but in a different *case*) *overrides* the
Namespace statement in your own code.

Even more annoyingly, it seems that when adding a reference,
VB.Net 2003 seems to take the Assembly Name from the name
of the physical file /containing/ the assembly! So, when I added
a reference to the assembly

XYZ.AProject.Assembly1

contained in the physical file

XYZ.Aproject.Assembly1.dll

VB.Net dutifully saved the vbproj file containing

.. . .
<Reference
Name = "XYZ.Aproject.Assembly1"
AssemblyName = "XYZ.Aproject.Assembly1"
HintPath = . . .
/>
.. . .

Much confusion, but at least I'm up and running again.

Regards,
Phill W.

"Phill. W" <P.******@open.ac.uk> wrote in message
news:bk**********@yarrow.open.ac.uk...
Having changed a VB.Net(2003) DLL project, I'm getting Type
Loading problems in other code that uses my DLL. In my source
code, I have a Namespace Statement something like this:

Namespace XYZ.AProject

but when I build the DLL project and open the resulting DLL up
in ILDASM, the Namespace has been *translated* to
"XYZ.Aproject".

(Start of ILDASM Dump)

___[MOD] ...\AProject\MyClass\bin\XYZ.AProject.MyClass.dll
| M A N I F E S T
|___[NSP] XYZ.Aproject
. . .

As you can imagine, this is causing huge problems as the new
version of my assembly is breaking all the other code compiled
against the previous version.
Please note: I've compiled this project *many* times before and
this is the first time I've seen this problem) and no; I don't want to
create a new assembly version; older code MUST use the new code (there's a
rather nasty bug in the old one).

I've already compared all the source files and none of them show
a change to the Namespace statement, nor does the
"case-converted" form of the namespace appear anywhere
(except in the compiled DLL!).

Any ideas what might be causing this?

TIA,
Phill W.

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.