For different deployment environments, we want to either publish our application via IIS, or via Windows Service.
From this thread we learned that we have to remove the other UseABC()
option from Program.cs -> CreateHostBuilder() -> ConfigureWebHostDefaults()
.
Just to be clear: either UseIIS()
or UseKestrel()
should be enabled there (in fact, last one wins, but this is not the point).
Is this it?
Is there no better option than to create two different deployment packages?
Ideally, there would be one set of binaries that supports both, IIS and Windows Service as hosting environment. Any ideas?