Skip to content

Template for new projects - Havit.Blazor stack with Bootstrap 5 components and gRPC code-first communication.

Notifications You must be signed in to change notification settings

jirikanda/HxGridInfiniteScrollNet7Repro

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

New Project Template - HAVIT Blazor Stack

Documentation

See the documentation (/doc/README.md).

Clonning template contents into new folder

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

Initial Setup

  1. SetupSolution.ps1 (replaces NewProjectTemplate with YourProjectName etc.)
    1. Open SetupSolution.ps1 and set parameters.
    2. Run SetupSolution.ps1.
    3. Delete SetupSolution.ps1
  2. Adjust the Model - remove unnecessary entities (Country, Localizations, ...)
  3. Rebuild the solution
  4. Run DataLayer CodeGenerator (Run-CodeGenerator.ps1)
  5. Create an initial EF migration
    1. Drop the current migrations - delete Entity/Migrations folder
    2. Add new initial migration Add-Migration Initial -StartupProject Entity.Tests
  6. Check all configuration files (including PublishScripts folder).
  7. Set Web.Server as the startup project.
  8. Run the app...

Further Steps

  1. Update NuGet packages in solution.
  2. Application Insights - set InstrumentationKey
    1. Web.Server / appSettings.json
    2. Web.Client / wwwroot / appSettings.json
  3. Identity Server - set Keys for deployment (Web.Server / appSettings.json)

(Use PublishScripts folder for deployment settings.)

Upgrading existing project from net6 to net7

  1. Replace the <TargetFramework>net6.0</TargetFramework> to <TargetFramework>net7.0</TargetFramework> in all .csproj files.
  2. Update NuGet package references from 6.0.x to 7.0.x version (all except EF Core!) + update other NuGet packages as needed.
  3. Build: Clean solution & Rebuild solution
  4. Deal with [Obsolete] APIs:
    1. Replace SignOutSessionStateManager (LoginDisplat.razor) with NavigationManager.NavigateToLogout(), see CS0618
  5. Deal with unsupported platform APIs
    1. In Web.Server/Program.cs, update the AddEventLog() call:
    if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
    {
    	logging.AddEventLog();
    }
  6. Deal with new code analyzer warnings, e.g.
    1. BL0007: Component parameter 'XY' should be auto property
      1. use @bind:after where applicable
      2. use #pragma warning disable where needed
  7. In dotnet-tools.json upgrade Havit.Data.EntityFrameworkCore.CodeGenerator.Tool to 2.7.0 version (net7) + try if the DataLayer/Run-CodeGenerator.ps1 runs currectly
  8. Check the TfsPublish.xml. There might be explicit net6 target, update it to net7.
  9. Update the Web.Server.csproj the EnsureWebJobInPackage target to use net7.0 in paths.
  10. If you use it, upgrade your GitHub workflow YAML to use net7.
  11. If you are hitting the "undefined" is not valid JSON when logging in, disable assembly trimming for Microsoft.AspNetCore.Components.WebAssembly.Authentication, see dotnet/aspnetcore#44981
  12. Remove the Blazor GC gRPC workaround when using facades (revert the Func<IXyFacade> usage to direct IXyFacade usage))

About

Template for new projects - Havit.Blazor stack with Bootstrap 5 components and gRPC code-first communication.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 89.1%
  • HTML 9.6%
  • Other 1.3%