Следуя инструкциям здесь I:
- установлен Visual Studio 2017 Preview
- установлен .NET Core 2.1 RC1
dotnet add package Microsoft.AspNetCore.Hosting.WindowsServices --version 2.1.0-rc1-final
новый проект ->
выберите .NET Core слева ->
выберите ASP.NET Core Web Application ->
выберите ASP.NET Core 2.1 вверху ->
выберите веб-приложение ->
в program.cs добавьте using Microsoft.AspNetCore.Hosting.WindowsServices;
->
в program.cs, измените Run()
на RunAsService()
->
выпуск сборки ->
вcmd do dotnet publish
Я получаю:
>dotnet publish
Microsoft (R) Build Engine version 15.7.177.53362 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Restoring packages for C:\Temp\VoyDashServer\VoyDashServer\VoyDashServer\VoyDashServer.csproj...
Generating MSBuild file C:\Temp\VoyDashServer\VoyDashServer\VoyDashServer\obj\VoyDashServer.csproj.nuget.g.props.
Restore completed in 1.56 sec for C:\Temp\VoyDashServer\VoyDashServer\VoyDashServer\VoyDashServer.csproj.
You are working with a preview version of the .NET Core SDK. You can define the SDK version via a global.json file in the current project. More at https://go.microsoft.com/fwlink/?linkid=869452
VoyDashServer -> C:\Temp\VoyDashServer\VoyDashServer\VoyDashServer\bin\Debug\netcoreapp2.1\VoyDashServer.dll
VoyDashServer -> C:\Temp\VoyDashServer\VoyDashServer\VoyDashServer\bin\Debug\netcoreapp2.1\VoyDashServer.Views.dll
VoyDashServer -> C:\Temp\VoyDashServer\VoyDashServer\VoyDashServer\bin\Debug\netcoreapp2.1\publish\
В результате получается dll, а не exe
Что я делаю не так?