-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish a single file app does not create a single file #44337
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Currently single file publishing is only single file as far as the managed .NET portions of your app are concerned. As such, some extra files have to be included for native runtime components unless you specify I believe #43556 fixed this, but I'm pretty sure it didn't make the .NET 5 release so you'll have to wait for .NET 6. |
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @agocke, @vitek-karas |
For .NET 5 this is the expected behavior - see the detailed design here: https://github.com/dotnet/designs/blob/main/accepted/2020/single-file/design.md#user-experience We're working on improving this for future releases - most of the work to get to one file even on Windows is tracked here: #43071 |
Isn't this the default? |
@steveoh Unfortunately the behavior of dotnet CLI is a bit weird:
|
As of .NET 6 Preview 1, both Windows and Mac should now compile all the runtime binaries into a single-file, and publishing should produce a true single-file app. Any native dependencies that the app itself brings in can be bundled and extracted using |
Version Used:
C:\Temp\HelloConsole>dotnet --version
5.0.100-rc.2.20479.15
Steps to Reproduce:
dotnet publish -r win-x64 -p:PublishSingleFile=true --self-contained true
or
dotnet publish -r win10-x64 /p:PublishSingleFile=true
11/04/2020 02:54 PM
.11/04/2020 02:54 PM ..
09/25/2020 10:47 PM 747,912 clrcompression.dll
09/25/2020 10:46 PM 1,324,416 clrjit.dll
09/25/2020 10:47 PM 5,154,696 coreclr.dll
11/04/2020 02:54 PM 53,289,026 HelloConsole.exe
11/04/2020 02:50 PM 9,352 HelloConsole.pdb
09/25/2020 10:46 PM 1,042,792 mscordaccore.dll
Expected Behavior:
I would expect to only get one file.
Actual Behavior:
I get many files. So bit confused here.... Why I don't get a single file?. I get the same result when I publish from inside visual Studio as well.
The text was updated successfully, but these errors were encountered: