HighTechTalks DotNet Forums  

can library compiled 1.0 be used in Application compiled in 2.0

Dotnet Framework (CLR) microsoft.public.dotnet.framework.clr


Discuss can library compiled 1.0 be used in Application compiled in 2.0 in the Dotnet Framework (CLR) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Baron Ng
 
Posts: n/a

Default can library compiled 1.0 be used in Application compiled in 2.0 - 04-12-2006 , 05:00 AM






I have an winform referencing another .net dll:
I would like to ask if the following works:
1. Library built in VS.Net 2002, and referenced in a WinForm created in
VS.Net 2005

2. Library built in VS.Net 2005, and referenced in a WinForm created in
VS.Net 2002

In case I have an application that is built on .Net 1.0
Can I force it to run on .Net 2.0?

Thanks!

Reply With Quote
  #2  
Old   
Baron
 
Posts: n/a

Default Re: can library compiled 1.0 be used in Application compiled in 2.0 - 04-14-2006 , 10:43 PM






Any compatibility issue if I
compile the winform in .net 2.0,
leave the referenced libraries compilied in .net 1.0
and use .Net 2.0 CLR to run everything?

if the library use .Net 1.0 version of System.Net
and the machine has both .Net 1.0 and .Net 2.0 installed

when the library referenced by .Net 2.0 winform
would it use .Net 1.0 or .Net 2.0 version of the System.Net???

Thanks~~




"Mattias Sjögren" <mattias.dont.want.spam (AT) mvps (DOT) org> wrote

Quote:
I would like to ask if the following works:
1. Library built in VS.Net 2002, and referenced in a WinForm created in
VS.Net 2005

Yes


2. Library built in VS.Net 2005, and referenced in a WinForm created in
VS.Net 2002

No


In case I have an application that is built on .Net 1.0
Can I force it to run on .Net 2.0?

Sure, you can specify that in the config file.


Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.



Reply With Quote
  #3  
Old   
Baron Ng
 
Posts: n/a

Default Re: can library compiled 1.0 be used in Application compiled in 2. - 04-18-2006 , 01:43 AM



In that case;
the best option is to upgrade (and test) all the assemblies to .Net 2.0?
That's lot of works.....

since we can't just upgrade the 3rd party codes to .Net 2.0~~~~

Thanks anyway!


"Mattias Sjögren" wrote:

Quote:
Any compatibility issue if I
compile the winform in .net 2.0,

leave the referenced libraries compilied in .net 1.0
and use .Net 2.0 CLR to run everything?

Hopefully not, but there are some breaking changes documented here

http://msdn.microsoft.com/netframewo...s/default.aspx


if the library use .Net 1.0 version of System.Net
and the machine has both .Net 1.0 and .Net 2.0 installed

when the library referenced by .Net 2.0 winform
would it use .Net 1.0 or .Net 2.0 version of the System.Net???

The version that comes with your loaded CLR version, i.e. 2.0.


Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.