How to Package a .NET Core App into a Single EXE
This guide shows how to publish a self-contained .NET Core application and then pack the published output into one executable with BoxedApp Packer. The packed EXE doesn't extract embedded assets to disk: files remain virtual, which helps with portability, integrity, and basic IP protection.
Tip: .NET Core/5+/6+/7+ support single-file publish, but many apps still ship additional content (native libs, data, configs). BoxedApp Packer consolidates everything into one EXE and serves files from memory at runtime—no temp files created.
1) Create and test a sample app
mkdir PackedDotNetCoreApp
cd PackedDotNetCoreApp
dotnet new console
dotnet runEdit Program.cs as you like and verify it runs.
2) Publish self-contained
Publish for your target RID (example: win-x86 or win-x64) and include the runtime:
dotnet publish PackedDotNetCoreApp.csproj -c Release -r win-x86 --self-contained trueAfter publish, you'll have a folder like bin/Release/netX.Y/win-x86/publish containing the EXE and all dependencies.
3) Pack into one EXE with BoxedApp Packer
- Start BoxedApp Packer. Set Input exe to your published EXE.
- In Files → Application Directory, click Import Directory... and choose the
publishfolder to add the content files. - (Optional) Use Override command line to bake in arguments you normally pass at launch.
- Click Build to produce the single packed EXE.
Architecture note: If you published for
win-x86, keep the packed output x86 for maximum compatibility; use win-x64 if your app truly requires 64-bit.Why this works
- BoxedApp intercepts file I/O and serves resources from memory, so the packed app doesn't drop files to disk.
- You ship a single binary that runs on machines without preinstalled .NET runtime (because you published self-contained).
- Assets and native libs are harder to extract during casual inspection.