Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > [asp.net 2.0] extern aliases

Reply
Thread Tools

[asp.net 2.0] extern aliases

 
 
SirMike
Guest
Posts: n/a
 
      01-19-2007
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?

--
SirMike - http://www.sirmike.org
C makes it easy to shoot yourself in the foot;
C++ makes it harder, but when you do, it blows away your whole leg. -
Bjarne Stroustrup
 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      01-19-2007
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)

SirMike wrote:
> 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?
>

 
Reply With Quote
 
 
 
 
SirMike
Guest
Posts: n/a
 
      01-19-2007
bruce barker wrote:
> 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.

--
SirMike - http://www.sirmike.org
C makes it easy to shoot yourself in the foot;
C++ makes it harder, but when you do, it blows away your whole leg. -
Bjarne Stroustrup
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference of extern short *x and extern short x[]? Andre C Programming 5 07-17-2012 07:38 PM
enum aliases Roedy Green Java 5 06-30-2005 03:09 PM
thunderbird 0.9 aliases timbo Firefox 2 12-07-2004 06:51 AM
extern const char * vs. extern const char []http://tinyurl.com/47e3k Thomas Matthews C++ 5 08-02-2004 10:36 AM
SQL aliases in Visual C++ 6.0 Kevin C++ 5 02-06-2004 03:06 AM



Advertisments