samples icon indicating copy to clipboard operation
samples copied to clipboard

RenderViewToString HostBuilder setup

Open genifycom opened this issue 4 years ago • 1 comments

I am trying to get the renderviewtostring sample working in DotNet Core 3.1 in a console application i.e. running Razor standalone.

The first statement in Main gives 'HostBuilder' does not contain a definition for 'ConfigureWebHost' ...

What is the correct setup for this sample in DotNet Core 3.1 ?

Thanks

genifycom avatar May 01 '20 20:05 genifycom

I have these package references:

<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.2.7" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.3" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.3" />
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="3.1.3" />

genifycom avatar May 01 '20 20:05 genifycom