This looks a bit outdated. I have the below
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
Below from program
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
What would be the best way to .AddPrerenderConfig()
I am trying to follow the below step Step 1: Use AddPrerenderConfig() in ConfigurationBuilder
var builder = new ConfigurationBuilder() .SetBasePath(env.ContentRootPath) .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true) // Prerender Step 1: Add Prerender configuration Json file. .AddPrerenderConfig() .AddEnvironmentVariables();
This looks a bit outdated. I have the below public class Startup { public Startup(IConfiguration configuration) { Configuration = configuration; }
Below from program public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .ConfigureWebHostDefaults(webBuilder => {
What would be the best way to .AddPrerenderConfig()