Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded MudBlazor Templates to .NET 9 #482

Open
wants to merge 13 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/continuous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
9.0.x
- name: 'Cache: .nuke/temp, ~/.nuget/packages'
uses: actions/cache@v4
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/mudblazor-ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: mudblazor-ci

on:
'on':
push:
branches: [ dev ]
pull_request:
Expand All @@ -11,11 +11,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v4
- name: Install and build all templates
shell: pwsh
run: |
./InstallAndBuildAllTemplates.ps1
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
9.0.x
- name: Install and build all templates
shell: pwsh
run: |
./InstallAndBuildAllTemplates.ps1
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
9.0.x
- name: 'Cache: .nuke/temp, ~/.nuget/packages'
uses: actions/cache@v4
Expand Down
2 changes: 1 addition & 1 deletion src/MudBlazor.Templates.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<!-- Keep package type as 'Template' to show the package as a template package on nuget.org and make your template available in dotnet new search.-->
<PackageType>Template</PackageType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<IncludeContentInPack>true</IncludeContentInPack>
<IncludeBuildOutput>false</IncludeBuildOutput>
<ContentTargetFolders>content</ContentTargetFolders>
Expand Down
2 changes: 1 addition & 1 deletion src/mudblazor/.template.config/dotnetcli.host.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "http://json.schemastore.org/dotnetcli.host",
"$schema": "https://json.schemastore.org/dotnetcli.host",
"symbolInfo": {
"skipRestore": {
"longName": "no-restore",
Expand Down
2 changes: 1 addition & 1 deletion src/mudblazor/.template.config/ide.host.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "http://json.schemastore.org/ide.host",
"$schema": "https://json.schemastore.org/ide.host",
"order": 610,
"icon": "icon.png",
"disableHttpsSymbol": "NoHttps",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Webová aplikace Blazor",
"description": "Šablona projektu pro vytvoření webové aplikace Blazor, která podporuje vykreslování na straně serveru i interaktivitu klienta. Tato šablona se dá použít pro webové aplikace s bohatými dynamickými uživatelskými rozhraními (UI).",
"symbols/Framework/description": "Cílová architektura pro projekt",
"symbols/Framework/choices/net8.0/description": "Cílový net8.0",
"symbols/Framework/choices/net9.0/description": "Target net9.0",
"symbols/UserSecretsId/description": "ID, které se má použít pro tajné kódy (používá se s individuálním ověřováním).",
"symbols/skipRestore/description": "Pokud se tato možnost zadá, přeskočí automatické obnovení projektu při vytvoření.",
"symbols/ExcludeLaunchSettings/description": "Určuje, jestli se má z vygenerované šablony vyloučit soubor launchSettings.json.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Blazor-Web-App",
"description": "Eine Projektvorlage zum Erstellen einer Blazor-Web-App, die sowohl serverseitiges Rendering als auch Clientinteraktivität unterstützt. Diese Vorlage kann für Web-Apps mit umfangreichen dynamischen Benutzeroberflächen (UIs) verwendet werden.",
"symbols/Framework/description": "Das Zielframework für das Projekt.",
"symbols/Framework/choices/net8.0/description": "Ziel net8.0",
"symbols/Framework/choices/net9.0/description": "Target net9.0",
"symbols/UserSecretsId/description": "Die für Geheimnisse zu verwendende ID (Verwendung mit individueller Authentifizierung).",
"symbols/skipRestore/description": "Wenn angegeben, wird die automatische Wiederherstellung des Projekts beim Erstellen übersprungen.",
"symbols/ExcludeLaunchSettings/description": "Ob launchSettings.json aus der generierten Vorlage ausgeschlossen werden soll.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Blazor Web App",
"description": "A project template for creating a Blazor web app that supports both server-side rendering and client interactivity. This template can be used for web apps with rich dynamic user interfaces (UIs).",
"symbols/Framework/description": "The target framework for the project.",
"symbols/Framework/choices/net8.0/description": "Target net8.0",
"symbols/Framework/choices/net9.0/description": "Target net9.0",
"symbols/UserSecretsId/description": "The ID to use for secrets (use with Individual auth).",
"symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.",
"symbols/ExcludeLaunchSettings/description": "Whether to exclude launchSettings.json from the generated template.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Aplicación web Blazor",
"description": "Plantilla de proyecto para crear una aplicación web de Blazor que admita tanto la representación del lado del servidor como la interactividad del cliente. Esta plantilla se puede usar para las aplicaciones web con interfaces de usuario dinámicas enriquecidas.",
"symbols/Framework/description": "Marco de destino del proyecto.",
"symbols/Framework/choices/net8.0/description": "net8.0 de destino",
"symbols/Framework/choices/net9.0/description": "Target net9.0",
"symbols/UserSecretsId/description": "Identificador que se va a usar para los secretos (se usa con la autenticación individual).",
"symbols/skipRestore/description": "Si se especifica, se omite la restauración automática del proyecto durante la creación.",
"symbols/ExcludeLaunchSettings/description": "Indica si se va a excluir launchSettings.json de la plantilla generada.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Application web Blazor",
"description": "Modèle de projet pour la création d’une application web Blazor qui prend en charge le rendu côté serveur et l’interactivité du client. Ce modèle peut être utilisé pour les applications web avec des interfaces utilisateur dynamiques enrichies.",
"symbols/Framework/description": "Framework cible du projet.",
"symbols/Framework/choices/net8.0/description": "Cible net8.0",
"symbols/Framework/choices/net9.0/description": "Target net9.0",
"symbols/UserSecretsId/description": "ID à utiliser pour les secrets (à utiliser avec l’authentification individuelle).",
"symbols/skipRestore/description": "S’il est spécifié, ignore la restauration automatique du projet lors de la création.",
"symbols/ExcludeLaunchSettings/description": "Indique s’il faut exclure launchSettings.json du modèle généré.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "App Web Blazor",
"description": "Modello di progetto per la creazione di un'app Web Blazor che supporta sia il rendering lato server sia l'interattività client. Questo modello può essere usato per app Web con interfacce utente dinamiche avanzate.",
"symbols/Framework/description": "Il framework di destinazione per il progetto.",
"symbols/Framework/choices/net8.0/description": "Destinazione net8.0",
"symbols/Framework/choices/net9.0/description": "Target net9.0",
"symbols/UserSecretsId/description": "ID da usare per i segreti (usare con l'autenticazione Individual).",
"symbols/skipRestore/description": "Se specificato, ignora il ripristino automatico del progetto durante la creazione.",
"symbols/ExcludeLaunchSettings/description": "Indica se escludere launchSettings.json dal modello generato.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Blazor Web アプリ",
"description": "サーバー側のレンダリングとクライアントの対話機能の両方をサポートする Blazor Web アプリを作成するためのプロジェクト テンプレートです。このテンプレートは、リッチな動的ユーザー インターフェイス (UI) を持つ Web アプリに使用できます。",
"symbols/Framework/description": "プロジェクトのターゲット フレームワークです。",
"symbols/Framework/choices/net8.0/description": "ターゲット net8.0",
"symbols/Framework/choices/net9.0/description": "Target net9.0",
"symbols/UserSecretsId/description": "シークレットで使用する ID (IndividualAuth で使用)。",
"symbols/skipRestore/description": "指定した場合、作成時にプロジェクトの自動復元がスキップされます。",
"symbols/ExcludeLaunchSettings/description": "生成されたテンプレートから launchSettings.json を除外するかどうか。",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Blazor 웹앱",
"description": "서버 측 렌더링 및 클라이언트 대화형 작업을 모두 지원하는 Blazor 웹앱을 만들기 위한 프로젝트 템플릿입니다. 이 템플릿은 풍부한 동적 UI(사용자 인터페이스)가 있는 웹앱에 사용할 수 있습니다.",
"symbols/Framework/description": "프로젝트에 대한 대상 프레임워크입니다.",
"symbols/Framework/choices/net8.0/description": "대상 net8.0",
"symbols/Framework/choices/net9.0/description": "Target net9.0",
"symbols/UserSecretsId/description": "비밀에 사용할 ID입니다(개별 인증과 함께 사용).",
"symbols/skipRestore/description": "지정된 경우, 프로젝트 생성 시 자동 복원을 건너뜁니다.",
"symbols/ExcludeLaunchSettings/description": "생성된 템플릿에서 launchSettings.json을 제외할지 여부입니다.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Aplikacja internetowa Blazor",
"description": "Szablon projektu służący do tworzenia aplikacji internetowej platformy Blazor, która obsługuje renderowanie po stronie serwera i interakcyjność klienta. Ten szablon może być używany dla aplikacji internetowych z zaawansowanymi dynamicznymi interfejsami użytkownika.",
"symbols/Framework/description": "Platforma docelowa dla tego projektu.",
"symbols/Framework/choices/net8.0/description": "Docelowa platforma net8.0",
"symbols/Framework/choices/net9.0/description": "Target net9.0",
"symbols/UserSecretsId/description": "Identyfikator do użycia dla wpisów tajnych (używany z indywidualnym uwierzytelnianym).",
"symbols/skipRestore/description": "Jeśli ta opcja jest określona, pomija automatyczne przywracanie projektu podczas tworzenia.",
"symbols/ExcludeLaunchSettings/description": "Określa, czy wykluczyć plik launchSettings.json z wygenerowanego szablonu.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Aplicativo Web Blazor",
"description": "Um modelo de projeto para criar um aplicativo Web Blazor que dá suporte à renderização do lado do servidor e à interatividade do cliente. Este modelo pode ser usado para aplicativos da Web com interfaces de usuário (UIs) dinâmicas avançadas.",
"symbols/Framework/description": "A estrutura de destino do projeto.",
"symbols/Framework/choices/net8.0/description": "net8.0 de destino",
"symbols/Framework/choices/net9.0/description": "Target net9.0",
"symbols/UserSecretsId/description": "O ID a ser usado para segredos (usado com autenticação individual).",
"symbols/skipRestore/description": "Se especificado, ignora a restauração automática do projeto sendo criado.",
"symbols/ExcludeLaunchSettings/description": "Se deve excluir launchSettings.json do modelo gerado.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Веб-приложение Blazor",
"description": "Шаблон проекта для создания приложения Blazor, поддерживающего как отрисовку на стороне сервера, так и интерактивные возможности клиента. Этот шаблон можно использовать для веб-приложений с многофункциональными динамическими пользовательскими интерфейсами (UI).",
"symbols/Framework/description": "Целевая платформа для проекта.",
"symbols/Framework/choices/net8.0/description": "Целевая net8.0",
"symbols/Framework/choices/net9.0/description": "Target net9.0",
"symbols/UserSecretsId/description": "Идентификатор, используемый для секретов (применяется с индивидуальной проверкой подлинности).",
"symbols/skipRestore/description": "Если установлено, автоматическое восстановление проекта при создании пропускается.",
"symbols/ExcludeLaunchSettings/description": "Следует ли исключить launchSettings.json из созданного шаблона.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Blazor Web Uygulaması",
"description": "Hem sunucu tarafı işlemeyi hem de istemci etkileşimini destekleyen bir Blazor web uygulaması oluşturmaya yönelik proje şablonu. Bu şablon, zengin dinamik kullanıcı arabirimlerine (UI) sahip web uygulamaları için kullanılabilir.",
"symbols/Framework/description": "Projenin hedef çerçevesi.",
"symbols/Framework/choices/net8.0/description": "Hedef net8.0",
"symbols/Framework/choices/net9.0/description": "Target net9.0",
"symbols/UserSecretsId/description": "Gizli diziler için kullanılacak kimlik (Bireysel kimlik doğrulamayla kullanın).",
"symbols/skipRestore/description": "Belirtilirse, oluşturma sırasında projenin otomatik geri yüklenmesini atlar.",
"symbols/ExcludeLaunchSettings/description": "launchSettings.json öğesinin oluşturulan şablondan dışlanıp dışlanmayacağı.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Blazor Web 应用",
"description": "用于创建支持服务器端呈现和客户端交互的 Blazor Web 应用的项目模板。此模板可用于具有丰富动态用户界面 (UI) 的 Web 应用。",
"symbols/Framework/description": "项目的目标框架。",
"symbols/Framework/choices/net8.0/description": "目标 net8.0",
"symbols/Framework/choices/net9.0/description": "Target net9.0",
"symbols/UserSecretsId/description": "用于机密的 ID (与个人身份验证一起使用)。",
"symbols/skipRestore/description": "如果指定,则在创建时跳过项目的自动还原。",
"symbols/ExcludeLaunchSettings/description": "是否从生成的模板中排除 launchSettings.json。",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Blazor Web 應用程式",
"description": "用於建立同時支援伺服器端轉譯和用戶端互動的 Blazor Web 應用程式的專案範本。此範本可用於具有豐富動態使用者介面 (UI) 的 Web 應用程式。",
"symbols/Framework/description": "專案的目標 Framework。",
"symbols/Framework/choices/net8.0/description": "目標 net8.0",
"symbols/Framework/choices/net9.0/description": "Target net9.0",
"symbols/UserSecretsId/description": "用於祕密的識別碼 (搭配個別驗證使用)。",
"symbols/skipRestore/description": "若指定,會在建立時跳過專案的自動還原。",
"symbols/ExcludeLaunchSettings/description": "是否要從產生的範本排除 launchSettings.json。",
Expand Down
43 changes: 12 additions & 31 deletions src/mudblazor/.template.config/template.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "http://json.schemastore.org/template",
"$schema": "https://json.schemastore.org/template",
"author": "MudBlazor",
"classifications": [
"Web",
Expand All @@ -18,7 +18,7 @@
"650B3CE7-2E93-4CC4-9F46-466686815EAA",
"53bc9b9d-9d6a-45d4-8429-2a2761773502"
],
"identity": "MudBlazorWebApp.CSharp.8.0",
"identity": "MudBlazorWebApp.CSharp.9.0",
"thirdPartyNotices": "",
"preferNameDirectory": true,
"primaryOutputs": [
Expand Down Expand Up @@ -52,13 +52,7 @@
"**/wwwroot/bootstrap/**"
],
"modifiers": [
{
"condition": "(!IndividualLocalAuth)",
"exclude": [
"**/wwwroot/bootstrap/**"
]
},
{
Comment on lines -55 to -61
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines ensure that bootstrap isn't included in MudBlazor templates. However, we removed this folder in PR #465 and it won't appear again unless we start templates completely from scratch in the future.

{
"condition": "(!UseWebAssembly)",
"exclude": [
"MudBlazor.Template.Client/**",
Expand All @@ -73,6 +67,7 @@
"rename": {
"MudBlazor.Template/Components/Layout/": "./MudBlazor.Template.Client/Layout/",
"MudBlazor.Template/Components/Pages/Home.razor": "./MudBlazor.Template.Client/Pages/Home.razor",
"MudBlazor.Template/Components/Pages/Weather.razor": "./MudBlazor.Template.Client/Pages/Weather.razor",
"MudBlazor.Template/Components/Routes.razor": "./MudBlazor.Template.Client/Routes.razor"
}
},
Expand All @@ -94,10 +89,9 @@
}
},
{
"condition": "(UseWebAssembly || (!UseWebAssembly && !UseServer))",
"condition": "(!(UseServer && !UseWebAssembly))",
"exclude": [
"MudBlazor.Template/Components/Pages/Counter.razor",
"MudBlazor.Template/Components/Pages/Weather.razor"
"MudBlazor.Template/Components/Pages/Counter.razor"
]
},
{
Expand Down Expand Up @@ -130,7 +124,6 @@
"exclude": [
"MudBlazor.Template/Components/Account/**",
"MudBlazor.Template/Data/**",
"MudBlazor.Template.Client/PersistentAuthenticationStateProvider.cs",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This provider is no longer necessary as of .NET 9.

"MudBlazor.Template.Client/UserInfo.cs",
"MudBlazor.Template.Client/Pages/Auth.razor"
]
Expand All @@ -148,24 +141,12 @@
]
},
{
"condition": "(!(IndividualLocalAuth && UseServer && UseWebAssembly))",
"exclude": [
"MudBlazor.Template/Components/Account/PersistingRevalidatingAuthenticationStateProvider.cs"
]
},
{
"condition": "(!(IndividualLocalAuth && UseServer && !UseWebAssembly))",
Comment on lines -151 to -157
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This provider has been completely removed in .NET 9.

"condition": "(!(IndividualLocalAuth && UseServer))",
"exclude": [
"MudBlazor.Template/Components/Account/IdentityRevalidatingAuthenticationStateProvider.cs"
]
},
{
"condition": "(!(IndividualLocalAuth && !UseServer && UseWebAssembly))",
"exclude": [
"MudBlazor.Template/Components/Account/PersistingServerAuthenticationStateProvider.cs"
]
},
{
{
"condition": "(IndividualLocalAuth && UseLocalDB && UseWebAssembly)",
"rename": {
"MudBlazor.Template/Data/SqlServer/": "MudBlazor.Template/Data/Migrations/"
Expand Down Expand Up @@ -217,12 +198,12 @@
"datatype": "choice",
"choices": [
{
"choice": "net8.0",
"description": "Target net8.0"
"choice": "net9.0",
"description": "Target net9.0"
}
],
"replaces": "net8.0",
"defaultValue": "net8.0"
"replaces": "net9.0",
"defaultValue": "net9.0"
},
"HostIdentifier": {
"type": "bind",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>
Expand All @@ -11,9 +11,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="8.*" Condition="'$(IndividualLocalAuth)' == 'True'" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="9.*" Condition="'$(IndividualLocalAuth)' == 'True'" />
<PackageReference Include="MudBlazor" Version="7.*" />
</ItemGroup>

</Project>
</Project>
Loading
Loading