Will Visual Studio 2012 interfere/break .NET 4 and/or Visual Studio 2010 if installed side-by-side on the same instance of Windows?

- 347,512
- 102
- 1,199
- 985

- 29,502
- 35
- 121
- 166
-
1yes, both works, even same time. I tried. – Eric Yin Aug 18 '12 at 09:08
-
3Visual Studio can be installed side by side, but realize that VS 2012 comes with .NET 4.5, which overwrites .NET 4.0. Not a problem unless you still need to develop for .NET 4.0 machines. – Vaccano Aug 29 '12 at 15:49
-
4You can still develop for .NET 4.0 machines. You just have to know that, when you're testing your .NET 4.0 application on your VS2012 machine, you will be testing a different version of .NET than a customer who has never installed .NET 4.5. So test on a machine like those your customer will use, and you'll be ok. – John Saunders Aug 31 '12 at 14:40
-
ahhhh the luxury of a customer that provides a useful test environment! Good luck with that :P – JumpingJezza Oct 24 '12 at 03:12
-
11it is a mistake to think that .NET 4.5 is fully compatible with .NET 4.0, it is not, and in fact in our case, it has broken a few of our solutions. – Stefan Z Camilleri Nov 14 '12 at 17:53
15 Answers
As Reigo said, yes. Here's the link to the official Microsoft page with the information Reigo provided, and more details: http://msdn.microsoft.com/en-us/library/ms246609%28v=VS.110%29.aspx

