Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is Windows Installer 4.5 required by .NET Framework 4 when publishing with ClickOnce

When I publish a .NET 4 app using ClickOnce I get this warning if I uncheck "Windows Installer 4.5 in the Prerequisites window:

Item 'Windows Installer 4.5' is required by 'Microsoft .NET Framework 4 (x86 and x64)', but was not included.

The app publishes and the old version gets updated just fine but I'm wondering why is this warning message displayed, what exactly does it mean and are there any possible side-effects of not including this prerequisite?

As far as I know, Win 7 or later ships with Windows Installer 5 and there will be no client computers with Win XP or earlier so am I correct in assuming not including Windows Installer 4.5 should be fine?

like image 548
Dean Kuga Avatar asked Dec 04 '14 22:12

Dean Kuga


People also ask

How do I include prerequisites with a ClickOnce application Visual Studio 2022?

To specify prerequisites to install with a ClickOnce application. With a project selected in Solution Explorer, on the Project menu click Properties. Select the Publish pane. Click the Prerequisites button to open the Prerequisites dialog box.

What is ClickOnce bootstrapper?

The . NET Framework 4.6 ClickOnce Bootstrapper package updates the prerequisite components list in Visual Studio 2013 by installing the required files that enable Visual Studio 2013 to offer the . NET Framework 4.6 entry in the list of available prerequisites.


1 Answers

The installer is required for PCs running Windows Vista or earlier to install .NET Framework 4. Because you have included a dependency on .Net 4, the clickonce publisher is telling you that you should also include the installer in the prerequisites so it can be installed before installing the framework, just in case your app is installed on a pre-Windows 7 PC that doesn't already have the framework installed - as otherwise your app would fail to install.

As you say, Windows Installer 5 is included in Windows 7, so if your app is for internal company use only and will never be installed on any earlier operating system than that, then you can indeed uncheck the box, but why would you? It's not as if Windows will downgrade the installed Windows Installer version just to install the framework, so you might as well leave it checked.

In short, you may know that there will never be any client computers with Vista or earlier, but the publisher doesn't.

What I can't answer, though, is why the publisher wants Windows Installer 4.5 when the documentation for .Net 4 states it requires Windows Installer 3.1..

like image 53
stuartd Avatar answered Oct 13 '22 00:10

stuartd