From d62381d659e069560c044157006890e550209b11 Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Tue, 16 Jul 2019 17:25:57 -0700 Subject: [PATCH] Update test projects to use latest Roslyn. - This is a temporary workaround until we're able to get on the latest SDK which includes the latest Roslyn bits. Without them we can't properly publish testapps in a standalone fashion without investing in temporary infrastructure. \n\nCommit migrated from https://github.com/dotnet/aspnetcore-tooling/commit/21fcd9c2f59296a7e38e1f5ff056281a16166d52 --- .../BuildServerIntegrationTest.cs | 6 +++++ .../test/testassets/Directory.Build.props | 22 +++++++++++++++++++ 2 files changed, 28 insertions(+) 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; + + + + + + + +