DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Modern Digital Website Security: Prepare to face any form of malicious web activity and enable your sites to optimally serve your customers.

Containers Trend Report: Explore the current state of containers, containerization strategies, and modernizing architecture.

Low-Code Development: Learn the concepts of low code, features + use cases for professional devs, and the low-code implementation process.

E-Commerce Development Essentials: Considering starting or working on an e-commerce business? Learn how to create a backend that scales.

Related

  • Unified Observability: Metrics, Logs, and Tracing of App and Database Tiers in a Single Grafana Console
  • How To Use JMS ActiveMQ With Mule 4 - Part 6
  • Brand New Flutter APP Publish and Update via Google PlayStore
  • Google Calendar Integration with Ruby on Rails Development

Trending

  • Migrating Monolith Application to Microservices
  • Building Intelligent Chatbots With Streamlit, OpenAI, and Elasticsearch
  • Kubernetes DaemonSet: Practical Guide to Monitoring in Kubernetes
  • Empowering Secure Access: Unleashing the Potential of Microsoft Entra ID Application Proxy
  1. DZone
  2. Coding
  3. Languages
  4. Generate an exe for .NET Core Console Apps: .NET Core Quick Posts Part V

Generate an exe for .NET Core Console Apps: .NET Core Quick Posts Part V

In this tutorial, we take a look at how to generate exe file extensions for files that make up part of a .NET Core application.

Neel Bhatt user avatar by
Neel Bhatt
·
Aug. 29, 18 · Tutorial
Like (4)
Save
Tweet
Share
173.8K Views

Join the DZone community and get the full member experience.

Join For Free

In this quick post, we will see how to create an exe from a .NET Core console application.

A Little Background

When you create a console application using .NET Core, you will notice that the exe will not be created when you build the application.

Let us quickly create an application to check this.

I created a .NET Core console application and built the solution. If we open the debug folder, we can see everything except the exe:

Do not think it is a bug in .NET Core, but actually it is a feature. The dlls generated is nothing but the portable apps model which does not generate the exe. They are executed by the .NET Core shared run-time. You can just run the application by running the command dotnet run.

You can read nice explanation here: https://stackoverflow.com/questions/44038847/vs2017-compile-netcoreapp-as-exe

Generate the exe

But, if you really want to generate the exe then just run below command:

dotnet publish -c Debug -r win10-x64

Update: As per the comment below from Stig Schmidt Nielsson:

Fine tip, but one should consider to do a release or debug build. For release builds:

dotnet publish -c Release -r win10-x64

This command will generate the exe as you can see below:

This will create the stand alone apps which are similar to our old .NET applications. This allows us not to have .NET Core as the shared run-time in the target machines.

You can find valid run-time from here: https://docs.microsoft.com/en-us/dotnet/core/rid-catalog#rid-graph.

Hope this helps.

You can find all .Net core posts here.

.NET app Console (video game CLI) POST (HTTP) application

Published at DZone with permission of Neel Bhatt, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Unified Observability: Metrics, Logs, and Tracing of App and Database Tiers in a Single Grafana Console
  • How To Use JMS ActiveMQ With Mule 4 - Part 6
  • Brand New Flutter APP Publish and Update via Google PlayStore
  • Google Calendar Integration with Ruby on Rails Development

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: