Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS2008 to VS2010 project conversion

I have a component project build in VS2008 and targeting the .NET Framework 3.5. I recently downloaded the VS2010 Beta 1 to make sure this project would convert over correctly when the time comes to switch to the new IDE. This project contains references to a couple of 3rd party dlls built against version 2.0 of the framework. I changed my project to build against the 4.0 version of the framework but when I try to build the project I get a ton of errors that looks like the compiler can't recognize the class types of those 3rd party libraries similar to what is below.

"The type or namespace name 'Data' does not exist in the namespace 'Microsoft.Practices.EnterpriseLibrary' (are you missing an assembly reference?)"

I'm trying to figure out why I can't compile. From what I have read .NET 4.0 uses a different version of the CLR. How or why would that impact my ability to have access to those types? Am I going to have to

a) Get the source code and recompile in VS2010 / .NET 4.0 and then reference that assembly or

b) Wait for project authors to do "a" above and release their assemblies targeting the 4.0 CLR? or

c) Something else because perhaps my VS2010 install is borked?

I can change the project properties to target 3.5 and everything works as I expect under the 2010 IDE.

like image 604
sdanna Avatar asked Jun 11 '09 19:06

sdanna


2 Answers

I suspect this is because .NET 4.0 uses CLR 4.0, not 2.0. EL 4.1 will have been built against CLR 2.0, so I'm not sure I'd expect it to be found without help.

like image 52
John Saunders Avatar answered Oct 06 '22 22:10

John Saunders


Seems like a CLR versioning issue to me.

For the current time, I will recommend b) and/or just compile to v2.0/v3.5.

Any specific feature that you want to use in v4.0?

like image 24
Adrian Godong Avatar answered Oct 06 '22 22:10

Adrian Godong