diff --git a/.github/workflows/build-core-lib.yml b/.github/workflows/build-core-lib.yml index ba5d8894ff..e835091c21 100644 --- a/.github/workflows/build-core-lib.yml +++ b/.github/workflows/build-core-lib.yml @@ -25,7 +25,7 @@ on: env: PROJECTS: "./src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj" TESTS: "./tests/Core/Microsoft.FluentUI.AspNetCore.Components.Tests.csproj" - DOTNET_VERSION: "net9.0" + DOTNET_VERSION: "net10.0" jobs: Build: @@ -48,17 +48,17 @@ jobs: # dotnet-version: 8.0.x # dotnet-quality: ga - - name: Setup .NET 9.0 - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 9.0.205 - # dotnet-quality: ga - - # - name: Setup .NET 10.0 + # - name: Setup .NET 9.0 # uses: actions/setup-dotnet@v4 # with: - # dotnet-version: 10.0.x - # dotnet-quality: preview + # dotnet-version: 9.0.x + # dotnet-quality: ga + + - name: Setup .NET 10.0 + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 10.0.x + dotnet-quality: preview # Build @@ -134,7 +134,7 @@ jobs: - name: Report Generator uses: danielpalme/ReportGenerator-GitHub-Action@5.2.4 with: - reports: '**/coverage.cobertura.xml;**/coverage.net8.0.cobertura.xml;**/coverage.net9.0.cobertura.xml' + reports: '**/coverage.cobertura.xml;**/coverage.net8.0.cobertura.xml;**/coverage.net9.0.cobertura.xml;**/coverage.net10.0.cobertura.xml' targetdir: 'CoverageReports' title: 'Unit Tests Code Coverage' classfilters: '-Microsoft.FluentUI.AspNetCore.Components.DesignTokens.*' diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 9e99abc687..6b72d5b485 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -41,7 +41,8 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: 9.0.205 + dotnet-version: 9.0.x + dotnet-quality: ga - name: Initialize CodeQL uses: github/codeql-action/init@v3 diff --git a/.github/workflows/deploy_demo.yml b/.github/workflows/deploy_demo.yml index f6060b9f2d..1c4c71f7d5 100644 --- a/.github/workflows/deploy_demo.yml +++ b/.github/workflows/deploy_demo.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest name: Build and deploy Demo site env: - DOTNET_VERSION: "net9.0" + DOTNET_VERSION: "net10.0" DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 DOTNET_NOLOGO: true @@ -37,17 +37,17 @@ jobs: - name: Checkout source uses: actions/checkout@v4 - - name: .NET Setup SDKs - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 9.0.205 - # dotnet-quality: ga - - # - name: Setup .NET 10.0 + # - name: .NET Setup SDKs # uses: actions/setup-dotnet@v4 # with: - # dotnet-version: 10.0.x - # dotnet-quality: preview + # dotnet-version: 9.0.x + # dotnet-quality: ga + + - name: Setup .NET 10.0 + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 10.0.x + dotnet-quality: preview - name: NPM Install uses: actions/setup-node@v4 diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index 3120063638..2b618075b9 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest name: Build and deploy Demo site env: - DOTNET_VERSION: "net9.0" + DOTNET_VERSION: "net10.0" DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 DOTNET_NOLOGO: true @@ -38,17 +38,17 @@ jobs: - name: Checkout source uses: actions/checkout@v4 - - name: .NET Setup SDKs - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 9.0.205 - # dotnet-quality: ga - - # - name: Setup .NET 10.0 + # - name: .NET Setup SDKs # uses: actions/setup-dotnet@v4 # with: - # dotnet-version: 10.0.x - # dotnet-quality: preview + # dotnet-version: 9.0.205 + # dotnet-quality: ga + + - name: Setup .NET 10.0 + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 10.0.x + dotnet-quality: preview - name: NPM Install uses: actions/setup-node@v4 diff --git a/Directory.Packages.props b/Directory.Packages.props index e04052822e..56989f0f84 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -2,39 +2,39 @@ true 8.0.0 - 8.0.18 - 8.0.18 - 9.0.7 - 9.0.7 - 9.0.7 - 10.0.0-preview.6.25358.103 - 10.0.0-preview.6.25358.103 - 10.0.0-preview.6.25358.103 + 8.0.20 + 8.0.20 + 9.0.9 + 9.0.9 + 9.0.9 + 10.0.0-rc.1.25451.107 + 10.0.0-rc.1.25451.107 + 10.0.0-rc.1.25451.107 - - + + - + - + - - + + - + @@ -88,4 +88,4 @@ - + \ No newline at end of file diff --git a/Microsoft.FluentUI.sln b/Microsoft.FluentUI.sln index 1aaefd1c20..07f6afd98f 100644 --- a/Microsoft.FluentUI.sln +++ b/Microsoft.FluentUI.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.7.33808.371 +# Visual Studio Version 18 +VisualStudioVersion = 18.0.11010.61 d18.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{141FEF3E-C665-4D50-8E51-B9507C98040E}" EndProject diff --git a/eng/pipelines/build-all-lib.yml b/eng/pipelines/build-all-lib.yml index 61ffacf633..c3b6fbc090 100644 --- a/eng/pipelines/build-all-lib.yml +++ b/eng/pipelines/build-all-lib.yml @@ -131,7 +131,7 @@ extends: - task: UseDotNet@2 displayName: 'Install .NET 9.0' inputs: - version: 9.0.205 + version: 9.0.x includePreviewVersions: false - task: UseDotNet@2 diff --git a/eng/pipelines/build-core-lib.yml b/eng/pipelines/build-core-lib.yml index 23ea34a177..0c87859f34 100644 --- a/eng/pipelines/build-core-lib.yml +++ b/eng/pipelines/build-core-lib.yml @@ -164,7 +164,7 @@ extends: - task: UseDotNet@2 displayName: 'Install .NET 9.0' inputs: - version: 9.0.205 + version: 9.0.x includePreviewVersions: false - task: UseDotNet@2 diff --git a/examples/Demo/AssetExplorer/FluentUI.Demo.AssetExplorer.csproj b/examples/Demo/AssetExplorer/FluentUI.Demo.AssetExplorer.csproj index 31fedf9d98..6d01f729dc 100644 --- a/examples/Demo/AssetExplorer/FluentUI.Demo.AssetExplorer.csproj +++ b/examples/Demo/AssetExplorer/FluentUI.Demo.AssetExplorer.csproj @@ -1,7 +1,7 @@ - + - net8.0;net9.0 + net8.0;net9.0;net10.0 enable enable true diff --git a/examples/Demo/Client/FluentUI.Demo.Client.csproj b/examples/Demo/Client/FluentUI.Demo.Client.csproj index dc1f848247..f9ed366b81 100644 --- a/examples/Demo/Client/FluentUI.Demo.Client.csproj +++ b/examples/Demo/Client/FluentUI.Demo.Client.csproj @@ -1,7 +1,7 @@ - + - net8.0;net9.0 + net8.0;net9.0;net10.0 enable enable latest diff --git a/examples/Demo/Server/FluentUI.Demo.Server.csproj b/examples/Demo/Server/FluentUI.Demo.Server.csproj index 9998bab8ba..b48bf421af 100644 --- a/examples/Demo/Server/FluentUI.Demo.Server.csproj +++ b/examples/Demo/Server/FluentUI.Demo.Server.csproj @@ -1,7 +1,7 @@ - + - net8.0;net9.0 + net8.0;net9.0;net10.0 enable enable latest diff --git a/examples/Demo/Shared/FluentUI.Demo.Shared.csproj b/examples/Demo/Shared/FluentUI.Demo.Shared.csproj index d91ef29927..8c225fd424 100644 --- a/examples/Demo/Shared/FluentUI.Demo.Shared.csproj +++ b/examples/Demo/Shared/FluentUI.Demo.Shared.csproj @@ -1,6 +1,6 @@ - + - net8.0;net9.0 + net8.0;net9.0;net10.0 enable enable latest diff --git a/global.bak b/global.bak index abffda5932..9b437f41ea 100644 --- a/global.bak +++ b/global.bak @@ -1,6 +1,6 @@ { "sdk": { - "version": "9.0.301", + "version": "9.0.305", "allowPrerelease": true, "rollForward": "latestPatch" } diff --git a/global.json b/global.json deleted file mode 100644 index d7ba566b79..0000000000 --- a/global.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "sdk": { - "version": "9.0.205", - "allowPrerelease": true, - "rollForward": "latestPatch" - } -} diff --git a/src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj b/src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj index a327a2e165..02d223b148 100644 --- a/src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj +++ b/src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj @@ -1,6 +1,6 @@ - net8.0;net9.0 + net8.0;net9.0;net10.0 Microsoft.FluentUI.AspNetCore.Components A Blazor component library leveraging Microsoft’s Fluent Design System UI. Use the look of modern Microsoft products in your Blazor applications diff --git a/src/Extensions/DataGrid.EntityFrameworkAdapter/Microsoft.FluentUI.AspNetCore.Components.DataGrid.EntityFrameworkAdapter.csproj b/src/Extensions/DataGrid.EntityFrameworkAdapter/Microsoft.FluentUI.AspNetCore.Components.DataGrid.EntityFrameworkAdapter.csproj index 7996875c21..c494bc3ac1 100644 --- a/src/Extensions/DataGrid.EntityFrameworkAdapter/Microsoft.FluentUI.AspNetCore.Components.DataGrid.EntityFrameworkAdapter.csproj +++ b/src/Extensions/DataGrid.EntityFrameworkAdapter/Microsoft.FluentUI.AspNetCore.Components.DataGrid.EntityFrameworkAdapter.csproj @@ -1,7 +1,7 @@ - net8.0;net9.0 + net8.0;net9.0;net10.0 Microsoft.FluentUI.AspNetCore.Components.DataGrid.EntityFrameworkAdapter Microsoft © Microsoft Corporation. All rights reserved. diff --git a/src/Extensions/DataGrid.ODataAdapter/Microsoft.FluentUI.AspNetCore.Components.DataGrid.ODataAdapter.csproj b/src/Extensions/DataGrid.ODataAdapter/Microsoft.FluentUI.AspNetCore.Components.DataGrid.ODataAdapter.csproj index 4e43e1c846..7407edbce7 100644 --- a/src/Extensions/DataGrid.ODataAdapter/Microsoft.FluentUI.AspNetCore.Components.DataGrid.ODataAdapter.csproj +++ b/src/Extensions/DataGrid.ODataAdapter/Microsoft.FluentUI.AspNetCore.Components.DataGrid.ODataAdapter.csproj @@ -1,6 +1,6 @@ - net8.0;net9.0 + net8.0;net9.0;net10.0 Microsoft.FluentUI.AspNetCore.Components.DataGrid.ODataAdapter Microsoft © Microsoft Corporation. All rights reserved. diff --git a/src/Templates/templates/blazorweb-csharp-10/.template.config/dotnetcli.host.json b/src/Templates/templates/blazorweb-csharp-10/.template.config/dotnetcli.host.json index 9c853513c3..a8976faa91 100644 --- a/src/Templates/templates/blazorweb-csharp-10/.template.config/dotnetcli.host.json +++ b/src/Templates/templates/blazorweb-csharp-10/.template.config/dotnetcli.host.json @@ -53,6 +53,10 @@ "UseProgramMain": { "longName": "use-program-main", "shortName": "" + }, + "LocalhostTld": { + "longName": "localhost-tld", + "shortName": "" } }, "usageExamples": [ diff --git a/src/Templates/templates/blazorweb-csharp-10/.template.config/ide.host.json b/src/Templates/templates/blazorweb-csharp-10/.template.config/ide.host.json index 71b187aeeb..a08c95f87b 100644 --- a/src/Templates/templates/blazorweb-csharp-10/.template.config/ide.host.json +++ b/src/Templates/templates/blazorweb-csharp-10/.template.config/ide.host.json @@ -25,6 +25,12 @@ "isVisible": true, "persistenceScope": "shared", "persistenceScopeName": "Microsoft" + }, + { + "id": "LocalhostTld", + "isVisible": true, + "persistenceScope": "shared", + "persistenceScopeName": "Microsoft" } ] } diff --git a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.cs.json b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.cs.json index 135fad38a2..e038d80b29 100644 --- a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.cs.json +++ b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.cs.json @@ -39,6 +39,8 @@ "symbols/NoHttps/description": "Určuje, jestli se má vypnout protokol HTTPS. Tato možnost platí jenom v případě, že se pro --auth nepoužívá jednotlivec.", "symbols/UseProgramMain/displayName": "Nepoužívat _příkazy nejvyšší úrovně", "symbols/UseProgramMain/description": "Určuje, jestli se má místo příkazů nejvyšší úrovně generovat explicitní třída Program a metoda Main.", + "symbols/LocalhostTld/displayName": "Použití TLD .dev.localhost v adrese URL aplikace", + "symbols/LocalhostTld/description": "Určuje, jestli se má název projektu zkombinovat s TLD .dev.localhost v adrese URL aplikace pro místní vývoj, například https://myapp.dev.localhost:12345.", "postActions/restore/description": "Obnoví balíčky NuGet vyžadované tímto projektem.", "postActions/restore/manualInstructions/default/text": "Spustit dotnet restore" } diff --git a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.de.json b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.de.json index f51a3d07e4..b2d633a84e 100644 --- a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.de.json +++ b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.de.json @@ -39,6 +39,8 @@ "symbols/NoHttps/description": "Ob HTTPS deaktiviert werden soll. Diese Option gilt nur, wenn \"Individual\" nicht für \"--auth\" verwendet wird.", "symbols/UseProgramMain/displayName": "Keine Anweisungen_der obersten Ebene verwenden", "symbols/UseProgramMain/description": "Gibt an, ob anstelle von Anweisungen der obersten Ebene eine explizite Programmklasse und eine Main-Methode generiert werden soll.", + "symbols/LocalhostTld/displayName": "Verwenden der .dev.localhost-TLD in der Anwendungs-URL", + "symbols/LocalhostTld/description": "Gibt an, ob der Projektname mit der .dev.localhost-TLD in der Anwendungs-URL für die lokale Entwicklung kombiniert werden soll, z. B. https://myapp.dev.localhost:12345.", "postActions/restore/description": "„NuGet-Pakete“ wiederherstellen, die für dieses Projekt erforderlich sind.", "postActions/restore/manualInstructions/default/text": "„dotnet restore“ ausführen" } diff --git a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.en.json b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.en.json index 19ddf56694..da8977b4d3 100644 --- a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.en.json +++ b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.en.json @@ -39,6 +39,8 @@ "symbols/NoHttps/description": "Whether to turn off HTTPS. This option only applies if Individual isn't used for --auth.", "symbols/UseProgramMain/displayName": "Do not use _top-level statements", "symbols/UseProgramMain/description": "Whether to generate an explicit Program class and Main method instead of top-level statements.", + "symbols/LocalhostTld/displayName": "Use the .dev.localhost TLD in the application URL", + "symbols/LocalhostTld/description": "Whether to combine the project name with the .dev.localhost TLD in the application URL for local development, e.g. https://myapp.dev.localhost:12345.", "postActions/restore/description": "Restore NuGet packages required by this project.", "postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'" } diff --git a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.es.json b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.es.json index 3ed4b63366..43c55b4519 100644 --- a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.es.json +++ b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.es.json @@ -39,6 +39,8 @@ "symbols/NoHttps/description": "Si se va a desactivar HTTPS. Esta opción solo se aplica si individual no se usa para --auth.", "symbols/UseProgramMain/displayName": "No usar instrucciones de _nivel superior", "symbols/UseProgramMain/description": "Indica si se debe generar una clase Program explícita y un método Main en lugar de instrucciones de nivel superior.", + "symbols/LocalhostTld/displayName": "Usar el TLD .dev.localhost en la dirección URL de la aplicación", + "symbols/LocalhostTld/description": "Indica si se debe combinar el nombre del proyecto con el TLD .dev.localhost en la dirección URL de la aplicación para el desarrollo local, por ejemplo, https://myapp.dev.localhost:12345.", "postActions/restore/description": "Restaure los paquetes NuGet necesarios para este proyecto.", "postActions/restore/manualInstructions/default/text": "Ejecutar \"dotnet restore\"" } diff --git a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.fr.json b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.fr.json index 806966875c..cac7cdec6a 100644 --- a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.fr.json +++ b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.fr.json @@ -39,6 +39,8 @@ "symbols/NoHttps/description": "Indique s’il faut désactiver HTTPS. Cette option s’applique uniquement si Individual n’est pas utilisé pour --auth.", "symbols/UseProgramMain/displayName": "N’utilisez pas _d’instructions de niveau supérieur.", "symbols/UseProgramMain/description": "Indique s’il faut générer une classe Programme explicite et une méthode Main au lieu d’instructions de niveau supérieur.", + "symbols/LocalhostTld/displayName": "Utilisez le TLD .dev.localhost dans l’URL de l’application", + "symbols/LocalhostTld/description": "Indique s’il faut combiner le nom du projet avec le TLD .dev.localhost dans l’URL de l’application pour le développement local, par exemple https://myapp.dev.localhost:12345.", "postActions/restore/description": "Restaurez les packages NuGet requis par ce projet.", "postActions/restore/manualInstructions/default/text": "Exécuter « dotnet restore »" } diff --git a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.it.json b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.it.json index c38d4eb87f..fcb1df2724 100644 --- a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.it.json +++ b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.it.json @@ -39,6 +39,8 @@ "symbols/NoHttps/description": "Indica se disattivare HTTPS. Questa opzione si applica solo se Individual non viene usata per --auth.", "symbols/UseProgramMain/displayName": "Non usare_istruzioni di primo livello", "symbols/UseProgramMain/description": "Indica se generare una classe Program esplicita e un metodo Main anziché istruzioni di primo livello.", + "symbols/LocalhostTld/displayName": "Usa il TLD .dev.localhost nell'URL dell'applicazione", + "symbols/LocalhostTld/description": "Indicare se combinare il nome del progetto con il TLD .dev.localhost nell'URL dell'applicazione per lo sviluppo in locale, ad esempio https://myapp.dev.localhost:12345.", "postActions/restore/description": "Ripristina i pacchetti NuGet richiesti da questo progetto.", "postActions/restore/manualInstructions/default/text": "Esegui 'dotnet restore'" } diff --git a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.ja.json b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.ja.json index 05613d90b1..712e786868 100644 --- a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.ja.json +++ b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.ja.json @@ -39,6 +39,8 @@ "symbols/NoHttps/description": "HTTPS をオフにするかどうか。このオプションは、Individual が --auth に使用されていない場合にのみ適用されます。", "symbols/UseProgramMain/displayName": "最上位レベルのステートメントを使用しない(_T)", "symbols/UseProgramMain/description": "最上位レベルのステートメントではなく、明示的な Program クラスと Main メソッドを生成するかどうか。", + "symbols/LocalhostTld/displayName": "アプリケーション URL で .dev.localhost TLD を使用する", + "symbols/LocalhostTld/description": "ローカル開発用のアプリケーション URL 内で、プロジェクト名を .dev.localhost TLD と組み合わせるかどうか (例: https://myapp.dev.localhost:12345)。", "postActions/restore/description": "このプロジェクトに必要な NuGet パッケージを復元します。", "postActions/restore/manualInstructions/default/text": "'dotnet restore' を実行する" } diff --git a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.ko.json b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.ko.json index 61e337070e..7f7940f71f 100644 --- a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.ko.json +++ b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.ko.json @@ -39,6 +39,8 @@ "symbols/NoHttps/description": "HTTPS를 끌지 여부입니다. 이 옵션은 개별 항목이 --auth에 사용되지 않는 경우에만 적용됩니다.", "symbols/UseProgramMain/displayName": "최상위 문 사용 안 함(_T)", "symbols/UseProgramMain/description": "최상위 문 대신 명시적 Program 클래스 및 Main 메서드를 생성할지 여부입니다.", + "symbols/LocalhostTld/displayName": "애플리케이션 URL에서 .dev.localhost TLD를 사용하세요.", + "symbols/LocalhostTld/description": "로컬 개발을 위한 애플리케이션 URL에서 프로젝트 이름과 .dev.localhost TLD를 결합할지 여부, 예를 들어 https://myapp.dev.localhost:12345.", "postActions/restore/description": "이 프로젝트에 필요한 NuGet 패키지를 복원합니다.", "postActions/restore/manualInstructions/default/text": "'dotnet restore' 실행" } diff --git a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.pl.json b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.pl.json index a1b708e62a..ddbc93307a 100644 --- a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.pl.json +++ b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.pl.json @@ -39,6 +39,8 @@ "symbols/NoHttps/description": "Określa, czy wyłączyć protokół HTTPS. Ta opcja ma zastosowanie tylko wtedy, gdy opcja Individual nie została użyta dla opcji --auth.", "symbols/UseProgramMain/displayName": "Nie używaj ins_trukcji najwyższego poziomu", "symbols/UseProgramMain/description": "Określa, czy wygenerować jawną klasę Program i metodę Main zamiast instrukcji najwyższego poziomu.", + "symbols/LocalhostTld/displayName": "Użyj pliku .dev.localhost TLD w adresie URL aplikacji", + "symbols/LocalhostTld/description": "Określa, czy połączyć nazwę projektu z domeną najwyższego poziomu .dev.localhost w adresie URL aplikacji na potrzeby programowania lokalnego, np. https://myapp.dev.localhost:12345.", "postActions/restore/description": "Przywróć pakiety NuGet wymagane przez ten projekt.", "postActions/restore/manualInstructions/default/text": "Uruchom polecenie \"dotnet restore\"" } diff --git a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.pt-BR.json b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.pt-BR.json index 65736325db..5382d32a92 100644 --- a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.pt-BR.json +++ b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.pt-BR.json @@ -39,6 +39,8 @@ "symbols/NoHttps/description": "Se deve desligar o HTTPS. Essa opção só se aplica se Individual não for usado para --auth.", "symbols/UseProgramMain/displayName": "Não use ins_truções de nível superior", "symbols/UseProgramMain/description": "Se deve gerar uma classe de Programa explícita e um método principal em vez de instruções de nível superior.", + "symbols/LocalhostTld/displayName": "Usar o TLD .dev.localhost na URL do aplicativo", + "symbols/LocalhostTld/description": "Se deseja combinar o nome do projeto com o TLD .dev.localhost na URL do aplicativo para desenvolvimento local, por exemplo, https://myapp.dev.localhost:12345.", "postActions/restore/description": "Restaure os pacotes NuGet exigidos por este projeto.", "postActions/restore/manualInstructions/default/text": "Executa 'dotnet restore'" } diff --git a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.ru.json b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.ru.json index 486d15e130..f87890b388 100644 --- a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.ru.json +++ b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.ru.json @@ -39,6 +39,8 @@ "symbols/NoHttps/description": "Следует ли отключить HTTPS. Этот параметр применяется только в том случае, если для аргумента --auth не используется значение Individual.", "symbols/UseProgramMain/displayName": "Не использовать _операторы верхнего уровня", "symbols/UseProgramMain/description": "Следует ли создавать явный класс Program и метод Main вместо операторов верхнего уровня.", + "symbols/LocalhostTld/displayName": "Используйте домен верхнего уровня .dev.localhost в URL-адресе приложения", + "symbols/LocalhostTld/description": "Следует ли объединять имя проекта с TLD .dev.localhost в URL-адресе приложения для локальной разработки, например, https://myapp.dev.localhost:12345.", "postActions/restore/description": "Восстановление пакетов NuGet, необходимых для этого проекта.", "postActions/restore/manualInstructions/default/text": "Выполнить команду \"dotnet restore\"" } diff --git a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.tr.json b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.tr.json index 12f6b1e974..a341e359fb 100644 --- a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.tr.json +++ b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.tr.json @@ -39,6 +39,8 @@ "symbols/NoHttps/description": "HTTPS'nin kapatılıp kapatılmayacağı. Bu seçenek yalnızca Bireysel --auth için kullanılmadığında geçerlidir.", "symbols/UseProgramMain/displayName": "_Üst düzey deyimler kullanmayın", "symbols/UseProgramMain/description": "Üst düzey deyimler yerine açık bir Program sınıfı ve Ana yöntem oluşturup oluşturulmayacağını belirtir.", + "symbols/LocalhostTld/displayName": "Uygulama URL'sinde .dev.localhost TLD'sini kullanın", + "symbols/LocalhostTld/description": "Yerel geliştirme için uygulama URL'sinde proje adını .dev.localhost TLD ile birleştirip birleştirmeyeceğinizi seçin, örneğin https://myapp.dev.localhost:12345.", "postActions/restore/description": "Bu projenin gerektirdiği NuGet paketlerini geri yükleyin.", "postActions/restore/manualInstructions/default/text": "'dotnet restore' çalıştır" } diff --git a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.zh-Hans.json b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.zh-Hans.json index 81139761ad..36650de015 100644 --- a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.zh-Hans.json +++ b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.zh-Hans.json @@ -39,6 +39,8 @@ "symbols/NoHttps/description": "是否关闭 HTTPS。仅当 Individual 不用于 --auth 时,此选项才适用。", "symbols/UseProgramMain/displayName": "不使用顶级语句(_T)", "symbols/UseProgramMain/description": "是否生成显式程序类和主方法,而不是顶级语句。", + "symbols/LocalhostTld/displayName": "在应用程序 URL 中使用 .dev.localhost TLD", + "symbols/LocalhostTld/description": "是否在应用程序 URL 中将项目名称与 .dev.localhost TLD 合并以用于本地开发,例如 https://myapp.dev.localhost:12345。", "postActions/restore/description": "还原此项目所需的 NuGet 包。", "postActions/restore/manualInstructions/default/text": "运行 \"dotnet restore\"" } diff --git a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.zh-Hant.json b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.zh-Hant.json index 5fd2fa4a1a..79276bdcb5 100644 --- a/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.zh-Hant.json +++ b/src/Templates/templates/blazorweb-csharp-10/.template.config/localize/templatestrings.zh-Hant.json @@ -39,6 +39,8 @@ "symbols/NoHttps/description": "是否要關閉 HTTPS。此選項僅適用於個人未用於 --auth 時。", "symbols/UseProgramMain/displayName": "不要使用最上層陳述式(_T)", "symbols/UseProgramMain/description": "是否要產生明確的 Program 類別和 Main 方法,而非最上層語句。", + "symbols/LocalhostTld/displayName": "在應用程式 URL 中使用 .dev.localhost TLD", + "symbols/LocalhostTld/description": "是否要在本機開發的應用程式 URL 中將專案名稱與 .dev.localhost TLD 合併,例如 https://myapp.dev.localhost:12345。", "postActions/restore/description": "還原此專案所需的 NuGet 套件。", "postActions/restore/manualInstructions/default/text": "執行 'dotnet restore'" } diff --git a/src/Templates/templates/blazorweb-csharp-10/.template.config/template.json b/src/Templates/templates/blazorweb-csharp-10/.template.config/template.json index 149c9c4f71..86d7565642 100644 --- a/src/Templates/templates/blazorweb-csharp-10/.template.config/template.json +++ b/src/Templates/templates/blazorweb-csharp-10/.template.config/template.json @@ -331,6 +331,19 @@ }, "replaces": "44300" }, + "StyleBundleName":{ + "type": "generated", + "generator": "regex", + "replaces": "StyleBundleName", + "parameters": { + "source": "name", + "steps": [ + { + "regex": " ", + "replacement": "_" + }] + } + }, "InteractivityPlatform": { "type": "parameter", "datatype": "choice", @@ -475,6 +488,13 @@ "defaultValue": "false", "displayName": "Do not use _top-level statements", "description": "Whether to generate an explicit Program class and Main method instead of top-level statements." + }, + "LocalhostTld": { + "type": "parameter", + "datatype": "bool", + "defaultValue": "false", + "displayName": "Use the .dev.localhost TLD in the application URL", + "description": "Whether to combine the project name with the .dev.localhost TLD in the application URL for local development, e.g. https://myapp.dev.localhost:12345." } }, "tags": { diff --git a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/IdentityComponentsEndpointRouteBuilderExtensions.cs b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/IdentityComponentsEndpointRouteBuilderExtensions.cs index 09dde2a871..35ca33e1e1 100644 --- a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/IdentityComponentsEndpointRouteBuilderExtensions.cs +++ b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/IdentityComponentsEndpointRouteBuilderExtensions.cs @@ -1,5 +1,6 @@ using System.Security.Claims; using System.Text.Json; +using Microsoft.AspNetCore.Antiforgery; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Components.Authorization; using Microsoft.AspNetCore.Http.Extensions; @@ -54,8 +55,11 @@ public static IEndpointConventionBuilder MapAdditionalIdentityEndpoints(this IEn accountGroup.MapPost("/PasskeyCreationOptions", async ( HttpContext context, [FromServices] UserManager userManager, - [FromServices] SignInManager signInManager) => + [FromServices] SignInManager signInManager, + [FromServices] IAntiforgery antiforgery) => { + await antiforgery.ValidateRequestAsync(context); + var user = await userManager.GetUserAsync(context.User); if (user is null) { @@ -64,24 +68,27 @@ public static IEndpointConventionBuilder MapAdditionalIdentityEndpoints(this IEn var userId = await userManager.GetUserIdAsync(user); var userName = await userManager.GetUserNameAsync(user) ?? "User"; - var userEntity = new PasskeyUserEntity(userId, userName, displayName: userName); - var passkeyCreationArgs = new PasskeyCreationArgs(userEntity); - var options = await signInManager.ConfigurePasskeyCreationOptionsAsync(passkeyCreationArgs); - return TypedResults.Content(options.AsJson(), contentType: "application/json"); + var optionsJson = await signInManager.MakePasskeyCreationOptionsAsync(new() + { + Id = userId, + Name = userName, + DisplayName = userName + }); + return TypedResults.Content(optionsJson, contentType: "application/json"); }); accountGroup.MapPost("/PasskeyRequestOptions", async ( + HttpContext context, [FromServices] UserManager userManager, [FromServices] SignInManager signInManager, + [FromServices] IAntiforgery antiforgery, [FromQuery] string? username) => { + await antiforgery.ValidateRequestAsync(context); + var user = string.IsNullOrEmpty(username) ? null : await userManager.FindByNameAsync(username); - var passkeyRequestArgs = new PasskeyRequestArgs - { - User = user, - }; - var options = await signInManager.ConfigurePasskeyRequestOptionsAsync(passkeyRequestArgs); - return TypedResults.Content(options.AsJson(), contentType: "application/json"); + var optionsJson = await signInManager.MakePasskeyRequestOptionsAsync(user); + return TypedResults.Content(optionsJson, contentType: "application/json"); }); var manageGroup = accountGroup.MapGroup("/Manage").RequireAuthorization(); diff --git a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Login.razor b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Login.razor index f17a272b46..3a7286d0a2 100644 --- a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Login.razor +++ b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Login.razor @@ -88,14 +88,7 @@ if (!string.IsNullOrEmpty(Input.Passkey?.CredentialJson)) { // When performing passkey sign-in, don't perform form validation. - var options = await SignInManager.RetrievePasskeyRequestOptionsAsync(); - if (options is null) - { - errorMessage = "Error: Could not complete passkey login. Please try again."; - return; - } - - result = await SignInManager.PasskeySignInAsync(Input.Passkey.CredentialJson, options); + result = await SignInManager.PasskeySignInAsync(Input.Passkey.CredentialJson); } else { diff --git a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/ChangePassword.razor b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/ChangePassword.razor index 66dcd1e002..9304baa2c9 100644 --- a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/ChangePassword.razor +++ b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/ChangePassword.razor @@ -2,11 +2,10 @@ @using System.ComponentModel.DataAnnotations @using Microsoft.AspNetCore.Identity -@using TemplateWithPasskey.Data +@using BlazorWeb_CSharp.Data @inject UserManager UserManager @inject SignInManager SignInManager -@inject RedirectManager RedirectManager @inject IdentityRedirectManager RedirectManager @inject ILogger Logger diff --git a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/DeletePersonalData.razor b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/DeletePersonalData.razor index e00d5721f6..1a1e25f553 100644 --- a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/DeletePersonalData.razor +++ b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/DeletePersonalData.razor @@ -2,7 +2,7 @@ @using System.ComponentModel.DataAnnotations @using Microsoft.AspNetCore.Identity -@using TemplateWithPasskey.Data +@using BlazorWeb_CSharp.Data @inject UserManager UserManager @inject SignInManager SignInManager diff --git a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/Email.razor b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/Email.razor index 89960b5d6c..a836ebf923 100644 --- a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/Email.razor +++ b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/Email.razor @@ -5,7 +5,7 @@ @using System.Text.Encodings.Web @using Microsoft.AspNetCore.Identity @using Microsoft.AspNetCore.WebUtilities -@using TemplateWithPasskey.Data +@using BlazorWeb_CSharp.Data @inject UserManager UserManager @inject IEmailSender EmailSender diff --git a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/Index.razor b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/Index.razor index 3b2afa492a..8234c58ce9 100644 --- a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/Index.razor +++ b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/Index.razor @@ -2,7 +2,7 @@ @using System.ComponentModel.DataAnnotations @using Microsoft.AspNetCore.Identity -@using TemplateWithPasskey.Data +@using BlazorWeb_CSharp.Data @inject UserManager UserManager @inject SignInManager SignInManager diff --git a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/Passkeys.razor b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/Passkeys.razor index cd3893cd7f..121ef5ab49 100644 --- a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/Passkeys.razor +++ b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/Passkeys.razor @@ -1,6 +1,6 @@ @page "/Account/Manage/Passkeys" -@using TemplateWithPasskey.Data +@using BlazorWeb_CSharp.Data @using Microsoft.AspNetCore.Identity @using System.ComponentModel.DataAnnotations @using System.Buffers.Text @@ -60,16 +60,24 @@ {

