Reputation: 448
I have WPF app targeting .NET 4.5 but anytime I lunch the app this dialog popup.
here are my app.config settings
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
How to stop showing this dialog? Is it required to install .NET 3.5 while targeting .NET 4.5?
This is happening on windows 10, didn't test for others. And the app run and work correctly without installing .NET 3.5
Upvotes: 3
Views: 534
Reputation: 4376
If your operating system is Windows 8 or does not have .NET 2.0.....
And your code depends in any way on .NET 2.0, 3.0, 3.5.....
Than it means it NEEDS .NET 2.0 to run.
Thus it will prompt you to install .NET 3.5.
This is documented by microsoft:
Windows 8 Behavior and UI The CLR activation system provides the same behavior and UI on Windows 8 as it does on other versions of the Windows operating system, except when it encounters issues loading CLR 2.0. Windows 8 includes the .NET Framework 4.5, which uses CLR 4.5. However, Windows 8 does not include the .NET Framework 2.0, 3.0, or 3.5, which all use CLR 2.0. As a result, applications that depend on CLR 2.0 do not run on Windows 8 by default. Instead, they display the following dialog box to enable users to install the .NET Framework 3.5. Users can also enable the .NET Framework 3.5 in Control Panel.
Scroll almost all the way to the bottom of this article to the title: Windows 8 Behavior and UI
Upvotes: 1