.NET Core application, where is my EXE, how to publish
This article has been moved to its new home here: https://benperk.github.io/msdn/2017/2017-03-net-core-application-where-is-my-exe-how-to-publish.html
Short answer, there isn’t one. When you compile your .NET Core console application for example, you get a DLL. Then you execute it using the DOTNET command from the .NET Core SDK found here.
Check out some of my other articles I wrote in regards to ASP.NET Core and .Net Core
- How to call an async method from a console app main method
- How to deploy a .NET Core console application to Azure, WebJob
- .NET Core application, where is my EXE, how to publish
- Create a VNET and access an Azure VM hosted within it from an App Services Web App
- Create and deploy an ASP.NET Core Web API to Azure Windows
I wrote 3 other articles about a .NET Core console application here, here and here which resulted in the creation of a DLL called: helloworldsleepy-webjob.dll
I right-clicked my .NET Core console application and select the Publish… menu item, which opened a wizard, similar to that shown in Figure 1.
Figure 1, how to publish a .NET Core application
Select the location where you want the PublishOutput to be placed and click the Publish button, see Figure 2.
Figure 2, how to publish a .NET Core application, no EXE?
For testing, I then copied the contents of that directory into C:\Temp\helloworldsleepy-webjob and ran DOTNET helloworldsleepy-webjob.dll as shown in Figure 3.
Figure 3, how to execute a .NET Core console application
It runs as expected.
Comments
- Anonymous
March 09, 2017
If you do want to create an .exe binary, you can use a 'Self-Contained Deployment': https://docs.microsoft.com/en-us/dotnet/articles/core/deploying/#self-contained-deployments-scdBut of course this limits the portability of your app... - Anonymous
February 18, 2019
I have bookmarked your article. I will definitely read other articles that you have shared.I read an article that David Catteuw shared. It seems to be a working way to create an executable file. Also, I found another way - to pack .NET Core application into .exe using BoxedApp. I haven't tried it yet.- Anonymous
February 26, 2019
Does this method work? How to do this?
- Anonymous