In this article we will learn how to Creating an EXE For .Net Core Console Application. Sometime as per the requirement we are create console application but the challenge is how to share this application to others like how a tester can test this application. We can’t share the source code directly to others we should share the file as protected. To get rid of this issue the best way is that we should create an EXE file of .Net Core console app and send that EXE file to others. Here In this article, we basically going to learn how to create an EXE file over .Net Core console. Please read my previous article of JWT Authentication And Authorization With Identity Framework in .NET Core 6.0.
Creating a sample .Net Core console application
Create a .NET Core console application using Visual studio templates.
If you can build the project and when move to Debug folder you can’t find the any EXE file is there. It is not a bug. In .NET Core, it runs from the dll, so you have to just run the application by running the command prompt and using the command –
Let’s run the application and we can see the sample console app output.
Creating an EXE file for the .Net core console App
Let’s create an EXE file using Visual studio wizard of .Net Core console application.
Right click on the project and click on publish
After clicking on publish it opened up a next wizard where we can choose publish type, In my case I have chooses Folder option.
After clicking the next button you can see the below screen where it ask to publish location under Release folder. You can change if you want to save in other location.
After click the Finish button, you can choose the highlighted settings and set target and click on Save button.
Finally click on Publish button, it can publish into desired location.
Jump to the folder location and you can there you find an
ConsoleApp1 exe file present in
Release folder, when you click the application you can see the console window,
If you want to create Desktop create short Icon of the EXE file then follow below steps and click on the shortcut icon you can see the result.
- Upload Download and Delete files in Azure Blob Storage using ASP.NET Core and Angular
- How to upload files to Azure Blob Storage using Asp.Net Core Web API
- How to store app secrets in ASP.NET Core using Secret Manager
- Logging into Azure App Service with ASP.Net Core
- Integrate Paging in ASP.Net Core Web API- Beginner’s Guide
- Create CRUD Operation using ReactJs and ASP.Net Core API- Starter Template
- How to use Policy-based Authorization using JWT in .Net Core 7 and Angular
- How to use Azure Key Vault in ASP.Net Core
- How to Build ASP.Net Core API using Azure Cosmos DB Local Emulator
- How to Send Emails from ASP.NET Core using Azure
Jayant TripathyCoder, Blogger, YouTuber
A passionate developer keep focus on learning and working on new technology.