6

Hello i can not generate an executable from my project (a .NET Core 2.1 Console App).I have checked the output file,the output type is Console Application. It builds successfully ( the program works ) but there is no executable.

I have tried both with debug and release and i have looked into bin\ and obj\ folders for the executable but there is none.
This is how my Bin looks like:

enter image description here

I have looked into Properties->Application and all is set ,still i get no executable.

1
  • More than likely its your CSPROJ file. Please show a screenshot.
    – Judy007
    Commented Aug 12, 2018 at 18:11

1 Answer 1

6

This is a new way .net core environment works. It is not a part of windows (which is the main benefit of creating it) and provided as a standalone package.

You need to start an environment to run .net core app (the same way you do it while running java application if you had a chance).

Try running in a console (this should work not only in windows but in Linux etc.)

dotnet Server.dll

If you'd like to get an exeutive file you need to publish your app (use Visual Studio publish command instead of build. On the publishing screen in settings you need to set up the platform you need executable for and change the deployment mode to "Self-contained". In this case, you should get platform-specific executable.

Not the answer you're looking for? Browse other questions tagged or ask your own question.