FlanderDev.RouteGen.Generators 0.5.2

Suggested Alternatives

FlanderDev.RouteGen.Generators 0.5.1

Additional Details

Shared generation doesn't work

There is a newer version of this package available.
See the version list below for details.
dotnet add package FlanderDev.RouteGen.Generators --version 0.5.2
                    
NuGet\Install-Package FlanderDev.RouteGen.Generators -Version 0.5.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FlanderDev.RouteGen.Generators" Version="0.5.2">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FlanderDev.RouteGen.Generators" Version="0.5.2" />
                    
Directory.Packages.props
<PackageReference Include="FlanderDev.RouteGen.Generators">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FlanderDev.RouteGen.Generators --version 0.5.2
                    
#r "nuget: FlanderDev.RouteGen.Generators, 0.5.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package FlanderDev.RouteGen.Generators@0.5.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=FlanderDev.RouteGen.Generators&version=0.5.2
                    
Install as a Cake Addin
#tool nuget:?package=FlanderDev.RouteGen.Generators&version=0.5.2
                    
Install as a Cake Tool

FlanderDev.RouteGen.Generators

Roslyn source generators for RouteGen.

This package generates:

  • An abstract ASP.NET Core MVC controller base from your shared API interface
  • A strongly typed HttpClient implementation for the Blazor client
  • Strongly typed page-route helpers from @page directives in .razor files

Quick start

# Shared project
dotnet add package FlanderDev.RouteGen.Abstractions

# Server + Client projects
dotnet add package FlanderDev.RouteGen.Abstractions
dotnet add package FlanderDev.RouteGen.Generators

Mark the generator package with PrivateAssets="all" (this is set automatically when you use dotnet add package on an analyzer package):

<PackageReference Include="FlanderDev.RouteGen.Generators" PrivateAssets="all" />

For page-route generation, add your Razor files as AdditionalFiles to whichever project should get the generated Paths class — putting this (and the generator reference above) in your shared project, pointed at the client's .razor files, lets both server and client see the same Paths type:

<AdditionalFiles Include="..\YourApp.Client\**\*.razor" />

Define the API once in the shared project, then:

  • Inherit from the generated *ControllerBase on the server
  • Inject the generated Http*Api (or the interface) on the client

See the main README for full examples and diagnostics.

License

MIT

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.8.0 43 10/3/2026
0.7.1 93 9/18/2026
0.6.1 92 9/13/2026
0.5.2 117 8/28/2026 0.5.2 is deprecated because it has critical bugs.
0.5.1 104 8/24/2026
0.4.0 104 8/24/2026
0.3.0 108 8/23/2026
0.2.8 105 8/22/2026
0.2.7 151 8/19/2026
0.2.6 106 8/19/2026
0.2.5 104 8/18/2026
0.2.4 106 8/18/2026