Inertia.Net.Mvc 1.5.3

dotnet add package Inertia.Net.Mvc --version 1.5.3
                    
NuGet\Install-Package Inertia.Net.Mvc -Version 1.5.3
                    
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="Inertia.Net.Mvc" Version="1.5.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Inertia.Net.Mvc" Version="1.5.3" />
                    
Directory.Packages.props
<PackageReference Include="Inertia.Net.Mvc" />
                    
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 Inertia.Net.Mvc --version 1.5.3
                    
#r "nuget: Inertia.Net.Mvc, 1.5.3"
                    
#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 Inertia.Net.Mvc@1.5.3
                    
#: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=Inertia.Net.Mvc&version=1.5.3
                    
Install as a Cake Addin
#tool nuget:?package=Inertia.Net.Mvc&version=1.5.3
                    
Install as a Cake Tool

Inertia.Net.Mvc

Use the 1.5 packages together; from 1.3 or earlier, see the 1.4 upgrade notes. TempData state formats are unchanged.

MVC integration for Inertia.Net, a .NET 10 server adapter for the Inertia.js v3 protocol. Install it next to Inertia.Net:

dotnet add package Inertia.Net
dotnet add package Inertia.Net.Mvc
builder.Services.AddInertia();
builder.Services.AddControllersWithViews().AddInertiaMvc(o => o.UseRazorRootView("App")); // UseRazorRootView is optional
builder.Services.AddAntiforgery(o => o.HeaderName = InertiaHeaders.XsrfToken);

var app = builder.Build();
app.UseStaticFiles();
app.UseInertia();
app.UseInertiaAntiforgery();   // CSRF: XSRF-TOKEN cookie, 419 for mutations without a valid token
app.MapControllers();
public sealed class UsersController : Controller
{
    [HttpGet("/users")]
    public IResult Index() => Render("Users/Index", new InertiaProps { ["users"] = users });   // also Back(), Location(url)

    [HttpPost("/users")]
    public IActionResult Store([FromBody] CreateUserInput input) => Redirect("/users");
}
  • Validation: a global filter redirects an Inertia non-GET request with an invalid ModelState back with the errors, in the bag named by X-Inertia-Error-Bag (default default). Keys go through the JSON naming policy per segment (Address.Street becomes address.street). [ApiController] controllers are covered too.
  • Razor root view (optional): UseRazorRootView("App") renders Views/Shared/App.cshtml with an InertiaRootViewContext model. After @addTagHelper *, Inertia.Net.Mvc the view can use <inertia />, <inertia-head />, <vite entry="resources/js/app.tsx" /> and <vite-react-refresh />.
  • TempData state store (optional): AddInertiaMvc(o => o.UseTempDataStateStore()) keeps flash data, errors and history flags in TempData (cookie provider by default, or AddSessionStateTempDataProvider() plus AddSession()/app.UseSession() before app.UseInertia()). It also serves Minimal API endpoints.
  • Action components: return this.InertiaView(props); renders {Controller}/{Action} ({Area}/... in an area); change the rule with AddInertiaMvc(o => o.ComponentResolver = ctx => ...).
  • Not Native AOT compatible (MVC is not).

Documentation:

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in 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
1.5.3 89 10/26/2026
1.5.2 93 10/24/2026
1.5.1 101 10/23/2026
1.5.0 88 10/22/2026
1.4.0 95 10/21/2026
1.3.0 91 10/19/2026
1.2.0 89 10/18/2026
1.1.0 96 10/13/2026
1.0.3 91 10/6/2026
1.0.2 90 10/6/2026
1.0.1 93 10/6/2026
1.0.0 97 10/5/2026