question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

There is no exe present in the output of `dotnet publish`.

See original GitHub issue

Steps 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:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
guardrexcommented, Apr 26, 2016

@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

1reaction
guardrexcommented, Apr 14, 2016

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found