Funkeyfreak
Funkeyfreak
Explore posts from servers
CC#
Created by Funkeyfreak on 2/22/2023 in #help
❔ integrate an UI test with playwright on a Blazor Server
Is this the solution?
host = Host.CreateDefaultBuilder()
.ConfigureWebHostDefaults(webBuilder =>...
host = Host.CreateDefaultBuilder()
.ConfigureWebHostDefaults(webBuilder =>...
4 replies
CC#
Created by Funkeyfreak on 2/22/2023 in #help
❔ integrate an UI test with playwright on a Blazor Server
I found this integration, which was using the old program.cs file which looked like this:
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}

public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}

public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
So this code uses the program.cs function „createhostbuilder“, which no longer exists. Someone know how I can fix this part? I really appreciate any help.
4 replies