Referencing 2.0 DLLS in 1.1

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a usercontrol built in .NET 2.0. I want to be able to use this 2.0
control in a .NET 1.1 project. I have both framworks installed on my machine(
and VS.net 2003 and 2005). When i try to add a reference to my 2.0 DLL in my
1.1 project. I get an error saying that it is not a valid assembly. Is it
possible to reference a 2.0 DLL in a 1.1 project? Any input will be
appreciated.

Thank You,
Vish
 
Vish,

No, you can not. You will have to bring the 1.1 control to 2.0 in order
to do that. The metadata structure has been changed a little, and things
like generics would obviously not work.

Hope this helps.
 
1.1 project. I get an error saying that it is not a valid assembly. Is it
possible to reference a 2.0 DLL in a 1.1 project? Any input will be
appreciated.
You could try to build a COM-wrapper (expose the DLL as a COM-object) and
use the COM-wrapper...
however, this limits a lot what you can do.
 
MSDNAndi said:
You could try to build a COM-wrapper (expose the DLL as a COM-object) and
use the COM-wrapper...
however, this limits a lot what you can do.

No this won't work either, a v2 assembly can only be loaded by the V2 CLR.
Also, a .NET class is only exposed as a "COM" object to native COM clients,
but even in this case the v2 version of the CLR would be required.

Willy.
 

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

Back
Top