4

How can I choose between .dll and .exe as output type from project in new project format for .NET Core?

roslav
  • 470
  • 3
  • 15
  • 1
    I wouldn't start getting too worried about project.json at the moment, as it's being deprecated... The .NET Core tooling will eventually only be MSBuild-based. – Jon Skeet Jun 16 '16 at 08:41

1 Answers1

2

The option in project.json file is emitEntryPoint.

"buildOptions": {
    "emitEntryPoint": true
}

This switches between console application .exe (true) and library .dll (false).

When this option is enabled, the application must have public static void Main().

See: Answer about emitEntryPoint meaning

Community
  • 1
  • 1
roslav
  • 470
  • 3
  • 15
  • 2
    Adding `emitEntryPoint` alone is not enough. If the application is a portable application, no executable file is generated. If it is a self-contained application, an executable file is generated. See [.NET Core App Types](https://dotnet.github.io/docs/core-concepts/app-types.html). – Daniel Grim Jun 16 '16 at 11:44