From bff3707cc702f20de9a8d6cb75a895ece55ff2cc Mon Sep 17 00:00:00 2001 From: Wes Haggard Date: Tue, 1 May 2018 11:29:18 -0700 Subject: [PATCH] Update test projects to pass MNAVersion to build and publish The new SDK now has checks to verify the RuntimeFrameworkVersion is set the same during restore, build, publish, etc. So we need to ensure we set it the same in each step. To do that we need to pass that MNAVersion during those steps. Commit migrated from https://github.com/dotnet/core-setup/commit/b5e7a60c4b0ce412a989bb1800e4c11622507818 --- src/installer/test/TestUtils/TestProjectFixture.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/installer/test/TestUtils/TestProjectFixture.cs b/src/installer/test/TestUtils/TestProjectFixture.cs index a549511..8375ea8 100644 --- a/src/installer/test/TestUtils/TestProjectFixture.cs +++ b/src/installer/test/TestUtils/TestProjectFixture.cs @@ -231,6 +231,8 @@ namespace Microsoft.DotNet.CoreSetup.Test buildArgs.Add(framework); } + buildArgs.Add($"/p:MNAVersion={_repoDirectoriesProvider.MicrosoftNETCoreAppVersion}"); + if (outputDirectory != null) { buildArgs.Add("-o"); @@ -348,6 +350,8 @@ namespace Microsoft.DotNet.CoreSetup.Test publishArgs.Add(outputDirectory); } + publishArgs.Add($"/p:MNAVersion={_repoDirectoriesProvider.MicrosoftNETCoreAppVersion}"); + dotnet.Publish(publishArgs.ToArray()) .WorkingDirectory(_testProject.ProjectDirectory) .Environment("NUGET_PACKAGES", _repoDirectoriesProvider.NugetPackages) -- 2.7.4