Upgrading Website Project from .NET 4.0 to .NET 4.5

John Fu asked on February 11, 2015 13:43

We've installed Kentico 8.1 as a .NET 4.0 website project. Done quite a bit of dev on it already, and now we want to build an api on top if it and am running into a couple of issues.

When we create a new project in the solution, and added references to the Kentico dlls that lives in either the Lib folder or the /CMS/bin folder, we run into issues when compiling. It warns that the references won't work because the dlls were compiled in .NET 4.5 and we're trying to use it in .NET 4.0.

So the question I have is, has anyone tried upgrading your website project from .NET 4.0 to .NET 4.5? And if so, what are the steps? Is there doco out there that guides you through the process? I can't imagine it being as simple as editing the Website project properties and just switching the framework to .NET 4.5. There'd be some changes that needs to be made in the web.config also wouldn't it?



Recent Answers

Brenden Kehren answered on February 11, 2015 21:40

Think the web.config will be fine, you will want to get all the .net 4.5 Kentico DLLs which you can typically find in the Kentico install directory (C:\Program Files (x86)\Kentico\8.x\Webinstaller\Versions\Bin) and replace the ones currently in you project with the 4.5 ones. Then you'll want to do as you stated and simply change the properties of the solution/website.

2 votesVote for this answer Mark as a Correct answer

Virgil Carroll answered on February 12, 2015 16:28

I concur with Brenden. I did this (but don't have any documentation), but basically making the necessary changes to the web.config and upgrading the connection to the .net 4.5 DLLs does the trick. The only situation you would have to worry about is any custom DLLs you have released. As long as they are tied to 4.0 then you should be fine because 4.5 is backwards compatible, but if you are using any of the 3.5 stuff (whcih 4.0 was backwards compatible with) you may run into some issues.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.