473,473 Members | 1,793 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Namespace changing case?

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
1 2031
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

88
by: Tim Tyler | last post by:
PHP puts most of its functions into a big flat global namespace. That leads to short function names - but creates a namespace minefield for programmers. Lots of the functions are legacies from...
20
by: Bernd Fuhrmann | last post by:
Hi! I have some trouble with some simple stupid XSLT-stuff. My stylesheet: ------------- <?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet version="1.0"...
7
by: zbyszek | last post by:
I am working with a large C++ program which, for reasons of backward compatibility, uses C's printf and fprintf rather than iostreams. For a certain type of build I want to provide new functions...
20
by: Patrick Guio | last post by:
Dear all, I have some problem with insertion operator together with namespace. I have a header file foo.h containing declaration of classes, typedefs and insertion operators for the typedefs in...
6
by: Robert Warnestam | last post by:
I've two class libraries, where one is referencing the other. The first library looks like this; (assembly name and root name space is set to Codab.Parser) namespace Codab.Parser { public class...
1
by: Jay | last post by:
I have a Access/VBA client that exports xml to the local drive, then posts it over http to an aspx page. The aspx page consumes it, then builds itself based on the xml data. This works find only...
12
by: bgeneto | last post by:
I know that it's a very basic question, but I can't figure out or find an answer to why do we have to specify a namespace, like this #include<string> using namespace std; when using the...
13
by: toton | last post by:
Hi, I have some enum (enumeration ) defined in some namespace, not inside class. How to use the enum constant's in some other namespace without using the whole namespace. To say in little...
3
by: huohaodian | last post by:
I have a webservice class MyService.asmx.cs with: namespace XMLWS { public class Poster : System.Web.Services.WebService
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.