Is there a possibility to publish .NET Core Console Application as single file (no matter if it's EXE or DLL)?
I am using .NET Core 1.1 but I am elastic to port my project to another version.
Is there a possibility to publish .NET Core Console Application as single file (no matter if it's EXE or DLL)?
I am using .NET Core 1.1 but I am elastic to port my project to another version.
On
You can use a post-release process to wrap up the release into a self executing archive (such as PyInstaller or IExpress).
The archive includes all your release files, and can be configured to launch a specific application file after extraction.
This would be a good fit for installers, where you want to only provide a single file but don't want a bootstrapped installer.
At the moment, this is not possible because:
runtimeconfig.jsonto tell the host (dotnet/dotnet.exe) which shared runtime to use. Even if you IL-Merge all your managed code into a single dll, this file is still required. The host also expects adeps.jsonexpressing the dependencies of the application..dll+.deps.jsonand copying over content from runtime-specific NuGet packages. This also includes native libraries that are searched for by file name.The CoreRT project aims to compile a .NET Core application to a single native binary using ahead-of-time compilation but is still in development.