Create new custom section

The most important things:

  • Make sure your project is razor class library (in your project file the first line should be:
    <Project Sdk="Microsoft.NET.Sdk.Razor">
  • Make sure your files are in wwwroot/App_Plugins/your_package. This way, they will always be included, because wwwroot is by default included in RCLs
  • I personally always set the StaticWebAssetBasePath to just the root:
    <StaticWebAssetBasePath>/</StaticWebAssetBasePath>