Can Visual Studio 2012 be installed side-by-side w/ Visual Studio 2010?
Asked Answered
T

15

104

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

Terrilynterrine answered 15/9, 2011 at 3:15 Comment(5)
yes, both works, even same time. I tried.Exuberate
Visual 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.Triplane
You 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.Amalburga
ahhhh the luxury of a customer that provides a useful test environment! Good luck with that :PEchino
it 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.Vivien
G
32

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

Galvano answered 15/9, 2011 at 10:19 Comment(9)
It "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.Galactopoietic
This 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/…Triplane
Try 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.Authentic
Do these issues still exist with VS 2012 RTM?Waterproof
@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.Triplane
@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.Amalburga
@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?Ify
@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.Galactopoietic
No. 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).Galactopoietic
T
30

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/

Triplane answered 14/6, 2012 at 18:6 Comment(10)
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.Amalburga
@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.)Triplane
"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.)Triplane
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.Amalburga
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.Amalburga
@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".Triplane
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.Amalburga
@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.Triplane
Just trying to clarify what the issues are. I had the impression your issue was different. Now I know.Amalburga
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.Yonne
Z
10

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.

Zebu answered 15/9, 2011 at 3:15 Comment(2)
I 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 thereClinical
@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.Alsatia
C
7

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

Carvel answered 4/6, 2012 at 21:36 Comment(2)
I 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.Maharani
I 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=23691Acoustics
P
6

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.
Palacios answered 25/6, 2013 at 9:51 Comment(0)
H
5

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

Heim answered 15/9, 2011 at 4:21 Comment(0)
D
2

It can be installed side-by-side but it's not even beta..! Don't expect it to actually work!

See this problem we're having, and this mentioned by Damian in another comment.

Decarburize answered 22/9, 2011 at 21:23 Comment(0)
J
2

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!

Julietajulietta answered 2/3, 2012 at 16:33 Comment(0)
S
2

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.

Sonorant answered 16/10, 2012 at 11:16 Comment(0)
H
2

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.

Hassler answered 1/12, 2012 at 12:35 Comment(0)
R
0

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.

Rinarinaldi answered 7/7, 2012 at 20:30 Comment(1)
Can you be more specific about what problems you're referring to?Amalburga
S
0

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.

Szeged answered 17/8, 2012 at 8:18 Comment(2)
Can you be specific about what "tests from VS2010" you're referring to?Amalburga
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.Pourparler
E
0

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.

Emmerich answered 7/9, 2012 at 17:34 Comment(0)
C
0

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.

Carpo answered 24/4, 2013 at 13:47 Comment(0)
A
-1

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

Aerophobia answered 1/9, 2012 at 11:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.