Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run dot net 3.5 application on Windows 10

I have created a WPF application which should natively run on Windows 7, 8, 8.1, 10.

In Visual Studio, I have set .NET Framework to 3.5 as it is bundled with Windows 7. When I run it on Win10, however, it prompts to install .NET 3.5 as Win10 is bundled with 4.6 and does not have 3.5 installed by default.

How can I make my application run on all Windows versions >= 7 without getting any prompts from Windows and without installing anything?

like image 893
Sukrit Gupta Avatar asked Dec 09 '15 09:12

Sukrit Gupta


People also ask

How do I install NET Framework 3.5 on Windows 10 64 bit offline?

NET framework 3.5 in Windows 10. Download the file, extract it from the ZIP archive to the Desktop, right click it and choose Run as administrator. The file will install . NET Framework 3.5 automatically after finding the drive letter of your Windows 10 installation media.

How do I know if .NET 3.5 is installed on Windows 10?

It is essential for users to install and enable . NET 3.5 in their Windows system. To determine whether . NET 3.5 Framework is installed, users can check the path:C:\Windows\Microsoft.NET\Framework64 to see whether they can find the folder v3.


2 Answers

IT CAN WORK, found the solution:

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

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

It decides from top to bottom, whichever first version of .net is found as per above list it works on that.

CATCH: After building, a ProgramName.exe.config file is made in release folder, we need to copy it with our ProgramName.exe to the system in which we want to run..

like image 63
Sukrit Gupta Avatar answered Oct 31 '22 07:10

Sukrit Gupta


You can create an installer that installs your app + .NET 4.5 to client's computer silently. That way your app will run seamlessly on every OS.

like image 44
Fandi Susanto Avatar answered Oct 31 '22 06:10

Fandi Susanto