Single File Deployment With List & Label .NET

Introduction

Starting with .NET Core 3.0 you have the possibility to create so-called Single-File Applications. This way you have your application with all necessary dependencies in one executable file.

You can also use this new feature for your List & Label .NET applications. In the following you will find an explanation of the steps necessary to do this.

Implementation

First the required List & Label modules must be integrated into your application.
These can be assembled with the included “Redistribution Assistant”. Then the desired dependencies must be copied into your project directory:

image

Now open your project again with Visual Studio and set the following setting for the modules you just added:

After that a rebuild of the project is necessary.

Now you have to open the developer console in Visual Studio under View > Terminal and enter the following command there

dotnet publish -r win-x86 /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true

You may have to adapt this command to your project, e.g. change the platform from x86 to x64. Further information on this topic can be found in the Microsoft documentation.

If the process ran without errors, you will find your single-file application in your project folder under bin\Debug\net5.0-windows\win-x86\publish\. The path may vary depending on your project.

Now you have your List & Label application as an independent single file in form of an EXE and can execute it on other systems.