471,317 Members | 1,932 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,317 software developers and data experts.

Referencing 2.0 DLLS in 1.1

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
Dec 15 '05 #1
3 1050
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Vish" <Vi**@discussions.microsoft.com> wrote in message
news:5C**********************************@microsof t.com...
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

Dec 15 '05 #2
> 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.

Dec 15 '05 #3

"MSDNAndi" <MS******@noemail.noemail> wrote in message
news:3D**********************************@microsof t.com...
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.
Dec 15 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by Mark Broadbent | last post: by
10 posts views Thread by Doug Crabtree | last post: by
1 post views Thread by Manny Silva | last post: by
4 posts views Thread by Oenone | last post: by
9 posts views Thread by Brett Romero | last post: by
3 posts views Thread by =?Utf-8?B?a3lvbmc=?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.