It seems that when upgrading a project to .net 4.0 in VS 2010 Beta 2,
a app.config file is generated, which roughly looks like this:
<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
Is this file needed in case I want to have a .NET 4.0 only executable?
NOTE: Interestingly enough, this only happens in c# as opposed to f# projects.
I have successfully removed it without any visible (so far) side effects.
Can anyone elaborate on it’s importance (if at all)
It’s not so much about how the app behaves on your computer, but how it will behave on other computers, or when you install an updated dotnet runtime on your machine.
Basically, if you don’t include this, the latest version of the dotnet runtime will be used to run your app. That might sound like a good thing, until some feature that you depend on becomes deprecated or a bug that you don’t realize you’re depending on gets fixed.
More usefully, when you have originally built an app to work with an older version of the dotnet framework, you can use this feature after you’ve tested it with newer versions to assert that, yes, it does work with the latest version.
Here’s the horse’s mouth text from MSDN: