Will Visual Studio 2012 interfere/break .NET 4 and/or Visual Studio 2010 if installed side-by-side on the same instance of Windows?
-
1yes, both works, even same time. I tried.– Eric YinAug 18, 2012 at 9: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.– VaccanoAug 29, 2012 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 SaundersAug 31, 2012 at 14:40
-
ahhhh the luxury of a customer that provides a useful test environment! Good luck with that :P– JumpingJezzaOct 24, 2012 at 3: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 CamilleriNov 14, 2012 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
-
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. Apr 24, 2012 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: social.msdn.microsoft.com/Forums/en-US/wpf/thread/…– VaccanoJun 14, 2012 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. Jul 6, 2012 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.– VaccanoAug 29, 2012 at 15:45
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. Aug 31, 2012 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.)– VaccanoAug 31, 2012 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.)– VaccanoAug 31, 2012 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. Aug 31, 2012 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. Aug 31, 2012 at 18:53
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.
-
2I just posted something in the forums [social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/… 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– DamianSep 19, 2011 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. Sep 24, 2011 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
-
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. Jun 8, 2012 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: microsoft.com/en-us/download/details.aspx?id=23691 Jun 14, 2012 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.
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
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!
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.
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.
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.
-
Can you be more specific about what problems you're referring to? Aug 31, 2012 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.
-
Can you be specific about what "tests from VS2010" you're referring to? Aug 31, 2012 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.– fusiOct 28, 2015 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.
I've noticed that Web & Loadtesting solutions appear broken after VS2012 install. Have taken copies and upgraded to 2012 and they work fine. It's just VS2010 can no longer initiate a test run.
Yes, you can also easly open a project from 2012 in 2010 without issue. as long as its still using .net 4.0.