Question

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.

Was it helpful?

Solution 3

I wanted to mark this question as answered and based on the comments and my own experiences, I think that Mehrdad is correct in the comment attached to the question and that it was a VS2010 project conversion problem.

OTHER TIPS

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.

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?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top