Run the dot net 3.5 app on Windows 10

I created a WPF application that should run on Windows 7, 8, 8.1, 10.

In Visual Studio, I installed the .NET Framework 3.5 because it comes with Windows 7. However, when I run it on Win10, it offers to install .NET 3.5 because Win10 comes with 4.6 and does not have 3.5 installed by default.

How can I run the application on all versions of Windows> = 7 without receiving any requests from Windows and without installing any?

+4
source share
3 answers

IT CAN WORK, found a solution:

We need to modify the app.config file and put the lines below in it:

<startup>
 <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
 <supportedRuntime version="v4.0"/>
 <supportedRuntime version="v2.0.50727"/>
</startup>

, , .net , .

CATCH: ProgramName.exe.config , ProgramName.exe , ..

+5

, +.NET 4.5 . , .

+1

, . Windows 10 .net. Microsoft , (, Chrome), ( / , , Microsoft ++/.NET )

0
source

Source: https://habr.com/ru/post/1619174/


All Articles