none
.NET Core

    Question

  • Where does the new VS save exe file?  I created a simple hello world prog (.NET core) to see what info is in the exe file but I can't find it.

    in .NET Framework program the exe file is as before but in .NET Core it is not created.  Why not and how do you make a stand alone program to distribute?

    I have checked in the bin folders of Documents under:

    <C:\Users\xxxxxxx\Documents\Visual Studio 2017\Projects\Hello-World\Hello-World\bin\Release\netcoreapp1.1>

    It is only the .NET core I am talking about so don't tell me anything about .Framework development. 

    Thank you.

    Friday, March 31, 2017 10:30 PM

All replies

  • I think I have found the answer to this.  There is no .exe file in .Net Core and so to run the application you need to run something like this from the command prompt:

    <code>dotnet helloworld.dll</code>

    Of course, I am talking about console applications.

    For Apps to run, the host machine needs to have dotNet Core installed otherwise it won't run.  Perhaps we need to distribute dotnet core with the application like we used to with C++ run-time libralies.

    Sunday, April 02, 2017 8:06 PM
  • @EN59CVH,

    Since you have found the answer to this, you can mark this as answer which is benefit to other communities who has the same problem.

    Besides, If you want to generate the .exe for the .Net Core to run directly, you can follow below steps:

    step 1: remove "type": "platform", from Project.json under frameworks section

    step 2: add run time section to your project.json. Note each section is separeted by a comma. Add your runtime. below is just an example for win 10.

    "runtimes": {
           "win10-x64": {}      
         }

    step 3: dotnet build -r win10-x64 - or just build

    step4: you can notice .exe created under debug/netcore/win10/

    Note: All above is for Visual Studio 2015, for the Visual Studio 2017, you just need to add the run time section in the peoject file, then build it with command line:

     <PropertyGroup>   
      <OutputType>Exe</OutputType>  
      <TargetFramework>netcoreapp1.0</TargetFramework>
      <RuntimeIdentifiers>win10-x64</RuntimeIdentifiers> 
     </PropertyGroup>
    dotnet build -r win10-x64

    Hope this can help you.

    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, April 03, 2017 8:19 AM