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
Nicholas Paldino [.NET/C# MVP] - 15 Dec 2005 17:29 GMT
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.

Signature
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
> Hi,
>
[quoted text clipped - 9 lines]
> Thank You,
> Vish
MSDNAndi - 15 Dec 2005 18:56 GMT
> 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.
Willy Denoyette [MVP] - 15 Dec 2005 19:33 GMT
>> 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.
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.