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.

How do I produce an exe for a console application using dotnet build?

See original GitHub issue

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

github_iconTop GitHub Comments

10reactions
blackdwarfcommented, Jun 11, 2016

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

Read more comments on GitHub >

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

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