4

Using Visual Studio 2015 update 2, creating a new ASP.NET 4.x application, the default .Net "Target framework version" is 4.5.

Is it a mistake to bump this to 4.6? I did my own research, and I am unclear.

It seems to me, that if .Net 4.6.1 is the newest, it should be the default. It is not. And it almost feels like the subtle message is "don't use .net 4.6.1, unless you know what you gain and what you loose, when your app reaches deployment" and I can't figure out why.

I suspect the reason is that choosing 4.5 means you could deploy in more places even on operating systems where 4.6.1 is not an option, but I can't seem to find any confirmation of this reason for the default.

1
  • 2
    It seems to pick the most recent .NET version you've used for a project. Mine actually was choosing .NET 4 for projects. I think if you change it for a project, it'll be changed in the next one, though VS can be weird about how it saves those kind of changes if you have multiple instances open.
    – Kyralessa
    Apr 14 '16 at 20:38
1

Have a look in HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\NewProjectDialog where the FxVersion key will contain the default framework choice.
You could change it to a higher version and find out if it's a mistake or not. Probably not. You'll get a bunch of features & fixes in any case.

Here are the Release Notes for .NET Framework 4.6.1, the Visual Studio 2015 Update 2 Release Notes and Visual Studio 2015 Update 2 Known Issues for more information.

As to why this defaults to 4.5: if I'm not mistaken Visual Studio will remember your last targeted framework so it might be as simple as that. Then again maybe the installer for Update 2 simply doesn't set the registry value due to an oversight or it might even be deliberate.

Perhaps you can direct your question to the Visual Studio Editor forum or even send the team a message on Twitter if you want to be sure.

I'm aware that this isn't a definitive answer per se but perhaps it'll point you in the right direction.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.