0

I just tried the quick start of .NET Core on Windows, following the sample, I created a desktop application. What seems a bit weird is the "main" program is compiled into a "dll" and no longer an "exe" like previous C# code.

Does it mean, from now on, .NET Core compiles everything into an "dll", like java compiles everything into a "class", and no longer need the "exe" because .NET Core VM is the sandbox for all .NET Core apps, like JVM?

TylerH
  • 20,799
  • 66
  • 75
  • 101
Hind Forsum
  • 9,717
  • 13
  • 63
  • 119

2 Answers2

3

Yes, exactly. With dotnet core, Microsoft went a step towards Java/Node/etc style of workflow where you can do most things through a command line tool (dotnet.exe).

I think this makes sense because .NET Core dependencies are app-local, so the runtime isn't scattered everywhere arround the file system as with .NET Framework.

Volker Schmidt
  • 416
  • 3
  • 10
2

You can create exe also by publishing the project for Windows OS.

For example (.Net Core 2.0):

dotnet publish -c release -r win7-x64

You need to specify win7-x64 in RuntimeIdentifiers also in the .csproj file

Harit Kumar
  • 2,272
  • 2
  • 12
  • 24