After installing the Visual Studio 2019 preview, and the required .NET framework 4.7.2, I found that another (.NET) application does not start anymore, and gives me an error:

The value specified in System.Windows.Markup.StaticExtension caused an exception

This application is not mine, so I can't change the source code.

Is there a way to specify in the application's config file to not use 4.7.2, but 4.5 instead? I changed the sku version in the supportedRuntime section from 4.5 to 4.5.1 and 4.5.3 (which are both installed), but that didn't change anything.

<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.3" />

My OS is Windows 10 Enterprise, release 1709.

Here's a screenshot showing the .NET installs I have:

.NET Framework installations


Microsoft optional components

  • I think the required .NET framework version is defined during compilation or in the source code. So I don't think you can change that for the executable only. – Saaru Lindestøkke Dec 5 '18 at 10:33
  • @SaaruLindestøkke If that were the case it wouldn't have been 4.7.2 in the first place. – Berend Dec 5 '18 at 11:18
  • @Ramhound Thanks, I added a screenshot, and Yes, I probably meant targeting packs ;-). I also found out that my problem might be caused by having both 4.7.1 and 4.7.2 installed: developercommunity.visualstudio.com/content/problem/307924/…. I'm currently trying to find out what's the best way to uninstall 4.7.1 – Berend Dec 6 '18 at 8:11
  • @Ramhound Windows 10 Enterprise, release 1709 – Berend Dec 6 '18 at 12:42
  • @Ramhound Correct, that's exactly what I did. I now have 4.7.2, and I think I want to revert to 4.7.1. Uninstalling VS2019 didn't help here, and neither did running the 4.7.1 offline installer with the /repair or /uninstall option – Berend Dec 6 '18 at 13:21

There is no answer to my question, simply because it is not possible to have more than one 4.x version installed at the same time. Any .NET application that targets 4.x will run using the latest installed version.

Reverting to 4.7.1 is not intuitive, because the 4.7 versions do not appear in the Add/Remove programs section of Windows. What I did was:

  1. Uninstall VS 2019
  2. Start appwiz.cpl
  3. Select Display installed updates
  4. Uninstall KB4073120, which is the .NET Framework 4.7.2 for Windows 10:1709
  5. Reboot

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.