Try our conversational search powered by Generative AI!

[Help] Updating targetFramework to 4.7.2


Hi All,

I'm trying to update our existing site's target framework from 4.6.1 to 4.7.2.

Should be simple right? Following swapcode's instructions I change the target framework, reinstall packages, clean and rebuild the solution and I should be good.

But, I'm not. I get a 500 error. Nothing in the the logs (even with logging level set to all), and nothing in the logs or traces from IIS Express. Build generated no warnings.

I've manually cleaned /bin and /obj several times in between building and rebuilding. I've had a look at the individual references and many of them seem to ref their /net461 locations, but then when I go looking in the package files there isn't a netstandard alternative.

What am I missing or not doing properly?

Thanks in advance!


Jun 15, 2020 15:32

Hi Alex,

Which version of Episerver you are using? and Is this compatible with the framework you are trying to use?

Jun 15, 2020 15:46

Hello Alex

Are you getting a YSOD? Have you switched off all error handling in the application? If you are getting the default IIS error then you might have an issue with web.config. You can look in the Windows Event logs for the error if so.


Jun 15, 2020 16:01

Ravindra, that is a good question: I had checked the requirements and I though it said 4.6.1 and higher. But now that a I read it again the page clearly says:

Note: After 2015, Microsoft .NET Framework 4.5.0 and 4.5.1 are not supported. From CMS 11, 4.6.x is required.

So does that mean for CMS 11 I am fixed to 4.6.x ?

David, I hadn't even considered looking in Event Viewer! Doh!

There are a few packages (such as LanguageManager, Find.UI, ImageProcessor.Web) that are erroring when loading .NET Types:

System.IO.FileNotFoundException: Could not load file or assembly 'System.Net.Http, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Net.Http, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

And I look at the References and System.Net.Http has a path of C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.Net.Http.dll which doesn't exist on my machine. So that looks like I don't even have 4.7.2 installed!

Thanks for the pointers, i'll continue down this rabbit hole and see where I end up :)


Jun 16, 2020 8:28

After cruising around in dll hell for a while I finally managed to get the site working again! Event Viewer helped me see the wood for the trees! Thanks again David.

Jun 16, 2020 9:59
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.