Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Visual Web Developer Express 2010 changes the target framework version of class library projects to 4.0 when upgrading from earlier versions


Symptoms

If you open a solution using Visual Web Developer Express 2010 which was created using previous versions of Visual Studio and the solution contains a .Net 3.5 website/Web Application Project with reference to a .Net 3.5 class library project, then when you open the project and choose to continue targeting the .Net 3.5 framework in the upgrade prompt, you may see various warnings such as:

The project 'ClassLibrary1' cannot be referenced. The referenced project is targeted to a higher framework version (4.0)

↑ Back to the top


Cause

Class library projects (including asp.net server control library projects) automatically get upgraded to .Net Framework 4.0 when opened with Visual Web Developer Express 2010. The website that has a reference to this project is still targeting the framework version 3.5, and hence you may get warnings as the dependent project is targeting a higher framework version - .Net framework 4.0.

↑ Back to the top


Resolution

To workaround these warnings and continue targeting .Net Framework 3.5, change the target of the dependent class library project from .Net framework 4.0 to 3.5.

↑ Back to the top


Keywords: vkball, kb

↑ Back to the top

Article Info
Article ID : 2023201
Revision : 1
Created on : 1/8/2017
Published on : 6/9/2010
Exists online : False
Views : 120