help!

M

Mark

I have one VS.NET 2003 solution that contains 3 projects. Two of the
projects are ASP.NET projects each with their own .dll. The third project
is a class library with its own .dll. We'll refer to them as project1.dll,
project2.dll and myclass.dll.

Both project1 and project2 have references to myclass.dll. The build order
builds myclass.dll first. When I copy all three .dll into our BIN folder of
our site at the same time, the site bombs with the error message below. If
I only copy project1.dll and myclass.dll, and view that FIRST, and then add
project2.dll and test the site again IT WORKS!!!!!

WHAT THE HECK IS GOING ON? The verbose error message is below. We
thoroughly appreciate any suggestions for how to deal with this.

Mark Field
(e-mail address removed)

********** ERROR MESSAGE BELOW *************

Server Error in '/' Application.
----------------------------------------------------------------------------
----

Compilation Error
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.

Compiler Error Message: CS1595: 'mynamespace.Global' is defined in multiple
places; using definition from
'c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\root\2588b39b\2d9c51f0\assembly\dl2\0847439d\04924d3e_5794c301\IrPriva
te.DLL'

*** Mark: Note that the temporary file mentioned abovechanges in
location slightly each time we replace all three .dll files. I can't just
delete the file. ***

Source Error:



Line 25:
Line 26:
Line 27: public class Global_asax : mynamespace.Global {
Line 28:
Line 29: private static bool __initialized = false;


Source File: c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\root\2588b39b\2d9c51f0\ic_nyuyb.0.cs Line: 27



Show Detailed Compiler Output:


c:\windows\system32\inetsrv>
"c:\windows\microsoft.net\framework\v1.1.4322\csc.exe" /t:library
/utf8output
/R:"c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.x
ml.dll" /R:"c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll"
/R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\root\2588b39b\2d9c51f0\assembly\dl2\0847439d\04924d3e_5794c301\irpriva
te.dll"
/R:"c:\windows\assembly\gac\system.web.services\1.0.5000.0__b03f5f7f11d50a3a
\system.web.services.dll"
/R:"c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll"
/R:"c:\windows\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.w
eb.dll" /R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\root\2588b39b\2d9c51f0\assembly\dl2\e7c5492d\246d1639_5794c301\ir.dll"
/R:"c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\syst
em.drawing.dll" /R:"c:\windows\microsoft.net\framework\v1.1.4322\temporary
asp.net
files\root\2588b39b\2d9c51f0\assembly\dl2\3727d280\44ee7c31_5794c301\mailing
list.dll"
/R:"c:\windows\assembly\gac\system.web.mobile\1.0.5000.0__b03f5f7f11d50a3a\s
ystem.web.mobile.dll"
/R:"c:\windows\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.
data.dll"
/R:"c:\windows\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11
d50a3a\system.enterpriseservices.dll"
/out:"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\root\2588b39b\2d9c51f0\ic_nyuyb.dll" /debug- /optimize+ /warnaserror
/w:1 "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\root\2588b39b\2d9c51f0\ic_nyuyb.0.cs"


Microsoft (R) Visual C# .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.

c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\root\2588b39b\2d9c51f0\ic_nyuyb.0.cs(27,32): error CS1595:
'mynamespace.Global' is defined in multiple places; using definition from
'c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\root\2588b39b\2d9c51f0\assembly\dl2\0847439d\04924d3e_5794c301\IrPriva
te.DLL'





Show Complete Compilation Source:


Line 1:
//--------------------------------------------------------------------------
----
Line 2: // <autogenerated>
Line 3: // This code was generated by a tool.
Line 4: // Runtime Version: 1.1.4322.573
Line 5: //
Line 6: // Changes to this file may cause incorrect behavior and will
be lost if
Line 7: // the code is regenerated.
Line 8: // </autogenerated>
Line 9:
//--------------------------------------------------------------------------
----
Line 10:
Line 11: namespace ASP {
Line 12: using System;
Line 13: using System.Collections;
Line 14: using System.Collections.Specialized;
Line 15: using System.Configuration;
Line 16: using System.Text;
Line 17: using System.Text.RegularExpressions;
Line 18: using System.Web;
Line 19: using System.Web.Caching;
Line 20: using System.Web.SessionState;
Line 21: using System.Web.Security;
Line 22: using System.Web.UI;
Line 23: using System.Web.UI.WebControls;
Line 24: using System.Web.UI.HtmlControls;
Line 25:
Line 26:
Line 27: public class Global_asax : mynamespace.Global {
Line 28:
Line 29: private static bool __initialized = false;
Line 30:
Line 31: public Global_asax() {
Line 32: if ((ASP.Global_asax.__initialized == false)) {
Line 33: ASP.Global_asax.__initialized = true;
Line 34: }
Line 35: }
Line 36: }
Line 37: }
Line 38:
 
A

Alvin Bruney

that ambiguity can be fixed if you explicitly qualify the class when you
create it.
Ex myClass ex = new myClass() will cause ambiguity because it may be defined
elsewhere so do this:

program1.namespace1.myClass ex = new program1.namespace1.myClass();

[snip]
elsewhere

program2.namespace2.myClass ex = new program2.namespace2.myClass(); and so
forth to resolve the ambiguity
 
M

Mark

Alvin,

Thanks for the reply. Your response would imply that I have two similarly
named classes. I understand your point IF I had two similarly named
classes, but all three projects share the same name space and do NOT have
any similarly named classes. In the error message below, it talks about
"public class Global_asax : mynamespace.Global" being the source of my
problems. However, that snip of code does NOT exist anywhere in my project.
My global.asax page has a class name of "public class Global", not "public
class Global_asax". I believe the code the error is refering too is
literally in those temp files listed ...

Any other ideas?

Thanks in advance!

Mark
(e-mail address removed)


Alvin Bruney said:
that ambiguity can be fixed if you explicitly qualify the class when you create it.
Ex myClass ex = new myClass() will cause ambiguity because it may be defined elsewhere so do this:

program1.namespace1.myClass ex = new program1.namespace1.myClass();

[snip]
elsewhere

program2.namespace2.myClass ex = new program2.namespace2.myClass(); and so
forth to resolve the ambiguity

I have one VS.NET 2003 solution that contains 3 projects. Two of the
projects are ASP.NET projects each with their own .dll. The third project
is a class library with its own .dll. We'll refer to them as
project1.dll, project2.dll and myclass.dll.

Both project1 and project2 have references to myclass.dll. The build order
builds myclass.dll first. When I copy all three .dll into our BIN folder of
our site at the same time, the site bombs with the error message below. If
I only copy project1.dll and myclass.dll, and view that FIRST, and then add
project2.dll and test the site again IT WORKS!!!!!

WHAT THE HECK IS GOING ON? The verbose error message is below. We
thoroughly appreciate any suggestions for how to deal with this.

Mark Field
(e-mail address removed)

********** ERROR MESSAGE BELOW *************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top