.NET Desktop Runtime is required before installation

Viewed 504

I've developed an application in .NET 5.0, also, I've a Setup Project to install this application in my clients.

My steps are:

1.- Publish the .NET 5.0 Application. 2.- Compile the Setup project. 3.- Install the setup.exe generated in "2" in the client.

But when I try to install the program in my client, windows says "This installation requires the 5.0.0(x64) version of .NET Desktop Runtime... So I've to download and install the SDK in every client.

My question is: There is some way to avoid this SDK installation? Can I embeed the .NET Desktop Runtime in the .NET 5.0 App or in the Setup Project?

Thanks in advance.

2 Answers

See .NET application publishing overview, specifically publishing a self-contained application. That way all necessary framework files will be included in your application, and you will not the framework to be installed. This will increase the disk requirement a bit if .Net 5 is already installed, since some files will be duplicated.

The alternative is to bundle the the .Net framework installer in your installation script. This will cause the setup-file to be quite a bit larger, unless the script downloads the framework on demand. But it may save some disk space in case there are multiple applications that use .Net 5.

Go on projet Menu/ projetct properties / publish / require components / uncheck you frameWork .

enter image description here

enter image description here

Related