See the documentation (/doc/README.md
).
If you have a local repository
git checkout-index --prefix=git-export-dir/ -a
Or create a new GitHub repository from template:
https://github.com/havit/NewProjectTemplate-Blazor/generate
- SetupSolution.ps1 (replaces
NewProjectTemplate
withYourProjectName
etc.)- Open SetupSolution.ps1 and set parameters.
- Run SetupSolution.ps1.
- Delete SetupSolution.ps1
- Set Web.Server as the startup project.
- Adjust the Model - remove unnecessary entities (Country, Localizations, ...)
- Rebuild the solution
- Run DataLayer CodeGenerator (Run-CodeGenerator.ps1)
- Create an initial EF migration
- Drop the current migrations - delete Entity/Migrations folder
- Add new initial migration
Add-Migration Initial
- Check all configuration files (including PublishScripts folder).
- Remove connection string AzureKeyVault from appsettings.WebServer.Development.json (or update the endpoint).
- Run the app...
- Update NuGet packages in solution.
- Application Insights - configure connection string
(Use PublishScripts folder for deployment settings.)
- Repeat changes in the commit ce3cf6a7ddc472804046c68d323a13e74c9af1ba
- Repeat changes in the commit ed6fb5c13cb5f2bea15d4429bbaa8d982e601798 ("core update")
- Repeat changes in the commit 72fd697a29660f8218bfc7754d973634ee8b11c8 (updates BlazorApplicationInsights)
- Replace the
<TargetFramework>net7.0</TargetFramework>
to<TargetFramework>net8.0</TargetFramework>
in all.csproj
files. - Update NuGet package references from 7.0.x to 8.0.x version + update other NuGet packages as needed (do not update to EF Core 8 until fully supported by HFW).
- Build: Clean solution & Rebuild solution
- Deal with
[Obsolete]
APIs:- Remove
<HxAnchorFragmentNavigation />
component, if you are using it (anchor-navigation is handled by Blazor now)
- Remove
- In
dotnet-tools.json
upgradeHavit.Data.EntityFrameworkCore.CodeGenerator.Tool
to 2.8.0+ version (net8) + try if theDataLayer/Run-CodeGenerator.ps1
runs correctly - Check the
TfsPublish.xml
. There might be explicitnet7
target, update it tonet8
. - Update the
Web.Server.csproj
theEnsureWebJobInPackage
target to usenet8.0
in paths. - If you use it, upgrade your GitHub workflow YAML to use net8.
- For AAD, if you use
JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear();
, replace it withJsonWebTokenHandler.DefaultInboundClaimTypeMap.Clear();
. - If you are hitting the
"undefined" is not valid JSON
when logging in (or just "Login failed"), disable assembly trimming forMicrosoft.AspNetCore.Components.WebAssembly.Authentication
(yes, again), see dotnet/aspnetcore#49956
- Replace the
<TargetFramework>net6.0</TargetFramework>
to<TargetFramework>net7.0</TargetFramework>
in all.csproj
files. - Update NuGet package references from 6.0.x to 7.0.x version + update other NuGet packages as needed.
- Build: Clean solution & Rebuild solution
- Deal with
[Obsolete]
APIs:- Replace
SignOutSessionStateManager
(LoginDisplat.razor
) withNavigationManager.NavigateToLogout()
, see CS0618
- Replace
- Deal with unsupported platform APIs
- In
Web.Server/Program.cs
, update theAddEventLog()
call:
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { logging.AddEventLog(); }
- In
- Deal with new code analyzer warnings, e.g.
- BL0007: Component parameter 'XY' should be auto property
- use
@bind:after
where applicable - use
#pragma warning disable
where needed
- use
- BL0007: Component parameter 'XY' should be auto property
- In
dotnet-tools.json
upgradeHavit.Data.EntityFrameworkCore.CodeGenerator.Tool
to 2.7.0 version (net7) + try if theDataLayer/Run-CodeGenerator.ps1
runs correctly - Check the
TfsPublish.xml
. There might be explicitnet6
target, update it tonet7
. - Update the
Web.Server.csproj
theEnsureWebJobInPackage
target to usenet7.0
in paths. - If you use it, upgrade your GitHub workflow YAML to use net7.
- If you are hitting the
"undefined" is not valid JSON
when logging in, disable assembly trimming forMicrosoft.AspNetCore.Components.WebAssembly.Authentication
, see dotnet/aspnetcore#44981 - Remove the Blazor GC gRPC workaround when using facades (revert the
Func<IXyFacade>
usage to directIXyFacade
usage))