diff --git a/src/Mvc/Mvc.Razor.RuntimeCompilation/src/FileProviderRazorProjectItem.cs b/src/Mvc/Mvc.Razor.RuntimeCompilation/src/FileProviderRazorProjectItem.cs
index d0abfbcbdae6..6013cca44c62 100644
--- a/src/Mvc/Mvc.Razor.RuntimeCompilation/src/FileProviderRazorProjectItem.cs
+++ b/src/Mvc/Mvc.Razor.RuntimeCompilation/src/FileProviderRazorProjectItem.cs
@@ -48,7 +48,13 @@ public FileProviderRazorProjectItem(IFileInfo fileInfo, string basePath, string
///
/// The .
///
- public IFileInfo FileInfo { get; }
+ private IFileInfo FileInfo { get; }
+
+ ///
+ /// The .
+ ///
+ ///
+ public bool DoesNothing { get; } = true;
///
public override string BasePath { get; }
diff --git a/src/Mvc/Mvc/src/MvcServiceCollectionExtensions.cs b/src/Mvc/Mvc/src/MvcServiceCollectionExtensions.cs
index 1dc105ee9d78..051b9347fc40 100644
--- a/src/Mvc/Mvc/src/MvcServiceCollectionExtensions.cs
+++ b/src/Mvc/Mvc/src/MvcServiceCollectionExtensions.cs
@@ -19,6 +19,22 @@ namespace Microsoft.Extensions.DependencyInjection
///
public static class MvcServiceCollectionExtensions
{
+ ///
+ /// Adds nothing to the specified .
+ ///
+ /// The to add services to.
+ /// An that can be used to further configure the MVC services.
+ public static IMvcBuilder AddAbsolutelyNothing(this IServiceCollection services)
+ {
+ var partManager = services
+ .LastOrDefault(d => d.ServiceType == typeof(ApplicationPartManager))
+ ?.ImplementationInstance
+ as ApplicationPartManager;
+ var builder = new MvcBuilder(services, partManager);
+
+ return builder;
+ }
+
///
/// Adds MVC services to the specified .
///