Learn how to use one of the new features in .NET Core to easily create a single EXE app that is entirely self-contained.
One of the cool new features in .NET Core 3.0 is that you can easily build a single EXE file that contains the entire application. The merged EXE will contain all .NET Core files, and this means that you do not need to install anything on the client machine. You do not have to know if a specific framework is installed as well (we all know the “application requires one of the following versions of .NET Framework” message). I believe that this is a cool feature for people who need to run their applications on several machines and do not know what is installed. The support staff can benefit from it as well, for example when they need to test a specific version on the client machine.
In the latest Visual Studio 2019 Preview there is no need to use a command anymore, and you can do this from the UI. First, right-click on the project and then hit Publish, then select folder and click create.
Click the edit button to edit the configuration.
In the publish configuration you can check the single EXE option.
Once ready, save and click Publish. You can now go to the publish folder and get your app. I have tested the application on several machines, and it works without issues. The entire package is a large (200MB), but it contains all needed assemblies.
The R3 2019 SP of Telerik UI for WinForms is already available for download in customers’ accounts. If you are new to Telerik UI for WinForms, you can learn more about it via the product page. It comes with a 30-day free trial, giving you some time to explore the toolkit and consider using it for your current or upcoming WinForms development.
Dimitar Karamfilov is a Support Officer in the UI for WinForms team. He joined Telerik after graduating from the Telerik Academy in 2013. Apart from work he likes outdoor activities and reading philosophy literature.
Subscribe to be the first to get our expert-written articles and tutorials for developers!