Generating .NET Core Console App .exe in Visual Studio 2017
In fact .NET Core by default generates only dll
files that can be run with dotnet
:
dotnet myapp.dll
If you want to publish the app as a self-contained exe
, you have to right-click the project in Solution Explorer, select Publish and then choose the self-contained option and either win-x86 or win-x64. This will generate a platform specific, architecture specific exe
.
Check out this blogpost that goes into more detail about this process.
![Admin](/assets/logo_square_200-5d0d61d6853298bd2a4fe063103715b4daf2819fc21225efa21dfb93e61952ea.png)
Admin
Updated on June 15, 2022Comments
-
Admin about 2 years
(I am using Visual Studio 2017)
I started a small console application (I created a .NET Core application), then I wanted to build the .exe file. But all I get is .dll files and there isn't any .exe file.
Can you help me please ? what do I change in Visual Studios settings, to have an .exe file in my correct directory for my console application?
-
Farax about 5 yearsThe publish option for a console app is pretty handy. Thanks!