I have written an ASP.NET application that is based on .NET core 1.1. This application works as expected. Today, I just upgraded my server to dotnet-sdk-2.0.0-preview2-006497 and made necessary changes in the .csproj file.
In my application's main method, I have the following code:
var host = new WebHostBuilder()
.UseKestrel(options => {
options.UseHttps("MyCert.pfx");
})
...
This code used to work fine under .net core 1.0 but gives an error under .net core 2.0.
KestrelServerOptions does not contain a definition for UseHttps and
the best extension method overload
ListenOptionsHttpsExtensions.UseHttps(ListenOptions, string) requires
a receiver of type ListenOptions
I am wondering how I can fix this. Can I just pass null as a parameter? Regards.