diff --git a/src/Microsoft.AspNetCore.Mvc.Razor/Internal/DefaultRoslynCompilationService.cs b/src/Microsoft.AspNetCore.Mvc.Razor/Internal/DefaultRoslynCompilationService.cs
index 89cf2f120e..0240fa5ca4 100644
--- a/src/Microsoft.AspNetCore.Mvc.Razor/Internal/DefaultRoslynCompilationService.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Razor/Internal/DefaultRoslynCompilationService.cs
@@ -151,9 +151,8 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Internal
string.Equals(CS0246, g.Id, StringComparison.OrdinalIgnoreCase)))
{
additionalMessage = Resources.FormatCompilation_DependencyContextIsNotSpecified(
- "preserveCompilationContext",
- "buildOptions",
- "project.json");
+ "PreserveCompilationContext",
+ "csproj");
}
var compilationFailure = new CompilationFailure(
diff --git a/src/Microsoft.AspNetCore.Mvc.Razor/Properties/Resources.Designer.cs b/src/Microsoft.AspNetCore.Mvc.Razor/Properties/Resources.Designer.cs
index b36da66649..bae652341d 100644
--- a/src/Microsoft.AspNetCore.Mvc.Razor/Properties/Resources.Designer.cs
+++ b/src/Microsoft.AspNetCore.Mvc.Razor/Properties/Resources.Designer.cs
@@ -447,7 +447,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor
}
///
- /// One or more compilation references are missing. Possible causes include a missing '{0}' property under '{1}' in the application's {2}.
+ /// One or more compilation references are missing. Possible causes include a missing '{0}' property in the application's '{1}' file.
///
internal static string Compilation_DependencyContextIsNotSpecified
{
@@ -455,11 +455,11 @@ namespace Microsoft.AspNetCore.Mvc.Razor
}
///
- /// One or more compilation references are missing. Possible causes include a missing '{0}' property under '{1}' in the application's {2}.
+ /// One or more compilation references are missing. Possible causes include a missing '{0}' property in the application's '{1}' file.
///
- internal static string FormatCompilation_DependencyContextIsNotSpecified(object p0, object p1, object p2)
+ internal static string FormatCompilation_DependencyContextIsNotSpecified(object p0, object p1)
{
- return string.Format(CultureInfo.CurrentCulture, GetString("Compilation_DependencyContextIsNotSpecified"), p0, p1, p2);
+ return string.Format(CultureInfo.CurrentCulture, GetString("Compilation_DependencyContextIsNotSpecified"), p0, p1);
}
///
diff --git a/src/Microsoft.AspNetCore.Mvc.Razor/Resources.resx b/src/Microsoft.AspNetCore.Mvc.Razor/Resources.resx
index b2b1306305..6a15e01830 100644
--- a/src/Microsoft.AspNetCore.Mvc.Razor/Resources.resx
+++ b/src/Microsoft.AspNetCore.Mvc.Razor/Resources.resx
@@ -201,7 +201,7 @@
A circular layout reference was detected when rendering '{0}'. The layout page '{1}' has already been rendered.
- One or more compilation references are missing. Possible causes include a missing '{0}' property under '{1}' in the application's {2}.
+ One or more compilation references are missing. Possible causes include a missing '{0}' property in the application's '{1}' file.
'{0}' cannot be empty. These locations are required to locate a view for rendering.
diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/ErrorPageTests.cs b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/ErrorPageTests.cs
index 3afddfd418..70b545766b 100644
--- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/ErrorPageTests.cs
+++ b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/ErrorPageTests.cs
@@ -18,7 +18,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
{
private static readonly string PreserveCompilationContextMessage = HtmlEncoder.Default.Encode(
"One or more compilation references are missing. Possible causes include a missing " +
- "'preserveCompilationContext' property under 'buildOptions' in the application's project.json.");
+ "'PreserveCompilationContext' property in the application's 'csproj' file.");
public ErrorPageTests(MvcTestFixture fixture)
{
Client = fixture.Client;