Pages

syntax highlight, analytics

Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

18 July 2011

Project reference strictness in Visual Studio 2010

Visual Studio 2008 happily allows you to reference .NET 3.5-dependent projects from a project that targets .NET framework 2.0—because the CLR version is the same for both frameworks. On the contrary, Visual Studio 2010 refuses to build such a solution, perhaps out of a desire to enforce Best Practices For Creating Reliable Builds, and gives missing namespace errors:
The name 'FooTools' does not exist in the current context
and warnings such as:
The primary reference "System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the framework assembly "System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0". To resolve this problem, either remove the reference "System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" or retarget your application to a framework version which contains "System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".

Previous Posts


Creative Commons License   This work is licensed under a Creative Commons Attribution 3.0 Unported License.