Solved

Error: Unrecognized attribute 'targetFramework'

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Server Error 11 58
Help with C#, MVC, razor. 6 34
jquery progress bar 3 41
VB.net Move a class from Solution Items to a project 2 22
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

773 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