- 558
- 3
- 8
-
36It "can" be installed along side, meaning the installer will successfully run. However, you should not do this unless you want to spend two days uninstalling Visual Studio, .NET 4.5, repairing your .NET 4.0 framework (which DOES get directly modified by the 4.5 beta install), and uninstalling the plethora of SQL Server 2012 tools one by one. All after your previously working 4.0 code starts bombing out with an "Object Reference" error on a line that only contains a comment. – mclark1129 Apr 24 '12 at 12:31
-
8This is very very dangerous if you plan to continue to develop for .net 4.0. This is because your development machine will use the .net 4.5 binaries (because .net 4.5 is an in-place upgrade). These binaries have bug fixes that will be "hidden" from you while debugging targeting .net 4.0. But when you deploy to a machine running only .net 4.0 (ie windows xp) then those **bugs are not fixed for your user**. See this post for more details: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/c05a8c02-de67-47a9-b4ed-fd8b622a7e4a/ – Vaccano Jun 14 '12 at 17:55
-
2Try it in a virtual machine. I can confirm the problems Mike C described. I assumed VS2012 would be safe to try. I ran into so many annoying problems I ended up not trusting my machine and reinstalled Windows. – kenchilada Jul 06 '12 at 15:48
-
2
-
1@TimFriesen - The issue I described is still in the RTM. It is a design flaw with the "in-place" upgrade plan that Microsoft has adopted for .NET 4.5. – Vaccano Aug 29 '12 at 15:45
-
1@TimFriesen: the problem described by Vaccano only matters if you do your testing on your dev machine. If you do your testing in the environment your customers run in, then you don't have this problem. – John Saunders Aug 31 '12 at 14:42
-
@Mike C: is situation different if I already have 2012 installed and now want to install 2010? Maybe it is better I remove 2012 and install only 2010. Later if I need 2012, I will remove 2010 and install 2012? – Giorgi Moniava Aug 17 '15 at 15:20
-
@Giorgi. NET 4.5 is longer in beta, so I expect the situation is very different regardless of the order you install in. I am much more comfortable installing 4.5 on my machine now than when it was in its beta. In genreral, I would still recommend against installing a beta version of .net on any main development machine. – mclark1129 Aug 17 '15 at 15:25
-
1No. At the time installing 2012 required installing .NET 4.5 beta. That's the part that made installing 2012 dangerous, not really VS itself. There should be no problem with installing 2010 alongside 2012, although I'd question if it was really necessary (considering 2015 is now released). – mclark1129 Aug 17 '15 at 16:02
The .net 4.5 release is an In-place upgrade.
This means that the binaries for .net 4.0 will be REPLACED by the binaries for .net 4.5.
Microsoft has attempted to mitigate the problems this causes by making a "Target .net 4.0" feature. But this is very different from the targeting previous versions of .net (which have been side by side since .net 2.0).
Because it is a in-place upgrade, "Target .net 4.0" cannot really target it. The best they can do is try to manually remove some "features". They have done this (Scott Hanselman had a blog post covering this).
But don't let this fool you into thinking you are really using .net 4.0. Any bugs fixed by .net 4.5 will be fixed on your development machine and not for your .net 4.0 users.
So if you are developing an application "targeting .net 4.0" and you have .net 4.5 installed then you are at risk. If you accidentally use a fixed bug, it will not break for you while debugging.
When you deploy your app to a machine running only .net 4.0 (ie windows xp) then those bugs are not fixed for your user.
For all intents and purposes, those fixed bugs are now "Hidden Bugs" (for developers that still need to target .net 4.0.
The best part is that it does not matter if you use VS 2010 or VS 2012. Once .net 4.5 is installed the bugs are hidden.
See this post for more details: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/c05a8c02-de67-47a9-b4ed-fd8b622a7e4a/
-
Sorry, but this is hiding the point of the problem. The problem only exists if you depend on your tests on your development machine to tell you when your application works. If you can test in the environment your customers will use (and I think most developers are in this position), then you don't have this problem. If you have any second machine to test on, including a virtual machine, then this is not a problem. – John Saunders Aug 31 '12 at 14:44
-
4@JohnSaunders - We have a whole QA department that tests on our target platform. But many studies have shown that the different kinds of testing catch different kinds of bugs. The stuff I look for when debugging is not the same level of bugs my QA team is going to find. Again, my automated tests are not going to notice all the things I will notice while debugging. And lastly, writing up a feature that depends on a bug that you can't fix costs $$$. When the bug is found, the further from my development machine it is the more it costs. (Especially if I have "finished" the feature.) – Vaccano Aug 31 '12 at 17:23
-
"The problem only exists if you depend on your tests on your development machine to tell you when your application works" -- Are you implying that you don't test your code on your development machine? -- This is a real problem. Especially for those who don't know about it. (And since Microsoft will not publicly announce it, that is many many developers.) – Vaccano Aug 31 '12 at 17:55
-
The tests that I perform on my development machine do not determine whether my code works or not. They only determine how likely it is that the QA department will find my bugs in the first five minutes or not. I test on my own machine in order to reduce embarrassment. It's the automated unit tests in the builds, and the real tests by QA that determine whether or not my code ships to customers. Those tests will include tests in an environment like that of the customers. In this case, that would include Windows XP and .NET 4.0. – John Saunders Aug 31 '12 at 18:39
-
I'm sorry, but if you've got a QA department, then I don't see your problem at all. I can't imagine there are so many .NET 4.0 bugs fixed by .NET 4.5 that it would cost you very much money if you happened to write code dependent on those bugs. If you think you'll have that problem, then test early and often on Windows XP and .NET 4.0. It's those developers who will never see the bugs who are at greatest risk. – John Saunders Aug 31 '12 at 18:53
-
@JohnSaunders - I just don't understand this. If you don't test on your machine to see if it works or not, then why not just copy "Lorem Ipsum" in there and release it? Debugging is where you start! If it you cannot prove it works there then you are accepting that you can dump junk on your QA team and the only cost is your "embarrassment". – Vaccano Aug 31 '12 at 18:58
-
I test on my machine to decide whether the code is ready to go to QA. QA tests to decide whether the code is ready to go to the customer. QA will always test more scenarios than I will. In this case, they will test the ".NET 4.0 on Windows XP" scenario. Because of this, I feel there is very little practical impact, even if I inadvertently create code that depends on a bug which was fixed by .NET 4.5. – John Saunders Aug 31 '12 at 19:14
-
@JohnSaunders - Clearly you think it is OK and I do not. I doubt either one of us is going to be convinced via Stack Overflow comments. – Vaccano Aug 31 '12 at 20:22
-
Just trying to clarify what the issues are. I had the impression your issue was different. Now I know. – John Saunders Aug 31 '12 at 21:02
-
It is just a bad idea to run "real" test runs on a development machine. Realistically a customer machine would be very different in many ways. – doug65536 Dec 18 '12 at 06:02
I've been burned badly by VS betas, never not had a nasty problem getting them uninstalled. Microsoft makes fine software but the installer seems to always be the very last thing taken care of. Problems I've seen is the uninstall not removing components that then screws up the retail edition and the installer not counting on other installed Microsoft products and destroying their configuration.
This one is far before a beta, do not install it on a machine you need to get your job done. Which pretty much precludes having VS2008 installed. VM is fine of course.

- 922,412
- 146
- 1,693
- 2,536
-
2I just posted something in the forums [http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/909b16ff-9740-4976-be06-982654588db5] because it seems that the install replaces .NET Framework 4.0 assemblies (I thought I must have been crazy but opening up System.Core in Reflector revealed that System.Runtime.CompilerServices.ExtensionAttribute was missing). In short be careful out there – Damian Sep 19 '11 at 16:37
-
@Damian: It's the some problem as it was with 3.0 and 3.5: Both essentially only were additional features based on 2.0 runtime **but** both of them came along with a 2.0 service pack (which could be downloaded separate for 2.0 only installations) which indeed changed some things under the hood. Looking at 4.0 it is even worse: Microsoft just silently shipped some new versions via Windows Update -- original 4.0.30319.1 was replaced with .225, .235 and .237 -- each of them fixing and introducing bugs or at least different behavior in specific areas. – springy76 Sep 24 '11 at 11:45
I installed the RC yesterday, and found the following:
It causes VS2010 to freeze when running unit tests (this can be worked around by using 2012, or mstest on the command line to run your unit tests)
It causes VS2010 not to be able to compile C++ projects, failing with a link error. Even after uninstalling VS2012 RC, this problem still persists... so I'd advise strongly against installing it right now

- 1
- 1

- 121,657
- 64
- 239
- 328
-
1I had the same issue with running unit tests in VS 2010 after I installed VS 2012 RC. To fix this, delete testimpactdata.sdf from root of your solution and turn on Test Impact in your test settings. – Sergey Sirotkin Jun 08 '12 at 22:04
-
2I ran into the testing problem that you're describing too. The solution I found was to upgrade to Visual Studio 2010 Service Pack 1. Apparently that's an issue in 2010, not 2012, but it's just triggered by installing the 2012 release candidate. You should be able to install the service pack even after VS 2012 is installed, and still get the problem fixed. I don't do much with C++ these days, so I can't comment if that is fixed too. VS 2010 SP1 can be found here: http://www.microsoft.com/en-us/download/details.aspx?id=23691 – rbwhitaker Jun 14 '12 at 23:29
So reading all answers, it comes down to this:
- After installing VS2012, .NET 4.5 will overwrite .NET 4.0.
- You can still use VS2010, but it will compile against .NET 4.5 (since .NET 4.0 is replaced).
- Danger: You can no longer safely deploy your projects on machines that run .NET 4.0.

- 19,223
- 13
- 68
- 84
Yes you can, but its always recommended to install earlier versions first. And if you want to open the Visual Studio 2010 project in VS 11, and then later back again, make sure you don't use Visual Studio 11 new features

- 741
- 9
- 21
It can definitely cause problems. For example:
In .NET 4.0, whenever one tries to save an enum value in LINQ-2-Entities, jup, you guessed it: ERROR when you have 4.0 GREAT SUCCESS when working on machine with 4.5 installed (yes even though the assembly targets the 4.0 client profile!)
So pay attention when using this good new feature that has no reverse compatibility whatsoever.

- 64
- 5
It works well on 32-bit machine installing side by side but sometime you can get error but reinstalling or uninstalling previous installation it can be installed. I did it during middle of the project and it do not effect previous work also.

- 21
- 1
I did it yesterday, and uninstalled it today...
Apparently, something went wrong because some apps that I built before started giving strange errors regarding "unable to load module bla bla bla...", so I uninstalled everything, forced the reinstallation of .NET Framework 4.0 and now all works fine again!

- 7,185
- 4
- 27
- 35
As was stated, officially you can but it can cause problems.
If you want to run Visual Studio 2012, I think the safest way is to use the free WMWare VMplayer and install Windows 8 on it then install Visual Studio 2012 there. You need at least 4 GB of RAM but runs better with 8 GB or more. That's what I do anyway.

- 5,419
- 2
- 25
- 31
-
Can you be more specific about what problems you're referring to? – John Saunders Aug 31 '12 at 14:45
My main problem has been that one can no longer run unit tests from VS2010 after installing VS2012 RTM! It just hangs forever. Cannot even stop it.
So for now I would say, MS did it again, side-by-side does not work.
I think this may be due to this being a VS2010 installation without SP1 applied.

- 3,949
- 1
- 34
- 38
-
Can you be specific about what "tests from VS2010" you're referring to? – John Saunders Aug 31 '12 at 14:44
-
i also have this issue - attempting to look at any test output results in a reproducible hang in both vs2010 and vs2013 (all latest patches/updates). i expect better from you microsoft. – fusi Oct 28 '15 at 12:57
The good news is the install makes a system restore point. External hard drive backup is the solution to this till a real version comes out or you are starting a project from scratch.

- 609
- 7
- 12
Yes, you can also easly open a project from 2012 in 2010 without issue. as long as its still using .net 4.0.

- 8,683
- 14
- 66
- 85