Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation 10.0.0-preview.4.25255.103

Prefix Reserved
This is a prerelease version of Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.
dotnet add package Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation --version 10.0.0-preview.4.25255.103
                    
NuGet\Install-Package Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation -Version 10.0.0-preview.4.25255.103
                    
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="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="10.0.0-preview.4.25255.103" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="10.0.0-preview.4.25255.103" />
                    
Directory.Packages.props
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" />
                    
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 Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation --version 10.0.0-preview.4.25255.103
                    
#r "nuget: Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation, 10.0.0-preview.4.25255.103"
                    
#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.
#addin nuget:?package=Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation&version=10.0.0-preview.4.25255.103&prerelease
                    
Install Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation as a Cake Addin
#tool nuget:?package=Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation&version=10.0.0-preview.4.25255.103&prerelease
                    
Install Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation as a Cake Tool

About

Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation is a NuGet package designed to provide runtime compilation support for Razor views in ASP.NET Core MVC applications. This package enables developers to modify and update Razor views without needing to restart the application, facilitating a more dynamic development experience.

Key Features

  • Runtime compilation of Razor views in ASP.NET Core MVC applications.
  • Allows developers to modify Razor views without restarting the application.
  • Supports faster iteration and development cycles.
  • Compatible with ASP.NET Core 3.0 and newer.

Limitations

How to Use

To start using Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation in your ASP.NET Core MVC application, follow these steps:

Installation

Install the package via NuGet Package Manager or .NET CLI:

dotnet add package Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation

Configuration

In your Startup.cs file, configure runtime compilation for Razor views:

using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;

public void ConfigureServices(IServiceCollection services)
{
    services.AddControllersWithViews()
        .AddRazorRuntimeCompilation();
}

Usage

Now, you can modify Razor views in your application, and the changes will be picked up dynamically without requiring a restart:


@{
    ViewData["Title"] = "Home Page";
}

<h2>@ViewData["Title"]</h2>

<p>Welcome to the ASP.NET Core MVC application!</p>

For more information on using runtime compilation for Razor views in ASP.NET Core MVC, refer to the official documentation.

Main Types

The main types provided by this library are:

  • RazorRuntimeCompilationMvcBuilderExtensions: Extension methods for configuring runtime compilation for Razor views.
  • RazorRuntimeCompilationMvcOptions: Options for configuring runtime compilation settings.

Additional Documentation

Feedback & Contributing

Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation is released as open-source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

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.

GitHub repositories (125)

Showing the top 20 popular GitHub repositories that depend on Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation:

Repository Stars
abpframework/abp
Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
dotnet/AspNetCore.Docs
Documentation for ASP.NET Core
aspnetboilerplate/aspnetboilerplate
ASP.NET Boilerplate - Web Application Framework
nopSolutions/nopCommerce
ASP.NET Core eCommerce software. nopCommerce is a free and open-source shopping cart.
OrchardCMS/OrchardCore
Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
btcpayserver/btcpayserver
Accept Bitcoin payments. Free, open-source & self-hosted, Bitcoin payment processor.
EduardoPires/EquinoxProject
Web Application ASP.NET 9 using Clean Architecture, DDD, CQRS, Event Sourcing and a lot of good practices
ServiceStack/ServiceStack
Thoughtfully architected, obscenely fast, thoroughly enjoyable web services for all
umbraco/Umbraco-CMS
Umbraco is a free and open source .NET content management system helping you deliver delightful digital experiences.
dotnetcore/Util
Util是一个.Net平台下的应用框架,旨在提升中小团队的开发能力,由工具类、分层架构基类、Ui组件,配套代码生成模板,权限等组成。
dotnetcore/WTM
Use WTM to write .netcore app fast !!!
jamesmh/coravel
Near-zero config .NET library that makes advanced application features like Task Scheduling, Caching, Queuing, Event Broadcasting, and more a breeze!
dotnetcore/DotnetSpider
DotnetSpider, a .NET standard web crawling library. It is lightweight, efficient and fast high-level web crawling & scraping framework
skoruba/IdentityServer4.Admin
The administration for the IdentityServer4 and Asp.Net Core Identity
SciSharp/LLamaSharp
A C#/.NET library to run LLM (🦙LLaMA/LLaVA) on your local device efficiently.
dotnet/aspnet-api-versioning
Provides a set of libraries which add service API versioning to ASP.NET Web API, OData with ASP.NET Web API, and ASP.NET Core.
loic-sharma/BaGet
A lightweight NuGet and symbol server
liukuo362573/YiShaAdmin
基于 .NET Core MVC 的权限管理系统,代码易读易懂、界面简洁美观
Squidex/squidex
Headless CMS and Content Managment Hub
PiranhaCMS/piranha.core
Piranha CMS is the friendly editor-focused CMS for .NET that can be used both as an integrated CMS or as a headless API.
Version Downloads Last updated
10.0.0-preview.4.25255.103 0 5/12/2025