25

I have an existing web app using a combination of MVC and WebForms on .NET 4.0. I want to upgrade to 4.5 to take advantage of some new features in EF 5 (which require 4.5). A couple of questions to hopefully prevent breaking the live site:

  1. When I install .NET 4.5 to the hosting server, will it supercede 4.0, or will my 4.0 applications continue to run in 4.0 mode until I change them
  2. Are there any breaking changes in 4.5 that are likely to throw my 4.0 app offline
  3. If things go bad, can I backout of having installed 4.5?
just.another.programmer
  • 7,909
  • 8
  • 42
  • 83

2 Answers2

9
  1. Once 4.5 is installed then everything that used 4.0 before will use 4.5.
  2. There are a handful of compatibility issues that exist. Elegant Code describes the issue we ran into at work when upgrading to 4.5
  3. You have to uninstall 4.5 and then re install 4.0 in order to back out 4.5.
Kyle Nunery
  • 1,962
  • 18
  • 23
  • How can I confirm #1 is the case for us? We have a .NET 4.0 app that runs on a server with 4.5.1 installed too, and [this document](https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-configure-an-app-to-support-net-framework-4-or-4-5) contradicts your claim. "If the version of the .NET Framework that the app was built on is not present and a configuration file does not specify a version in a element, the app tries to run on the latest version of the .NET Framework that is present on the user's computer." – Garrett Bates Mar 22 '18 at 22:23
0

One small gotcha you should be aware of if it matters to you is this:

Visual Studio 2010 and Visual Studio 2012 share a format for solution and project file, which makes it very easy for teams who don't all use the same browser version, or for you to upgrade transparently.

However, as soon as you tie a project to .NET 4.5, Visual Studio 2010 will not be able to open or edit the project.

I learned this the hard way when I switched to .NET 4.5, in order to get access to some of the new HttpListener functionality, and lost access to Visual Studio 2010 and my old Rescharper license.

SAJ14SAJ
  • 1,666
  • 1
  • 11
  • 30
  • Be clear: the behavior described exists here ONLY for RTM versions of 2010. If you have SP1 for VS 2010, then it's the same solution format. – p.campbell Feb 10 '13 at 15:35
  • That is news to me--I simply reported my experience. Yes, my version of VS2010 is RTM, but Windows Update does not report any available updates, even after selecting "Check for Updates" in VS2010. But since I have long been using VS2012 I am not going to worry about it any more. :-) – SAJ14SAJ Feb 10 '13 at 18:08