views:

210

answers:

1

I have a console application which has target .NET 2.0

It is very short but full of unsafe code.

I converted it to VS 2010. I run it OK.

When I try to change "target framework" in properties to 3.5 or 4.0 it shows message box:

TargetFrameworkMoniker: Error parsing application configuration file at line 0. XML document must have a top level element.

the target then stays 2.0 anyway...

Any thoughts?

+1  A: 

Found the solution. Simply opened app.config in text pad (it was empty for some reason) and pasted:

<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>