Reputation: 752
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.
Upvotes: 3
Views: 1240
Reputation: 1279
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.
Upvotes: 0
Reputation: 100581
At the moment, this is not possible because:
runtimeconfig.json
to 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 a deps.json
expressing the dependencies of the application..dll
+ .deps.json
and 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.
Upvotes: 8