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:
I have looked into Properties->Application
and all is set ,still i get no executable.
To build your program and create teh executable file choose Build My Project.exe from the Build menu - "My Project" represents teh name you chose for your project and the extension ".exe" is used to designate that the file being created will be an executable file.
After a developer writes the C# code, he or she compiles their code. This results in Common Intermediate Language stored within Portable Executable (PE for 32-bit, PE+ for 64-bit) files such as “.exe” and “. dll” files for Windows. These files are distributed to users.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With