Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / December 2005

Tip: Looking for answers? Try searching our database.

Referencing 2.0 DLLS in 1.1

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Vish - 15 Dec 2005 17:20 GMT
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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.