Create a single EXE application that uses .NET Core

Learn how to use one single EXE application easily create new features in .NET Core is completely self-contained.

One of the new features in .NET Core 3.0 really cool is that you can build EXE file that contains the entire application easily. The merger will contain all .NET Core EXE files, which means you do not need to install any file on the client computer. You do not know whether a particular framework also installed (we all know that "the application requires one of the following .NET Framework version" message). For those who need to run their applications on multiple computers and people do not know what's installed, I believe this is a great feature. Support personnel can benefit from, for example, when they need a specific version of the test on the client computer.

In this blog, I want to use one of our sample application program to demonstrate this feature. I have HotelApp from Telerik UI for WinForms   demo application migration    to .NET Core 3.

In the latest preview version of Visual Studio 2019, no longer need to use the command, you can do this from the UI. First, right-click the project, and then click "publish" and then select the folder and click "Create."

Click the Edit button to edit the configuration.

In the release configuration, you can check a single EXE option.

When ready, click Save and publish. Now, you can go to publish folders and get your application. I have tested this application on multiple computers, and the application is no problem. The entire package large (200MB), but includes all the assemblies needed.

来自:https://www.telerik.com/blogs/creating-a-single-exe-application-with-net-core

Guess you like

Origin www.cnblogs.com/djd66/p/12190408.html