Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1358
  • Last Modified:

Error: Unrecognized attribute 'targetFramework'

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
skbohler
Asked:
skbohler
1 Solution
 
Éric MoreauSenior .Net ConsultantCommented:
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
 
skbohlerAuthor Commented:
OK, I opened it with VS2010, and it works. Thank you.
0
 
DanMerkCommented:
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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now