There is no exe present in the output of `dotnet publish`.
See original GitHub issueSteps to reproduce
PowerShell
git clone https://github.com/aspnet/cli-samples.git
cd .\cli-samples\HelloWeb\
dnvm use 1.0.0-rc2-20221 -runtime coreclr -os win -architecture x64
dotnet restore
dotnet publish --output approot
dir .\approot\ -Filter *.exe
Expected behavior
C:\GitHub\cli-samples\HelloWeb [master ≡ +1 ~0 -0 !]> dir .\approot\ -Filter *.exe
Directory: C:\GitHub\cli-samples\HelloWeb\approot
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 4/13/2016 9:30 PM 0 HelloWeb.exe
Actual behavior
There is no .exe present.
Environment data
dotnet --info
output:
.NET Command Line Tools (1.0.0-rc2-002392)
Product Information:
Version: 1.0.0-rc2-002392
Commit Sha: 880dcf2fc8
Runtime Environment:
OS Name: Windows
OS Version: 10.0.10586
OS Platform: Windows
RID: win10-x64
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
dotnet publish command - .NET CLI
The dotnet publish command's output is ready for deployment to a hosting system (for example, a server, PC, Mac, laptop) for execution. It's...
Read more >dotnet publish -c Release to a self contained exe doesn't ...
I've tried reproducing your problem by creating a new console app with your settings but it works just fine, so it should have...
Read more >Publishing A Single EXE File In .NET Core 3.0
All this does is runs our publish command but tells it to package it within a single file. You'll notice that we no...
Read more >How to publish .NET console app to single independent . ...
NET 5 this is resolved by only bundling managed DLLs into the EXE and not extracting to disk, but it means native DLLs...
Read more >Breaking change in publish for .net 5 - Developer Community
For Windows application development in .NET 5, it is no longer possible to generate single file executable in dotnet publish using default ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@shaunluttin That explains it … I was looking in totally the wrong place. … and woe! was this hard to find!!! … https://github.com/blackdwarf/core-docs/blob/clidocs/docs/core-concepts/app-types.md
@shaunluttin This is by-design. What you produced first was a shared framework application, so it’s not supposed to have an executable, as the app’s runtime will be installed on the host. Your mods ended up producing a self-contained standalone application (produced by removing the
"type": "platform"
bit and providing a runtime).I’d give you the doc on the details but it’s under development buried over there somewhere on a branch I think. /cc @blackdwarf wrote that I think and will know right where it is.