We are still using VS 2010 SP1 to develop a large scale LOB ASP.NET web application. The infrastructure folks are looking at pushing .NET 4.6 (and the targeting pack to devs) to the desktop and I am having trouble finding anything on compatibility with VS 2010. One of the leads here said the two are incompatible and cannot be used together and that you must have VS 2012 or higher but I can't find anything official on the topic. Anyone know if it is possible to use .NET 4.6 and VS 2010 SP1 for development?
Visual Studio 2010 does not support the 4.6 targeting pack. When the targeting pack is pushed to the machine, Visual Studio 2010 will not see it.
Now, this isn't actually a problem if you want to remain on a supported version of .NET (which is probably why your infrastructure folks are doing what they are doing), because even if you target 4.0, you can remain supported by deploying 4.6 and running your 4.0 application on it. We shim 4.0 behavior in this case, so when you're testing on a machine with just 4.0, you can be guaranteed that the application will run with high confidence on 4.6.
However, what I see devs run into a lot, is when they target 4.0, but test on a machine with 4.6 installed, then expect to be able to deploy to 4.0 and have this just run. In this case, there's not a 100% guarantee that this will work as we do not shim every single bug fix and/or feature. This means you can accidentally pick up 4.6 behavior, and rely on it.
To summarize:
If you target 4.0, test on 4.0 and deploy to 4.0/4.6 -> We guarantee that this works with pretty high confidence.
If you target 4.0, test on 4.6 and deploy to 4.6 -> We guarantee that this works with pretty high confidence.
If you target 4.0, test on 4.6 and deploy to 4.0 -> This will work in most cases, but you could accidentally depend on "fixed behaviors" that aren't fixed on 4.0.
Visual Studio does support multi-targeting. For example, if I were using Visual Studio 2012 I could install the 4.6 multi-targeting pack to develop a 4.6 application.
However, the download instructions for the 4.6 multi-targeting pack do not mention support for Visual Studio 2010, just 2012 and 2013:
The .NET Framework 4.6 Targeting Pack is a package that enables developers to build applications targeting the .NET Framework 4.6 by using either Visual Studio 2013, Visual Studio 2012 or third-party IDEs
That's as close to any documentation as I've found. This leads me to believe that no, support for 4.6 multi-targeting does not exist for Visual Studio 2010.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With