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
NewProjectTemplatewithYourProjectNameetc.)- 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.csprojfiles. - 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:afterwhere applicable - use
#pragma warning disablewhere needed
- use
- BL0007: Component parameter 'XY' should be auto property
- In
dotnet-tools.jsonupgradeHavit.Data.EntityFrameworkCore.CodeGenerator.Toolto 2.7.0 version (net7) + try if theDataLayer/Run-CodeGenerator.ps1runs currectly - Check the
TfsPublish.xml. There might be explicitnet6target, update it tonet7. - Update the
Web.Server.csprojtheEnsureWebJobInPackagetarget to usenet7.0in paths. - If you use it, upgrade your GitHub workflow YAML to use net7.
- If you are hitting the
"undefined" is not valid JSONwhen 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 directIXyFacadeusage))