I'm trying to use the new GenericHost
in .NET Core 3.0 documented here but I'm getting a really basic error that stats IHostBuilder
does not contain a definition for the ConfigureWebHostDefaults
function.
Looking at the ASP.NET 3.0 documentation here for the IHostBuilder
interface here I cant see any reference to ConfigureWebHostDefaults
so I'm a bit confused.
I'm using the 3.0.0 packages for Microsoft.Extensions.Hosting
and Microsoft.Extensions.Hosting.Abstractions
but cant help but feel I'm either missing something really obvious or that ConfigureWebHostDefaults
has for some reason been removed?
Update -- Screen shot of Program.cs
Update -- .csproj file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.2.7" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="3.0.0" />
</ItemGroup>
</Project>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…