Skip to content
This repository was archived by the owner on Dec 2, 2025. It is now read-only.

Commit d814e74

Browse files
committed
Startup fix
1 parent ee92e45 commit d814e74

File tree

3 files changed

+30
-92
lines changed

3 files changed

+30
-92
lines changed
Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,32 @@
1-
using Microsoft.AspNetCore.Hosting;
2-
using Microsoft.Extensions.Configuration;
3-
using Microsoft.Extensions.Hosting;
4-
using Microsoft.Extensions.Logging;
1+
using Microsoft.AspNetCore.Builder;
2+
using Umbraco.Cms.Core.DependencyInjection;
3+
using Umbraco.Extensions;
54

6-
namespace Umbraco9.Website
7-
{
8-
public class Program
5+
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
6+
7+
builder.CreateUmbracoBuilder()
8+
.AddBackOffice()
9+
.AddWebsite()
10+
.AddDeliveryApi()
11+
.AddComposers()
12+
.Build();
13+
14+
WebApplication app = builder.Build();
15+
16+
await app.BootUmbracoAsync();
17+
18+
19+
app.UseUmbraco()
20+
.WithMiddleware(u =>
21+
{
22+
u.UseBackOffice();
23+
u.UseWebsite();
24+
})
25+
.WithEndpoints(u =>
926
{
10-
public static void Main(string[] args)
11-
=> CreateHostBuilder(args)
12-
.Build()
13-
.Run();
27+
u.UseInstallerEndpoints();
28+
u.UseBackOfficeEndpoints();
29+
u.UseWebsiteEndpoints();
30+
});
1431

15-
public static IHostBuilder CreateHostBuilder(string[] args) =>
16-
Host.CreateDefaultBuilder(args)
17-
.ConfigureLogging(x => x.ClearProviders())
18-
.ConfigureWebHostDefaults(webBuilder => webBuilder.UseStartup<Startup>());
19-
}
20-
}
32+
await app.RunAsync();

samples/Umbraco13.Website/Startup.cs

Lines changed: 0 additions & 74 deletions
This file was deleted.

samples/Umbraco13.Website/Umbraco13.Website.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</PropertyGroup>
55

66
<ItemGroup>
7-
<PackageReference Include="Umbraco.Cms" Version="13.5.1" />
7+
<PackageReference Include="Umbraco.Cms" Version="13.5.2" />
88
</ItemGroup>
99

1010
<!-- Force Windows to use ICU. Otherwise Windows 10 2019H1+ will do it, but older Windows 10 and most if not all Windows Server OS's will run NLS -->

0 commit comments

Comments
 (0)