How do I produce an exe for a console application using dotnet build?
See original GitHub issueSteps to reproduce
Create a new .Net Core Console Application (PREVIEW).
Run dotnet build
from the command line.
Actual behavior
It only produces a .dll
Expected behavior
I need a .exe
so I can execute it using the Process
class
Environment data
dotnet --info
output:
.NET Command Line Tools (1.0.0-preview1-002702)
Product Information:
Version: 1.0.0-preview1-002702
Commit Sha: 6cde21225e
Runtime Environment:
OS Name: Windows
OS Version: 6.3.9600
OS Platform: Windows
RID: win81-x64
project.json
{
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0-rc2-3002702"
}
},
"frameworks": {
"netcoreapp1.0": {
"imports": "dnxcore50"
}
}
}
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:15 (4 by maintainers)
Top Results From Across the Web
Build .NET Core console application to output an EXE
Right-Click on Project, and click Publish · Click Start and choose Folder target, click next and choose Folder · Enter any folder location,...
Read more >How To Create EXE For .Net Core Console Application
In this article, you will learn how to create an exe for .NET Core Console application.
Read more >Publish a .NET console application using Visual Studio
Run the published app · In Solution Explorer, right-click the publish folder, and select Copy Full Path. · Open a command prompt and...
Read more >How to build my console app as single .exe file? : r/csharp
I've been creating single .exe files for the last few months using the command line along with the “dotnet” command. I develop on...
Read more >Generate an exe for .NET Core Console Apps
In this quick post, we will see how to create an exe from a .NET Core console application. A Little Background. When you...
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 FreeTop 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
Top GitHub Comments
@Strandedpirate you need to create a self-contained app. For more information, please consult https://dotnet.github.io/docs/core-concepts/app-types.html. When you create a self-contained application, you will get an exe (that is, a binary) and will be able to do what need.
I will go ahead and close this issue. If you still need information, please reopen. Thanks!
@BrainCrumbz new docs are here https://docs.microsoft.com/en-us/dotnet/articles/core/deploying/