Visual Studio 2017 missing exe file

(I am using Visual Studio 2017)

I started a small console application. Bomb Discord C #. Therefore, I always ran this program using Visual Studio. After that, I wanted to put the .exe file on the server so that this bot stayed online all day.

The .exe file is missing from the directory.

So, I started the application again and saw that this console is open from a different path.

"C: \ Program Files \ dotnet" and this .exe is called "dotnet.exe"

When I want to run this .exe file manually, it closes instantly (maybe because of the missing line of code Console.ReadLine();I don’t know).

Can someone tell me what to change in Visual Studios settings to have a .exe file in my correct directory for my console application?

The attached figure shows the bin directory, where the .exe file should normally be. Exist. DLL file, but I need .exe ..

enter image description here

+4
source share
1 answer

There is no exe file because you created the .NET Core application.

You have two options:

  • If you want to use EXE, you need to target the .NET Framework.
  • If you do not want to change your code, you need to install .NET Core on the server and run it dotnet pathToDllon the command line
+11
source

Source: https://habr.com/ru/post/1677990/


All Articles