Compile a .NET Core application as an EXE file using Visual Studio 2017

前端 未结 5 1364
不思量自难忘°
不思量自难忘° 2020-11-28 09:10

I created a .NET Core application (v1.1) in Visual Studio 2017. When I compile it, I get a DLL file produced instead of the expected EXE file for the built project. I did ch

5条回答
  •  有刺的猬
    2020-11-28 09:41

    In Visual Studio 2017:

    1. Right click on your project and select Publish (In Visual Studio 2019, click on menu BuildPublish )
    2. Select 'Folder' and create a new profile
    3. In tab 'Publish', click 'Configure...'
    4. Select Deployment Mode: Self-contained, Target Runtime: win-x86 (or win-x64)
    5. Save
    6. Publish

    In the folder \bin\Debug\netcoreapp2.1\win-x86\ you will see the EXE file:

提交回复
热议问题