Build .exe with .net core


Hello, I have just learned C# with rider. When i found in the folder bin\Debug\netcoreapp2.0, I don't see the file .exe. How to build the programe to .exe?

1 comment


Thank you for contacting us. 

In .NET Core, if you'd like to generate an .exe file produced during dotnet build, you need to specify a target platform in MSBuild property RuntimeIdentifier in .csproj file.


But note that by default dotnet core generates .dll file instead of .exe. And you can run it with command bellow on any OS

dotnet filename.dll

Please sign in to leave a comment.