Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing WPF application on machine without .NET Framework 4

I am using Visual Studio 2010 to create a Setup package to install a WPF application. I can see that I can add the .NET framework 4.0 as a pre-requisite, but how do I get his to run automatically without manual intervention?

Do I have to create a small program (that targets framework 1.1 as I assume most machines have 1.1) that detects if .NET framework 4.0 is there and if not install it silently, or can I get the installer to do this.

I also have to install the OLEDB 12 drivers because I'm connecting to an Access 2007 database, so I will also have to run this installer before my application is run.

I don't want the install to download and install the framework, I want to include the framework redistributables with the setup.

Any help would be appreciated.

Thanks

like image 942
Adrian Avatar asked Aug 20 '10 04:08

Adrian


People also ask

Does WPF use .NET framework?

The WPF development platform supports a broad set of application development features, including an application model, resources, controls, graphics, layout, data binding, documents, and security. It is a subset of the . NET Framework, so if you have previously built applications with the .

Does .NET 5 support WPF?

It has support for all kinds of . NET applications, including the Windows desktop platforms such as WPF, Windows Forms, and WinUI 3.0. In this article, I'll talk about what . NET 5 means for desktop developers and how to migrate your existing applications to .

Is WPF still relevant 2022?

“WPF would be dead in 2022 because Microsoft doesn't need to be promoting non-mobile and non-cloud technology. But WPF might be alive in that sense if it's the best solution for fulfilling specific customer needs today. Therefore, having a hefty desktop application needs to run on Windows 7 PCs with IE 8.


2 Answers

You want to do bootstraping, using visual studio 2010 and .net framework 4, as explained here.

like image 131
louisgab Avatar answered Nov 09 '22 22:11

louisgab


You need to include .NET redistributable executable in your setup package. Check this article - its talking about Widows App, VS 2008 & .NET 3.5 but same thing should apply to you as well as.

like image 21
VinayC Avatar answered Nov 09 '22 23:11

VinayC