Solved

Error: Unrecognized attribute 'targetFramework'

Posted on 2011-02-23
3
1,351 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 69

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

AJAX ModalPopupExtender has a required property "TargetControlID" which may seem to be very confusing to new users. It means the server control that will be extended by the ModalPopup, for instance, if when you click a button, a ModalPopup displays,…
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now