From 0f2b315fe44aaff0212ff775d2bdcf6b73da5621 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 8 May 2018 14:44:51 -0700 Subject: [PATCH] Fixup Razor Sdk tests to work on netcoreapp2.2 --- build/dependencies.props | 42 +++++++++---------- build/repo.targets | 4 +- korebuild-lock.txt | 4 +- .../BuildVariables.cs | 21 ---------- .../BuildVariables.cs.template | 2 - .../InitializeTestProjectAttribute.cs | 2 +- .../MSBuildIntegrationTestBase.cs | 3 -- test/testapps/Directory.Build.props | 9 ++++ test/testapps/Directory.Build.targets | 4 ++ .../SimpleMvcFSharp/SimpleMvcFSharp.fsproj | 2 +- 10 files changed, 39 insertions(+), 54 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index f315d1c9c2..b0d3c2bcad 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -1,26 +1,26 @@ - + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 0.10.13 - 2.2.0-preview1-17048 - 2.2.0-preview1-34140 - 2.2.0-preview1-34140 - 2.2.0-preview1-34140 + 2.2.0-preview1-17049 + 2.2.0-preview1-34146 + 2.2.0-preview1-34146 + 2.2.0-preview1-34146 15.6.82 15.6.82 15.6.82 - 2.8.0-beta3 - 2.8.0-beta3 - 2.2.0-preview1-34140 - 2.2.0-preview1-34140 + 2.8.0 + 2.8.0 + 2.2.0-preview1-34146 + 2.2.0-preview1-34146 2.2.0-preview1-26424-04 - 2.2.0-preview1-34140 - 2.2.0-preview1-34140 + 2.2.0-preview1-34146 + 2.2.0-preview1-34146 2.0.0 - 2.2.0-preview1-26424-04 - 2.2.0-preview1-26502-01 + 2.1.0-rc1 + 2.2.0-preview1-26424-04 15.6.1 15.0.26606 15.6.161-preview @@ -47,15 +47,15 @@ 4.3.0 4.5.0-preview3-26423-04 9.0.1 - 2.8.0-beta3 - 2.8.0-beta3 - 2.8.0-beta3 - 2.8.0-beta3 - 2.8.0-beta3 + 2.8.0 + 2.8.0 + 2.8.0 + 2.8.0 + 2.8.0 2.8.0-beta2-62721-09 - 2.8.0-beta3 - 2.8.0-beta3 - 2.8.0-beta3 + 2.8.0 + 2.8.0 + 2.8.0 2.8.0-beta2-62721-09 0.8.0 2.3.1 diff --git a/build/repo.targets b/build/repo.targets index bf561aef6a..d4686f95a0 100644 --- a/build/repo.targets +++ b/build/repo.targets @@ -23,9 +23,7 @@ - MSBuildLocation=$(VisualStudioMSBuildx86Path); - MicrosoftNETCoreAppVersion=$(MicrosoftNETCoreApp21PackageVersion); - NETStandardLibraryVersion=$(NETStandardLibrary20PackageVersion) + MSBuildLocation=$(VisualStudioMSBuildx86Path) diff --git a/korebuild-lock.txt b/korebuild-lock.txt index da5dcd1202..eb63d54c23 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.2.0-preview1-17048 -commithash:de14a0ee5fb48508ee8a29c14280a2928f8dabf8 +version:2.2.0-preview1-17049 +commithash:9c4fefdcd2b950f8b6da5aa3784fe200eb0664c2 diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/BuildVariables.cs b/test/Microsoft.AspNetCore.Razor.Design.Test/BuildVariables.cs index cbf8a0f2a5..cb8b132417 100644 --- a/test/Microsoft.AspNetCore.Razor.Design.Test/BuildVariables.cs +++ b/test/Microsoft.AspNetCore.Razor.Design.Test/BuildVariables.cs @@ -6,9 +6,6 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests internal static partial class BuildVariables { private static string _msBuildPath = string.Empty; - private static string _microsoftNETCoreAppVersion = string.Empty; - - private static string _netStandardLibraryVersion = string.Empty; static partial void InitializeVariables(); @@ -20,23 +17,5 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests return _msBuildPath; } } - - public static string MicrosoftNETCoreAppVersion - { - get - { - InitializeVariables(); - return _microsoftNETCoreAppVersion; - } - } - - public static string NETStandardLibraryVersion - { - get - { - InitializeVariables(); - return _netStandardLibraryVersion; - } - } } } diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/BuildVariables.cs.template b/test/Microsoft.AspNetCore.Razor.Design.Test/BuildVariables.cs.template index 1fd8c7dcfe..e31b16adc7 100644 --- a/test/Microsoft.AspNetCore.Razor.Design.Test/BuildVariables.cs.template +++ b/test/Microsoft.AspNetCore.Razor.Design.Test/BuildVariables.cs.template @@ -8,8 +8,6 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests static partial void InitializeVariables() { _msBuildPath = @"${MSBuildLocation}"; - _microsoftNETCoreAppVersion = "${MicrosoftNETCoreAppVersion}"; - _netStandardLibraryVersion = "${NETStandardLibraryVersion}"; } } } diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/InitializeTestProjectAttribute.cs b/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/InitializeTestProjectAttribute.cs index 5ab0a04c31..bcd954bb55 100644 --- a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/InitializeTestProjectAttribute.cs +++ b/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/InitializeTestProjectAttribute.cs @@ -37,7 +37,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests } MSBuildIntegrationTestBase.Project = ProjectDirectory.Create(_originalProjectName, _testProjectName, _baseDirectory, _additionalProjects, _language); - MSBuildIntegrationTestBase.TargetFramework = _originalProjectName.StartsWith("ClassLibrary") ? "netstandard2.0" : "netcoreapp2.1"; + MSBuildIntegrationTestBase.TargetFramework = _originalProjectName.StartsWith("ClassLibrary") ? "netstandard2.0" : "netcoreapp2.2"; } public override void After(MethodInfo methodUnderTest) diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/MSBuildIntegrationTestBase.cs b/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/MSBuildIntegrationTestBase.cs index 44ba2256a4..60bc033cf7 100644 --- a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/MSBuildIntegrationTestBase.cs +++ b/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/MSBuildIntegrationTestBase.cs @@ -67,9 +67,6 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests // Disable node-reuse. We don't want msbuild processes to stick around // once the test is completed. "/nr:false", - - $"/p:RuntimeFrameworkVersion={BuildVariables.MicrosoftNETCoreAppVersion}", - $"/p:NETStandardImplicitPackageVersion={BuildVariables.NETStandardLibraryVersion}", }; if (!suppressRestore) diff --git a/test/testapps/Directory.Build.props b/test/testapps/Directory.Build.props index 71e223d53c..50781d1e7c 100644 --- a/test/testapps/Directory.Build.props +++ b/test/testapps/Directory.Build.props @@ -10,6 +10,15 @@ $(SolutionRoot)src\Microsoft.NET.Sdk.Razor\build\netstandard2.0\Sdk.Razor.CurrentVersion.targets + + + + + 99.9 + + $(NETStandardLibrary20PackageVersion) + + false diff --git a/test/testapps/Directory.Build.targets b/test/testapps/Directory.Build.targets index e0191e25d7..fb43a5b4be 100644 --- a/test/testapps/Directory.Build.targets +++ b/test/testapps/Directory.Build.targets @@ -1,3 +1,7 @@ + + + $(MicrosoftNETCoreApp22PackageVersion) + diff --git a/test/testapps/SimpleMvcFSharp/SimpleMvcFSharp.fsproj b/test/testapps/SimpleMvcFSharp/SimpleMvcFSharp.fsproj index f3eb256786..ec09cf7a67 100644 --- a/test/testapps/SimpleMvcFSharp/SimpleMvcFSharp.fsproj +++ b/test/testapps/SimpleMvcFSharp/SimpleMvcFSharp.fsproj @@ -13,7 +13,7 @@ - netcoreapp2.1 + netcoreapp2.2