I want to create a new executable project with Visual Studio Code + omnisharp. It works for dll but not for an exe file.
Code:
dotnet new console (pressed yes in popup)
dotnet restore
dotnet run
//hello world was visible in terminal (what means it works)
dotnet build
Build was successful but a dll file was created.
BTW: I used this for help -> https://github.com/dotnet/docs/blob/master/docs/core/tutorials/with-visual-studio-code.md
You are using dotnet core, so executable files are still in .dll. To run the file, run dotnet nameofdll.dll
dotnet core
is cross-platform, and to reduce the tight coupling with windows, .exe
is not used for executables anymore.
If you want your application to be Windows dependant, you will need to make your application target .Net Framework instead - you will get a .exe instead this way.