No passkeys are registered.

} -
+ -

- Add a new passkey -

- + @if (currentPasskeys is { Count: >= MaxPasskeyCount }) + { +

You have reached the maximum number of allowed passkeys. Please delete one before adding a new one.

+ } + else + { + Add a new passkey + } + + @code { + private const int MaxPasskeyCount = 100; + private ApplicationUser? user; private IList? currentPasskeys; @@ -118,22 +126,21 @@ return; } - var options = await SignInManager.RetrievePasskeyCreationOptionsAsync(); - if (options is null) + if (currentPasskeys!.Count >= MaxPasskeyCount) { - RedirectManager.RedirectToCurrentPageWithStatus("Error: Could not retrieve passkey creation options.", HttpContext); + RedirectManager.RedirectToCurrentPageWithStatus($"Error: You have reached the maximum number of allowed passkeys.", HttpContext); return; } - var attestationResult = await SignInManager.PerformPasskeyAttestationAsync(Input.CredentialJson, options); + var attestationResult = await SignInManager.PerformPasskeyAttestationAsync(Input.CredentialJson); if (!attestationResult.Succeeded) { RedirectManager.RedirectToCurrentPageWithStatus($"Error: Could not add the passkey: {attestationResult.Failure.Message}", HttpContext); return; } - var setPasskeyResult = await UserManager.SetPasskeyAsync(user, attestationResult.Passkey); - if (!setPasskeyResult.Succeeded) + var addPasskeyResult = await UserManager.AddOrUpdatePasskeyAsync(user, attestationResult.Passkey); + if (!addPasskeyResult.Succeeded) { RedirectManager.RedirectToCurrentPageWithStatus("Error: The passkey could not be added to your account.", HttpContext); return; diff --git a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/PersonalData.razor b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/PersonalData.razor index a77cc5e69e..17f3034226 100644 --- a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/PersonalData.razor +++ b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/PersonalData.razor @@ -1,7 +1,7 @@ @page "/Account/Manage/PersonalData" @using Microsoft.AspNetCore.Identity -@using TemplateWithPasskey.Data +@using BlazorWeb_CSharp.Data @inject UserManager UserManager @inject IdentityRedirectManager RedirectManager diff --git a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/RenamePasskey.razor b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/RenamePasskey.razor index fef70ae37c..7a18252d5e 100644 --- a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/RenamePasskey.razor +++ b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/RenamePasskey.razor @@ -1,6 +1,6 @@ @page "/Account/Manage/RenamePasskey/{Id}" -@using TemplateWithPasskey.Data +@using BlazorWeb_CSharp.Data @using System.ComponentModel.DataAnnotations @using Microsoft.AspNetCore.Identity @using System.Buffers.Text @@ -79,7 +79,7 @@ private async Task Rename() { passkey!.Name = Input.Name; - var result = await UserManager.SetPasskeyAsync(user!, passkey); + var result = await UserManager.AddOrUpdatePasskeyAsync(user!, passkey); if (!result.Succeeded) { RedirectManager.RedirectToWithStatus("Account/Manage/Passkeys", "Error: The passkey could not be updated.", HttpContext); @@ -92,6 +92,7 @@ private sealed class InputModel { [Required] + [StringLength(200, ErrorMessage = "Passkey names must be no longer than {1} characters.")] public string Name { get; set; } = ""; } } diff --git a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/SetPassword.razor b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/SetPassword.razor index db0c616c80..2cb62fe137 100644 --- a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/SetPassword.razor +++ b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/SetPassword.razor @@ -2,7 +2,7 @@ @using System.ComponentModel.DataAnnotations @using Microsoft.AspNetCore.Identity -@using TemplateWithPasskey.Data +@using BlazorWeb_CSharp.Data @inject UserManager UserManager @inject SignInManager SignInManager diff --git a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/TwoFactorAuthentication.razor b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/TwoFactorAuthentication.razor index 964879329a..b7740f85a9 100644 --- a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/TwoFactorAuthentication.razor +++ b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Pages/Manage/TwoFactorAuthentication.razor @@ -2,7 +2,7 @@ @using Microsoft.AspNetCore.Http.Features @using Microsoft.AspNetCore.Identity -@using TemplateWithPasskey.Data +@using BlazorWeb_CSharp.Data @inject UserManager UserManager @inject SignInManager SignInManager diff --git a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Shared/PasskeySubmit.razor b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Shared/PasskeySubmit.razor index e20206d9c7..78c2028632 100644 --- a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Shared/PasskeySubmit.razor +++ b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Shared/PasskeySubmit.razor @@ -1,7 +1,20 @@ -@ChildContent - +@using Microsoft.AspNetCore.Antiforgery +@inject IServiceProvider Services +@ChildContent + + @code { + private AntiforgeryTokenSet? tokens; + + [CascadingParameter] + private HttpContext HttpContext { get; set; } = default!; + [Parameter] [EditorRequired] public PasskeyOperation Operation { get; set; } @@ -18,4 +31,9 @@ [Parameter(CaptureUnmatchedValues = true)] public IDictionary? AdditionalAttributes { get; set; } + + protected override void OnInitialized() + { + tokens = Services.GetService()?.GetTokens(HttpContext); + } } diff --git a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Shared/PasskeySubmit.razor.js b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Shared/PasskeySubmit.razor.js index 42d5d150aa..55a83bcc7b 100644 --- a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Shared/PasskeySubmit.razor.js +++ b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Account/Shared/PasskeySubmit.razor.js @@ -17,9 +17,10 @@ async function fetchWithErrorHandling(url, options = {}) { return response; } -async function createCredential(signal) { +async function createCredential(headers, signal) { const optionsResponse = await fetchWithErrorHandling('/Account/PasskeyCreationOptions', { method: 'POST', + headers, signal, }); const optionsJson = await optionsResponse.json(); @@ -27,9 +28,10 @@ async function createCredential(signal) { return await navigator.credentials.create({ publicKey: options, signal }); } -async function requestCredential(email, mediation, signal) { +async function requestCredential(email, mediation, headers, signal) { const optionsResponse = await fetchWithErrorHandling(`/Account/PasskeyRequestOptions?username=${email}`, { method: 'POST', + headers, signal, }); const optionsJson = await optionsResponse.json(); @@ -46,6 +48,8 @@ customElements.define('passkey-submit', class extends HTMLElement { operation: this.getAttribute('operation'), name: this.getAttribute('name'), emailName: this.getAttribute('email-name'), + requestTokenName: this.getAttribute('request-token-name'), + requestTokenValue: this.getAttribute('request-token-value'), }; this.internals.form.addEventListener('submit', (event) => { @@ -67,12 +71,16 @@ customElements.define('passkey-submit', class extends HTMLElement { throw new Error('Some passkey features are missing. Please update your browser.'); } + const headers = { + [this.attrs.requestTokenName]: this.attrs.requestTokenValue, + }; + if (this.attrs.operation === 'Create') { - return await createCredential(signal); + return await createCredential(headers, signal); } else if (this.attrs.operation === 'Request') { const email = new FormData(this.internals.form).get(this.attrs.emailName); const mediation = useConditionalMediation ? 'conditional' : undefined; - return await requestCredential(email, mediation, signal); + return await requestCredential(email, mediation, headers, signal); } else { throw new Error(`Unknown passkey operation '${this.attrs.operation}'.`); } @@ -88,11 +96,14 @@ customElements.define('passkey-submit', class extends HTMLElement { const credentialJson = JSON.stringify(credential); formData.append(`${this.attrs.name}.CredentialJson`, credentialJson); } catch (error) { + if (error.name === 'AbortError') { + // The user explicitly canceled the operation - return without error. + return; + } console.error(error); - if (useConditionalMediation || error.name === 'AbortError') { - // We do not relay the error to the user if: - // 1. We are attempting conditional mediation, meaning the user did not initiate the operation. - // 2. The user explicitly canceled the operation. + if (useConditionalMediation) { + // An error occurred during conditional mediation, which is not user-initiated. + // We log the error in the console but do not relay it to the user. return; } const errorMessage = error.name === 'NotAllowedError' diff --git a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Layout/ReconnectModal.razor.js b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Layout/ReconnectModal.razor.js index f58438240a..e52a190bac 100644 --- a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Layout/ReconnectModal.razor.js +++ b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Components/Layout/ReconnectModal.razor.js @@ -32,7 +32,7 @@ async function retry() { if (!successful) { // We have been able to reach the server, but the circuit is no longer available. // We'll reload the page so the user can continue using the app as quickly as possible. - const resumeSuccessful = await Blazor.resume(); + const resumeSuccessful = await Blazor.resumeCircuit(); if (!resumeSuccessful) { location.reload(); } else { @@ -47,7 +47,7 @@ async function retry() { async function resume() { try { - const successful = await Blazor.resume(); + const successful = await Blazor.resumeCircuit(); if (!successful) { location.reload(); } diff --git a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Data/SqlLite/00000000000000_CreateIdentitySchema.Designer.cs b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Data/SqlLite/00000000000000_CreateIdentitySchema.Designer.cs index ae1764e8d3..659ea417e7 100644 --- a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Data/SqlLite/00000000000000_CreateIdentitySchema.Designer.cs +++ b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Data/SqlLite/00000000000000_CreateIdentitySchema.Designer.cs @@ -187,40 +187,6 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasMaxLength(1024) .HasColumnType("BLOB"); - b.Property("AttestationObject") - .IsRequired() - .HasColumnType("BLOB"); - - b.Property("ClientDataJson") - .IsRequired() - .HasColumnType("BLOB"); - - b.Property("CreatedAt") - .HasColumnType("TEXT"); - - b.Property("IsBackedUp") - .HasColumnType("INTEGER"); - - b.Property("IsBackupEligible") - .HasColumnType("INTEGER"); - - b.Property("IsUserVerified") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("PublicKey") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("BLOB"); - - b.Property("SignCount") - .HasColumnType("INTEGER"); - - b.PrimitiveCollection("Transports") - .HasColumnType("TEXT"); - b.Property("UserId") .IsRequired() .HasColumnType("TEXT"); @@ -302,6 +268,57 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); + + b.OwnsOne("Microsoft.AspNetCore.Identity.IdentityPasskeyData", "Data", b1 => + { + b1.Property("IdentityUserPasskeyCredentialId") + .HasColumnType("BLOB"); + + b1.Property("AttestationObject") + .IsRequired() + .HasColumnType("BLOB"); + + b1.Property("ClientDataJson") + .IsRequired() + .HasColumnType("BLOB"); + + b1.Property("CreatedAt") + .HasColumnType("TEXT"); + + b1.Property("IsBackedUp") + .HasColumnType("INTEGER"); + + b1.Property("IsBackupEligible") + .HasColumnType("INTEGER"); + + b1.Property("IsUserVerified") + .HasColumnType("INTEGER"); + + b1.Property("Name") + .HasColumnType("TEXT"); + + b1.Property("PublicKey") + .IsRequired() + .HasColumnType("BLOB"); + + b1.Property("SignCount") + .HasColumnType("INTEGER"); + + b1.PrimitiveCollection("Transports") + .HasColumnType("TEXT"); + + b1.HasKey("IdentityUserPasskeyCredentialId"); + + b1.ToTable("AspNetUserPasskeys"); + + b1.ToJson("Data"); + + b1.WithOwner() + .HasForeignKey("IdentityUserPasskeyCredentialId"); + }); + + b.Navigation("Data") + .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => diff --git a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Data/SqlLite/00000000000000_CreateIdentitySchema.cs b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Data/SqlLite/00000000000000_CreateIdentitySchema.cs index 92e0a0ea2c..b8e73dede8 100644 --- a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Data/SqlLite/00000000000000_CreateIdentitySchema.cs +++ b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Data/SqlLite/00000000000000_CreateIdentitySchema.cs @@ -118,16 +118,7 @@ protected override void Up(MigrationBuilder migrationBuilder) { CredentialId = table.Column(type: "BLOB", maxLength: 1024, nullable: false), UserId = table.Column(type: "TEXT", nullable: false), - PublicKey = table.Column(type: "BLOB", maxLength: 1024, nullable: false), - Name = table.Column(type: "TEXT", nullable: true), - CreatedAt = table.Column(type: "TEXT", nullable: false), - SignCount = table.Column(type: "INTEGER", nullable: false), - Transports = table.Column(type: "TEXT", nullable: true), - IsUserVerified = table.Column(type: "INTEGER", nullable: false), - IsBackupEligible = table.Column(type: "INTEGER", nullable: false), - IsBackedUp = table.Column(type: "INTEGER", nullable: false), - AttestationObject = table.Column(type: "BLOB", nullable: false), - ClientDataJson = table.Column(type: "BLOB", nullable: false) + Data = table.Column(type: "TEXT", nullable: false) }, constraints: table => { diff --git a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Data/SqlLite/ApplicationDbContextModelSnapshot.cs b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Data/SqlLite/ApplicationDbContextModelSnapshot.cs index f6bdeaf144..005717115a 100644 --- a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Data/SqlLite/ApplicationDbContextModelSnapshot.cs +++ b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Data/SqlLite/ApplicationDbContextModelSnapshot.cs @@ -184,40 +184,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasMaxLength(1024) .HasColumnType("BLOB"); - b.Property("AttestationObject") - .IsRequired() - .HasColumnType("BLOB"); - - b.Property("ClientDataJson") - .IsRequired() - .HasColumnType("BLOB"); - - b.Property("CreatedAt") - .HasColumnType("TEXT"); - - b.Property("IsBackedUp") - .HasColumnType("INTEGER"); - - b.Property("IsBackupEligible") - .HasColumnType("INTEGER"); - - b.Property("IsUserVerified") - .HasColumnType("INTEGER"); - - b.Property("Name") - .HasColumnType("TEXT"); - - b.Property("PublicKey") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("BLOB"); - - b.Property("SignCount") - .HasColumnType("INTEGER"); - - b.PrimitiveCollection("Transports") - .HasColumnType("TEXT"); - b.Property("UserId") .IsRequired() .HasColumnType("TEXT"); @@ -299,6 +265,57 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); + + b.OwnsOne("Microsoft.AspNetCore.Identity.IdentityPasskeyData", "Data", b1 => + { + b1.Property("IdentityUserPasskeyCredentialId") + .HasColumnType("BLOB"); + + b1.Property("AttestationObject") + .IsRequired() + .HasColumnType("BLOB"); + + b1.Property("ClientDataJson") + .IsRequired() + .HasColumnType("BLOB"); + + b1.Property("CreatedAt") + .HasColumnType("TEXT"); + + b1.Property("IsBackedUp") + .HasColumnType("INTEGER"); + + b1.Property("IsBackupEligible") + .HasColumnType("INTEGER"); + + b1.Property("IsUserVerified") + .HasColumnType("INTEGER"); + + b1.Property("Name") + .HasColumnType("TEXT"); + + b1.Property("PublicKey") + .IsRequired() + .HasColumnType("BLOB"); + + b1.Property("SignCount") + .HasColumnType("INTEGER"); + + b1.PrimitiveCollection("Transports") + .HasColumnType("TEXT"); + + b1.HasKey("IdentityUserPasskeyCredentialId"); + + b1.ToTable("AspNetUserPasskeys"); + + b1.ToJson("Data"); + + b1.WithOwner() + .HasForeignKey("IdentityUserPasskeyCredentialId"); + }); + + b.Navigation("Data") + .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => diff --git a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Data/SqlServer/00000000000000_CreateIdentitySchema.Designer.cs b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Data/SqlServer/00000000000000_CreateIdentitySchema.Designer.cs index c92d84f26d..19e1603ce9 100644 --- a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Data/SqlServer/00000000000000_CreateIdentitySchema.Designer.cs +++ b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Data/SqlServer/00000000000000_CreateIdentitySchema.Designer.cs @@ -198,40 +198,6 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasMaxLength(1024) .HasColumnType("varbinary(1024)"); - b.Property("AttestationObject") - .IsRequired() - .HasColumnType("varbinary(max)"); - - b.Property("ClientDataJson") - .IsRequired() - .HasColumnType("varbinary(max)"); - - b.Property("CreatedAt") - .HasColumnType("datetimeoffset"); - - b.Property("IsBackedUp") - .HasColumnType("bit"); - - b.Property("IsBackupEligible") - .HasColumnType("bit"); - - b.Property("IsUserVerified") - .HasColumnType("bit"); - - b.Property("Name") - .HasColumnType("nvarchar(max)"); - - b.Property("PublicKey") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varbinary(1024)"); - - b.Property("SignCount") - .HasColumnType("bigint"); - - b.PrimitiveCollection("Transports") - .HasColumnType("nvarchar(max)"); - b.Property("UserId") .IsRequired() .HasColumnType("nvarchar(450)"); @@ -313,6 +279,57 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); + + b.OwnsOne("Microsoft.AspNetCore.Identity.IdentityPasskeyData", "Data", b1 => + { + b1.Property("IdentityUserPasskeyCredentialId") + .HasColumnType("varbinary(1024)"); + + b1.Property("AttestationObject") + .IsRequired() + .HasColumnType("varbinary(max)"); + + b1.Property("ClientDataJson") + .IsRequired() + .HasColumnType("varbinary(max)"); + + b1.Property("CreatedAt") + .HasColumnType("datetimeoffset"); + + b1.Property("IsBackedUp") + .HasColumnType("bit"); + + b1.Property("IsBackupEligible") + .HasColumnType("bit"); + + b1.Property("IsUserVerified") + .HasColumnType("bit"); + + b1.Property("Name") + .HasColumnType("nvarchar(max)"); + + b1.Property("PublicKey") + .IsRequired() + .HasColumnType("varbinary(max)"); + + b1.Property("SignCount") + .HasColumnType("bigint"); + + b1.PrimitiveCollection("Transports") + .HasColumnType("nvarchar(max)"); + + b1.HasKey("IdentityUserPasskeyCredentialId"); + + b1.ToTable("AspNetUserPasskeys"); + + b1.ToJson("Data"); + + b1.WithOwner() + .HasForeignKey("IdentityUserPasskeyCredentialId"); + }); + + b.Navigation("Data") + .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => diff --git a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Data/SqlServer/00000000000000_CreateIdentitySchema.cs b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Data/SqlServer/00000000000000_CreateIdentitySchema.cs index 8d26035044..aa1117d1b0 100644 --- a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Data/SqlServer/00000000000000_CreateIdentitySchema.cs +++ b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Data/SqlServer/00000000000000_CreateIdentitySchema.cs @@ -118,16 +118,7 @@ protected override void Up(MigrationBuilder migrationBuilder) { CredentialId = table.Column(type: "varbinary(1024)", maxLength: 1024, nullable: false), UserId = table.Column(type: "nvarchar(450)", nullable: false), - PublicKey = table.Column(type: "varbinary(1024)", maxLength: 1024, nullable: false), - Name = table.Column(type: "nvarchar(max)", nullable: true), - CreatedAt = table.Column(type: "datetimeoffset", nullable: false), - SignCount = table.Column(type: "bigint", nullable: false), - Transports = table.Column(type: "nvarchar(max)", nullable: true), - IsUserVerified = table.Column(type: "bit", nullable: false), - IsBackupEligible = table.Column(type: "bit", nullable: false), - IsBackedUp = table.Column(type: "bit", nullable: false), - AttestationObject = table.Column(type: "varbinary(max)", nullable: false), - ClientDataJson = table.Column(type: "varbinary(max)", nullable: false) + Data = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { @@ -241,6 +232,9 @@ protected override void Down(MigrationBuilder migrationBuilder) migrationBuilder.DropTable( name: "AspNetUserLogins"); + migrationBuilder.DropTable( + name: "AspNetUserPasskeys"); + migrationBuilder.DropTable( name: "AspNetUserRoles"); diff --git a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Data/SqlServer/ApplicationDbContextModelSnapshot.cs b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Data/SqlServer/ApplicationDbContextModelSnapshot.cs index 3f5e8fe8be..6e9366f22d 100644 --- a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Data/SqlServer/ApplicationDbContextModelSnapshot.cs +++ b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Data/SqlServer/ApplicationDbContextModelSnapshot.cs @@ -195,40 +195,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasMaxLength(1024) .HasColumnType("varbinary(1024)"); - b.Property("AttestationObject") - .IsRequired() - .HasColumnType("varbinary(max)"); - - b.Property("ClientDataJson") - .IsRequired() - .HasColumnType("varbinary(max)"); - - b.Property("CreatedAt") - .HasColumnType("datetimeoffset"); - - b.Property("IsBackedUp") - .HasColumnType("bit"); - - b.Property("IsBackupEligible") - .HasColumnType("bit"); - - b.Property("IsUserVerified") - .HasColumnType("bit"); - - b.Property("Name") - .HasColumnType("nvarchar(max)"); - - b.Property("PublicKey") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("varbinary(1024)"); - - b.Property("SignCount") - .HasColumnType("bigint"); - - b.PrimitiveCollection("Transports") - .HasColumnType("nvarchar(max)"); - b.Property("UserId") .IsRequired() .HasColumnType("nvarchar(450)"); @@ -310,6 +276,57 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); + + b.OwnsOne("Microsoft.AspNetCore.Identity.IdentityPasskeyData", "Data", b1 => + { + b1.Property("IdentityUserPasskeyCredentialId") + .HasColumnType("varbinary(1024)"); + + b1.Property("AttestationObject") + .IsRequired() + .HasColumnType("varbinary(max)"); + + b1.Property("ClientDataJson") + .IsRequired() + .HasColumnType("varbinary(max)"); + + b1.Property("CreatedAt") + .HasColumnType("datetimeoffset"); + + b1.Property("IsBackedUp") + .HasColumnType("bit"); + + b1.Property("IsBackupEligible") + .HasColumnType("bit"); + + b1.Property("IsUserVerified") + .HasColumnType("bit"); + + b1.Property("Name") + .HasColumnType("nvarchar(max)"); + + b1.Property("PublicKey") + .IsRequired() + .HasColumnType("varbinary(max)"); + + b1.Property("SignCount") + .HasColumnType("bigint"); + + b1.PrimitiveCollection("Transports") + .HasColumnType("nvarchar(max)"); + + b1.HasKey("IdentityUserPasskeyCredentialId"); + + b1.ToTable("AspNetUserPasskeys"); + + b1.ToJson("Data"); + + b1.WithOwner() + .HasForeignKey("IdentityUserPasskeyCredentialId"); + }); + + b.Navigation("Data") + .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => diff --git a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Program.Main.cs b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Program.Main.cs index 597fdbc05e..115ae78ce7 100644 --- a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Program.Main.cs +++ b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Program.Main.cs @@ -109,8 +109,7 @@ public static void Main(string[] args) #endif } - app.UseStatusCodePagesWithReExecute("/not-found", createScopeForErrors: true); - + app.UseStatusCodePagesWithReExecute("/not-found", createScopeForStatusCodePages: true); #if (HasHttpsProfile) app.UseHttpsRedirection(); diff --git a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Program.cs b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Program.cs index 41451382dc..4460cc6737 100644 --- a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Program.cs +++ b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Program.cs @@ -102,8 +102,7 @@ app.UseHsts(); #endif } -app.UseStatusCodePagesWithReExecute("/not-found", createScopeForErrors: true); - +app.UseStatusCodePagesWithReExecute("/not-found", createScopeForStatusCodePages: true); #if (HasHttpsProfile) app.UseHttpsRedirection(); diff --git a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Properties/launchSettings.json b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Properties/launchSettings.json index 0d554caaa1..26a3dada5e 100644 --- a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Properties/launchSettings.json +++ b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/Properties/launchSettings.json @@ -6,14 +6,18 @@ "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, - //#if (UseWebAssembly) + //#if (UseWebAssembly) "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", - //#endif + //#endif + //#if (LocalhostTld) + "applicationUrl": "http://blazorweb_csharp.dev.localhost:5500", + //#else "applicationUrl": "http://localhost:5500", + //#endif "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } - //#if (HasHttpsProfile) + //#if (HasHttpsProfile) }, //#else } @@ -27,7 +31,11 @@ //#if (UseWebAssembly) "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", //#endif + //#if (LocalhostTld) + "applicationUrl": "https://blazorweb_csharp.dev.localhost:5501;http://blazorweb_csharp.dev.localhost:5500", + //#else "applicationUrl": "https://localhost:5501;http://localhost:5500", + //#endif "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/appsettings.json b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/appsettings.json index 3a18c82e2d..2a8ba926d3 100644 --- a/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/appsettings.json +++ b/src/Templates/templates/blazorweb-csharp-10/BlazorWeb-CSharp/appsettings.json @@ -4,7 +4,7 @@ //#if (UseLocalDB) // "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-BlazorWeb_CSharp-53bc9b9d-9d6a-45d4-8429-2a2761773502;Trusted_Connection=True;MultipleActiveResultSets=true" //#else -// "DefaultConnection": "DataSource=Data\\app.db;Cache=Shared" +// "DefaultConnection": "DataSource=Data/app.db;Cache=Shared" //#endif // }, ////#endif diff --git a/tests/Core/Microsoft.FluentUI.AspNetCore.Components.Tests.csproj b/tests/Core/Microsoft.FluentUI.AspNetCore.Components.Tests.csproj index d15e4e1fdc..c77108ea05 100644 --- a/tests/Core/Microsoft.FluentUI.AspNetCore.Components.Tests.csproj +++ b/tests/Core/Microsoft.FluentUI.AspNetCore.Components.Tests.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 enable enable latest diff --git a/tests/Core/_StartCodeCoverage.cmd b/tests/Core/_StartCodeCoverage.cmd index c43f2f62be..c5f47dc9e2 100644 --- a/tests/Core/_StartCodeCoverage.cmd +++ b/tests/Core/_StartCodeCoverage.cmd @@ -19,5 +19,5 @@ echo on cls dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura -reportgenerator "-reports:coverage.net9.0.cobertura.xml" "-targetdir:C:\Temp\FluentUI\Coverage" -reporttypes:HtmlInline_AzurePipelines -classfilters:"-Microsoft.FluentUI.AspNetCore.Components.DesignTokens.*" +reportgenerator "-reports:coverage.net10.0.cobertura.xml" "-targetdir:C:\Temp\FluentUI\Coverage" -reporttypes:HtmlInline_AzurePipelines -classfilters:"-Microsoft.FluentUI.AspNetCore.Components.DesignTokens.*" start "" "C:\Temp\FluentUI\Coverage\index.htm"