Build .exe file in .NET Core RC2

前端 未结 5 1021
被撕碎了的回忆
被撕碎了的回忆 2020-12-02 04:58

Every time I build a project using the new .NET Core RC2 templates I am not provided with a runnable .EXE file. If I hit F5 for debugging m

5条回答
  •  时光说笑
    2020-12-02 05:45

    To create a runnable application from a .NET Core console application you can use the dotnet tool. Just run in your project directory:

    dotnet publish --runtime win7-x64
    

    This creates a standalone app (self-contained deployment; includes all necessary libraries consuming at least 60MB on your disk). Of course you can also choose other runtimes, like osx.10.11-x64 or ubuntu.16.04-x64.

    If you used the default configuration (New Project -> Console App (.NET Core)), there is no modification of any configuration file necessary.

提交回复
热议问题