diff --git a/src/Razor/Microsoft.NET.Sdk.Razor/test/IntegrationTests/BuildServerIntegrationTest.cs b/src/Razor/Microsoft.NET.Sdk.Razor/test/IntegrationTests/BuildServerIntegrationTest.cs
index 6121bc9646..7cab7ac3ee 100644
--- a/src/Razor/Microsoft.NET.Sdk.Razor/test/IntegrationTests/BuildServerIntegrationTest.cs
+++ b/src/Razor/Microsoft.NET.Sdk.Razor/test/IntegrationTests/BuildServerIntegrationTest.cs
@@ -77,6 +77,12 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
[InitializeTestProject(originalProjectName: "SimpleMvc", targetProjectName: "Whitespace in name", baseDirectory: "")]
public async Task Build_AppWithWhitespaceInName_CanBuildSuccessfully()
{
+ // We need to separately restore the project in order to ensure this project uses the latest Roslyn. Without this
+ // the Csc task from Roslyn would have already been loaded and any update to it from nuget packages would not have
+ // an effect. This allows us to create our obj/Whitespace in name.csproj.nuget.g.props file (we renamed the project)
+ // and then properly build the project with an appropriate Csc.
+ await DotnetMSBuild("Restore");
+
var result = await DotnetMSBuild(
"Build",
"/p:_RazorForceBuildServer=true");
diff --git a/src/Razor/test/testassets/Directory.Build.props b/src/Razor/test/testassets/Directory.Build.props
index 8cc9caef29..d9d2ac66f5 100644
--- a/src/Razor/test/testassets/Directory.Build.props
+++ b/src/Razor/test/testassets/Directory.Build.props
@@ -38,4 +38,26 @@
+
+
+ 3.3.0-beta2-19365-06
+
+ $(RestoreSources);
+ https://dotnet.myget.org/F/roslyn/api/v3/index.json;
+
+
+
+
+
+
+
+