Solved

Error: Unrecognized attribute 'targetFramework'

Posted on 2011-02-23
3
1,354 Views
Last Modified: 2012-05-11
Hello,

I'm trying to get an ASP.NET application running on my local PC.

I have the site set in IIS 7 to use an Application pool version 4.0.30319

When I try to build the site in Visual Studio 2008, I get a Configuration error "Unrecognized attribute 'targetFramework'." at the line in web.config...

<compilation debug="false" targetFramework="4.0" />

The version information at the bottom of the browser error says that the .NET Framework is 2.0.50727.4952

So, it looks like there is an issue here.

How do I fix this?
0
Comment
Question by:skbohler
3 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 34960765
VS 2008 cannot target 4.0. Only VS2010 can. Looks like your solution has been open/created in VS2010.

Try removing that tag from your web.config or open the solution in VS2010.
0
 

Author Comment

by:skbohler
ID: 34960947
OK, I opened it with VS2010, and it works. Thank you.
0
 
LVL 3

Expert Comment

by:DanMerk
ID: 34960950
You should be able to set it to 3.5 without any issues. The difference between 3.5 and 4 is typically very small.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question