Reference a .NET 3.5 assembly form a .NET 2.0 other assembly: in VS2008 ok, not in VS2010
-
Good afternoon! :) Yesterday for me was the "Great day": new pc, new VS. I installed VS2010, and ported my solutions to it. In a solution of mine, I need to create a .NET 2.0 assembly (compatibility issues with ACU Cobol) that uses some other assemblies compiled with .NET 3.5 Warning messages apart, in VS2008 all works fine; in VS 2010 I cannot compile: my 2.0 project reference against other 3.5 appears with the warning yellow mark. I can comnpile only if I reference by hand System.Core.dll from .NET 3.5 framework in my 2.0 targeted assembly. Anybody can give me an explanation about this new/strange VS2010 behaviour? :(( Thanks! Nando ;)
Jesus
-
Good afternoon! :) Yesterday for me was the "Great day": new pc, new VS. I installed VS2010, and ported my solutions to it. In a solution of mine, I need to create a .NET 2.0 assembly (compatibility issues with ACU Cobol) that uses some other assemblies compiled with .NET 3.5 Warning messages apart, in VS2008 all works fine; in VS 2010 I cannot compile: my 2.0 project reference against other 3.5 appears with the warning yellow mark. I can comnpile only if I reference by hand System.Core.dll from .NET 3.5 framework in my 2.0 targeted assembly. Anybody can give me an explanation about this new/strange VS2010 behaviour? :(( Thanks! Nando ;)
Jesus
I don't think this is new or strange. You obviously can't use upper versions of framework components from lower versions.
I know the language. I've read a book. - _Madmatt
-
I don't think this is new or strange. You obviously can't use upper versions of framework components from lower versions.
I know the language. I've read a book. - _Madmatt
Actually I just had a similar experience: a solution with one 3.5 EXE project referencing two 2.0 DLL projects; it was created long ago with 2008 without any problem (initially it was all 2.0, but then the EXE needed some LINQ and I never got around to modify the DLL targets). When ported to VS2010 I had to modify the DLL projects so they now all target the same framework. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Prolific encyclopedia fixture proof-reader browser patron addict?
We all depend on the beast below.
-
I don't think this is new or strange. You obviously can't use upper versions of framework components from lower versions.
I know the language. I've read a book. - _Madmatt
Yes, but why VS2008 did not make this a problem on compiling? I agree with you when you say you can't use upper framework form a 2.0 assembly, 'cause, for example it can be deployed on a win2000 or on a machine without .NET 3.0. But as I say in my previous post, I'll deploy this solution on .NET 3.5 ready machines; only a bug/limit of Cobol<->.NET bridge force me to compile only this Cobol-.NET-interface-assembly in 2.0. However, I found the trick: reference System.Core.dll (or other dll needed by your referenced assemblies) by hand. Thanks! Nando
Jesus