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
- 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 -StartupProject Entity.Tests
- Check all configuration files (including PublishScripts folder).
- Set Web.Server as the startup project.
- Run the app...
- Update NuGet packages in solution.
- Application Insights - set InstrumentationKey
- Web.Server / appSettings.json
- Web.Client / wwwroot / appSettings.json
- Identity Server - set Keys for deployment (Web.Server / appSettings.json)
(Use PublishScripts folder for deployment settings.)
- 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 (all except EF Core!) + 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 currectly - 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))