473,686 Members | 2,232 Online
Bytes | Software Development & Data Engineering Community
+ 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.Aproje ct".

(Start of ILDASM Dump)

___[MOD] ...\AProject\My Class\bin\XYZ.A Project.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 2053
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.As sembly1

contained in the physical file

XYZ.Aproject.As sembly1.dll

VB.Net dutifully saved the vbproj file containing

.. . .
<Reference
Name = "XYZ.Aproject.A ssembly1"
AssemblyName = "XYZ.Aproject.A ssembly1"
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.Aproje ct".

(Start of ILDASM Dump)

___[MOD] ...\AProject\My Class\bin\XYZ.A Project.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
5127
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 the days before PHP got object-oriented features. For instance we currently have:
20
6779
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" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
7
3476
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 that change the behaviour of printf and fprintf, and I planned to make them available using a convenient namespace, called 'herring', say, like this: using herring::printf; using herring::fprintf;
20
3859
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 a named namespace namespace foo { class Foo
6
24737
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 Parser {...} ... } The second library looks like this (assemble name and root name space is set to Codab.TapNet)
1
1578
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 if I first mannually change the root entry's namespace url as shown below. Does anyone know how I can get the two (cleint xml export and aspx xml consume) to work together with the appropriate namespace? Here is the top three lines of my xml...
12
2183
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 standard string library? Is this really necessary, why? Thanks, Bernhard Enders.
13
18124
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 detail, the enum is declared as, namespace test{ enum MyEnum{ VALUE1,VALUE2 };
3
2789
by: huohaodian | last post by:
I have a webservice class MyService.asmx.cs with: namespace XMLWS { public class Poster : System.Web.Services.WebService
0
8520
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8780
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7603
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6442
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5800
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2953
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 we have to send another system
2
2208
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.