[asp.net 2.0] extern aliases

S

SirMike

Hello,

I have got two assembly in web application's Bin folder. There is a
class in both of them with the same namespace and a name. Ofcourse there
is totally different code in them and I cannot recompile.
I know that I can add /reference option to the compiler and make an
extern alias in my aspx.cs file.
The problem is when I pass the /reference:Alias=name.dll I have got the
message from a compiler that this assembly is already referenced. I
suppose that it's automatically referenced by the compiler because it's
in Bin directory.
So, I tried to move it away from Bin folder and refrence the new folder.
It compiles in the Visual Studio but when page is loading I have got
another error: "Could not load file or assembly: name.dll
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its
dependencies"

Can somebody give me a hint how to solve it?
 
B

bruce barker

the aspnet_compiler.exe (compiles the aspx pages) does not support the
reference switch. i can think of a couple options:

1) write a wrapper class for one of the dlls, that loads the dll at
runtime. you can change the dll extension so its not automatically loaded.

2) host one of the dlls in a webservice

3) decompile the dll, change the namespace and recompile.


-- bruce (sqlwork.com)
 
S

SirMike

bruce said:
the aspnet_compiler.exe (compiles the aspx pages) does not support the
reference switch. i can think of a couple options:

1) write a wrapper class for one of the dlls, that loads the dll at
runtime. you can change the dll extension so its not automatically loaded.

2) host one of the dlls in a webservice

3) decompile the dll, change the namespace and recompile.

Oh, I thought it was possible. Thanks for the info.
 

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

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top