Skip to content

Commit 78ac466

Browse files
committed
chore(sample-applications): update dotnet version
1 parent 9ec232f commit 78ac466

File tree

20 files changed

+92
-84
lines changed

20 files changed

+92
-84
lines changed

sample-applications/blazing-coffee/BlazingCoffee/Client/BlazingCoffee.Client.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
1+
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<!-- PWA -->
66
<ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest>
77
<!-- /PWA -->
@@ -20,9 +20,9 @@
2020

2121
<ItemGroup>
2222
<PackageReference Include="Blazored.LocalStorage" Version="4.1.5" />
23-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.0" />
24-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.0" PrivateAssets="all" />
25-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="7.0.0" />
23+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0-rc.2.23479.6" />
24+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0-rc.2.23479.6" PrivateAssets="all" />
25+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="8.0.0-rc.2.23479.6" />
2626
<PackageReference Include="Microsoft.Extensions.Localization" Version="7.0.0" />
2727
<PackageReference Include="Microsoft.Web.LibraryManager.Build" Version="2.1.113" />
2828
<PackageReference Include="System.Net.Http.Json" Version="7.0.0" />

sample-applications/blazing-coffee/BlazingCoffee/Client/wwwroot/index.html renamed to sample-applications/blazing-coffee/BlazingCoffee/Client/Host.razor

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!DOCTYPE html>
22
<html>
33

44
<head>
@@ -24,6 +24,7 @@
2424
<link href="manifest.json" rel="manifest" />
2525
<link rel="apple-touch-icon" sizes="512x512" href="icon-512.png" />
2626
<!-- /PWA -->
27+
<HeadOutlet @rendermode="@RenderMode.InteractiveWebAssembly" />
2728
</head>
2829

2930
<body>
@@ -42,7 +43,7 @@
4243
</app>
4344

4445
<script src="_content/Microsoft.AspNetCore.Components.WebAssembly.Authentication/AuthenticationService.js"></script>
45-
<script src="_framework/blazor.webassembly.js"></script>
46+
<script src="_framework/blazor.web.js"></script>
4647
<script src="js/themeChooser.js"></script>
4748
<script>
4849
window.themeChooser.init();

sample-applications/blazing-coffee/BlazingCoffee/Server/BlazingCoffee.Server.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Web">
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<UserSecretsId>BlazingCoffee.Server-EE526336-C312-404E-8393-993CE0300831</UserSecretsId>
66
</PropertyGroup>
77

@@ -27,7 +27,7 @@
2727

2828
<ItemGroup>
2929
<PackageReference Include="CsvHelper" Version="16.0.0" />
30-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.0" />
30+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.0-rc.2.23479.6" />
3131
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.0" />
3232
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.0">
3333
<PrivateAssets>all</PrivateAssets>

sample-applications/blazing-coffee/BlazingCoffee/Server/Startup.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public void ConfigureServices(IServiceCollection services)
2626
{
2727
services.AddControllersWithViews();
2828
services.AddRazorPages();
29+
services.AddRazorComponents().AddInteractiveWebAssemblyComponents();
2930

3031
// Register Database for Store
3132
services.AddDbContext<CoffeeContext>(options => options.UseSqlite("Data Source=Coffee.db"));
@@ -55,11 +56,13 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
5556

5657
app.UseRouting();
5758

59+
app.UseAntiforgery();
60+
5861
app.UseEndpoints(endpoints =>
5962
{
6063
endpoints.MapRazorPages();
6164
endpoints.MapControllers();
62-
endpoints.MapFallbackToFile("index.html");
65+
endpoints.MapRazorComponents<Client.Host>().AddInteractiveWebAssemblyRenderMode();
6366
});
6467
}
6568
}

sample-applications/blazing-coffee/BlazingCoffee/Shared/BlazingCoffee.Shared.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "7.0.0",
3+
"version": "8.0.0-rc.2.23479.6",
44
"rollForward": "latestFeature"
55
}
66
}

sample-applications/blazing-coffee/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ The current demo app includes examples of the following features in the Blazor W
7777

7878
## Requirements
7979

80-
- [.NET 7](https://dotnet.microsoft.com/en-us/download/dotnet/7.0)
80+
- [.NET 8](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)
8181
- [Telerik UI for Blazor](https://www.telerik.com/blazor-ui) (Trial or Commercial)
8282
- [npm](https://www.npmjs.com/) (node package manager, for sass themes)
8383

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,45 @@
1-
<Router AppAssembly="typeof(Program).Assembly">
2-
<Found Context="routeData">
3-
<RouteView RouteData="routeData" DefaultLayout="typeof(MainLayout)" />
4-
</Found>
5-
<NotFound>
6-
<h1>Page not found</h1>
7-
<p>Sorry, but there's nothing here!</p>
8-
</NotFound>
9-
</Router>
1+
@using Microsoft.Extensions.Hosting
2+
@inject IHostEnvironment Env
3+
4+
<!DOCTYPE html>
5+
<html lang="en">
6+
<head>
7+
<meta charset="utf-8" />
8+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
9+
<title>Telerik UI for Blazor Dashboard Sample App</title>
10+
<base href="/blazor-dashboard-app/" />
11+
<link href="favicon.ico" rel="icon" type="image/x-icon" />
12+
<link id="theme" href="https://blazor.cdn.telerik.com/blazor/4.6.0/kendo-theme-bootstrap/all.css" rel="stylesheet" />
13+
<link href="css/styles.css" rel="stylesheet" />
14+
<!-- Trial script file -->
15+
<!-- If you are using a commercial license, replace the telerik-blazor.js script tag with the one commented below. -->
16+
17+
<script src="_content/Telerik.UI.for.Blazor.Trial/js/telerik-blazor.js" defer></script>
18+
19+
<!-- /Trial script file -->
20+
<!-- Commercial script file -->
21+
<!--<script src="_content/Telerik.UI.for.Blazor/js/telerik-blazor.js"></script>-->
22+
<!-- /Commercial script file -->
23+
24+
<HeadOutlet @rendermode="@RenderMode.InteractiveServer" />
25+
</head>
26+
<body>
27+
<app id="app" class="app container-fluid"><Routes @rendermode="@RenderMode.InteractiveServer" /></app>
28+
29+
<div id="blazor-error-ui" class="alert alert-warning">
30+
@if (Env.IsDevelopment())
31+
{
32+
<text>An unhandled exception has occurred. See browser dev tools for details.</text>
33+
}
34+
else
35+
{
36+
<text>An error has occurred. This application may no longer respond until reloaded.</text>
37+
}
38+
<div class="pt-3">
39+
<a href class="reload k-button">Reload</a>
40+
</div>
41+
</div>
42+
43+
<script src="_framework/blazor.web.js"></script>
44+
</body>
45+
</html>

sample-applications/blazor-dashboard/BlazorDashboard/BlazorDashboard.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
5-
<LangVersion>9</LangVersion>
4+
<TargetFramework>net8.0</TargetFramework>
65
</PropertyGroup>
76

87
<ItemGroup>

sample-applications/blazor-dashboard/BlazorDashboard/Pages/_Host.cshtml

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

0 commit comments

Comments
 (0)