3

(there are various questions and answers for this ie here for .NET Core 2.0, this question particularly asks regards 2.1)

.NET Core 2.1 is now released together with visual studio Preview 2

I need to produce a windows service which is not a Web API (that is it will be based on a .Net Core console app)

I need .Net Core 2.1 as I will be using SignalR to talk to a .NET Core 2.1 server which is not possible from a non .NET Core 2.1 app.

With the official .NET Core 2.1 release, is there now a "native" way to produce an executable that can be added as a windows service with "sc create" ?

(That is without using external tools like nssm.cc, or PeterKottas/DotNetCore.WindowsService which is not updated to 2.1)

kofifus
  • 17,260
  • 17
  • 99
  • 173
  • Why do you build a windows service with .net core? .NetCore is for cross platform applications and windows services are specific to windows OS? It does not make much sense to build something windows specific with .NetCore. – A G Jun 06 '18 at 09:52
  • pls read my question again: "I need .Net Core 2.1 as I will be using SignalR to talk to a .NET Core 2.1 server which is not possible from a non .NET Core 2.1 app." – kofifus Jun 06 '18 at 09:57
  • Can you create the SignalR part in a Net Standard Library and reference that from a .NET Framework application. That app can host the service code which runs your library code? – Simply Ged Jun 06 '18 at 16:27
  • probably possible but that is not what I asked and sounds complicated. Making a .NET Core web app into a windows service is really simple, why is there no simple solution for .Net Core console apps ? – kofifus Jun 06 '18 at 22:54

0 Answers0