Home > Software engineering >  .NET 7 application prompts for both Microsoft.NETCore.App and Microsoft.WindowsDesktop.App
.NET 7 application prompts for both Microsoft.NETCore.App and Microsoft.WindowsDesktop.App

Time:01-13

I've created a WinForms application using .NET 7 ("framework-dependent"). After installation to a computer without .NET 7, the user is prompted to first install the Microsoft.NETCore.App framework when first running the application, but when trying to run the application after this they get another prompt to install the Microsoft.WindowsDesktop.App framework. The application then runs fine after the second install.

Why are there 2 separate prompts? Some users seem to be getting confused since the prompts look similar and they think they are being asked to install the same thing again. Is there a way to reduce this to just one prompt?

The application is composed of a single WinForms project: TargetFramework is net7.0-windows

The install files are produced with 'dotnet publish': -r win-x64 --self-contained false -p:Configuration=Release -p:PublishSingleFile=true -p:Platform=x64

The install is created with InnoSetup.

CodePudding user response:

There is not enough info at the moment to give a definite answer but here are several possibilities that can in theory result in this behaviour (assuming you have WinForms app):

  1. One of the referenced nugets requires the ASP.NET Core runtime (enter image description here

  • Related