The main reason why web applications have grown in popularity, eclipsing their desktop cousins, is the problem of deployment. It sounds a trivial issue on the face of it, but it definitely is not. There have been many attempts to solve the problem, from technologies such as ClickOnce to the App Store model (of UWP, Apple, and Google). One of the reasons why this is so difficult in the desktop world and so simple in the web world is that, while both may have a complex tree of dependencies, the web allows those dependencies to mostly live on the server, so they don't need to be directly deployed to the client machine.
One useful feature in .NET Core 3 is the ability to bundle all of your dependencies into a single executable.
In .NET Core 3, we can compile our project into a single executable by adding the following line to the .csproj file:
<PublishSingleFile>true</PublishSingleFile> <RuntimeIdentifier>win-x64</RuntimeIdentifier> <PublishReadyToRun>true</PublishReadyToRun>
When you publish the application, you'll get a single executable.
You can even reduce the size of this executable by using built-in tree shaking. This is the process of removing dependencies that are not used by the application; this requires the following additional line in the .csproj file:
<PublishTrimmed>true</PublishTrimmed>