Sdk: "emitEntryPoint": true is not creating exe

Created on 18 Apr 2016  路  7Comments  路  Source: dotnet/sdk

I'm using the latest CLI (rc2-002418) and both buildand publishcommands not creating exe file. Is there any other setting to build exe file?

{
    "version": "1.0.0-*",
    "compilationOptions": {
        "emitEntryPoint": true,
        "preserveCompilationContext": true
    },
    "dependencies": {
        "Microsoft.NETCore.App": {
          "type": "platform",
          "version": "1.0.0-rc2-23931"
        },
        "NETStandard.Library": "1.0.0-rc2-*",
        "System.Xml.XmlDocument": "4.0.1-rc2-*",
        "System.Xml.ReaderWriter": "4.0.11-rc2-*",
        "System.Xml.XmlSerializer": "4.0.11-rc2-*",
        "System.Diagnostics.TraceSource": "4.0.0-rc2-*",
        "System.Diagnostics.Tracing": "4.1.0-rc2-*",
        "System.Collections": "4.0.11-rc2-*",
        "System.Collections.NonGeneric":"4.0.1-rc3-*"
    },
 "runtimeOptions": {
      "configProperties": {
      "System.GC.Server": true
     }
  },
  "frameworks": {
      "netcoreapp1.0": {}
  }
}

question

Most helpful comment

I think the documentation needs to get better at specifying the difference between the following with regards to the output you get:
building a portable app
publishing a portable app
building a self-contained app
publishing a self-contained app

I don't quite yet understand the difference between building and publishing a portable app, but I think I understand the rest now.

All 7 comments

@cheers00 this is a documentation issue. The system is behaving as designed. @blackdwarf is working on updated docs, so assigning to him to make sure you get unblocked.

@cheers00 this document explains the types of portability that apps can have and what is the output of each: http://dotnet.github.io/docs/core-concepts/app-types.html.

I will close this issue. If this explanation is not sufficient, please reopen this issue or file a new one under dotnet/core-docs.

It's still not clear how can I make it generate an exe file (the renamed corehost.exe file) in the case of a "Portable Application", and what exactly does the "emitEntryPoint" value do.

Edit: Just to be clear, the intention here is for a user who has .Net Core runtime installed to be able to double-click an executable to run the app (instead of typing dotnet run in the command line)

@hassanselim0 you don't. For portable apps, you use the runner, that is, the dotnet command. The emitEntryPoint value emits an entry point that is needed for the console apps.

If you want to have an exe that is dropped, use the self-contained applications model.

I think the documentation needs to get better at specifying the difference between the following with regards to the output you get:
building a portable app
publishing a portable app
building a self-contained app
publishing a self-contained app

I don't quite yet understand the difference between building and publishing a portable app, but I think I understand the rest now.

@hassanselim0 OK, fair enough. I should probably update that document.

The different between publishing a portable app an building it is where your dependencies that exist outside of .NET Core come from. In the first case, a built app, they come from your NuGet cache. In the second case, a published app, they are packaged with your application.

Hope this makes it somewhat clearer.

@hassanselim0

@blackdwarf may have one on the way for the outputs of publishing, as well. That's currently listed for RTM: https://github.com/dotnet/cli/issues/937

I'm also fleshing out some details in an unofficial IIS helper doc in the Slack #iis channel ( http://tattoocoder.com/aspnet-slack-sign-up/ ) that has some info in these regards.

... and I think you probably got this from @blackdwarf's response, but you don't really "build a self-contained app," since using cached packages wouldn't result in something "self-contained" by definition. I'm very glad you asked about that tho ... I'd like to add something to the unofficial doc that pertains to these concepts, as well. :+1:

Was this page helpful?
0 / 5 - 0 ratings