diff --git a/PepApi.Core/Program.cs b/PepApi.Core/Program.cs index ec941a7..7e987cb 100644 --- a/PepApi.Core/Program.cs +++ b/PepApi.Core/Program.cs @@ -6,8 +6,9 @@ var builder = WebApplication.CreateBuilder(args); -// Enable Windows Service hosting -builder.Host.UseWindowsService(); +// Enable Windows Service hosting (only on Windows) +if (OperatingSystem.IsWindows()) + builder.Host.UseWindowsService(); // Add services to the container builder.Services.AddControllers()