diff --git a/build/repo.targets b/build/repo.targets
index 87334cb579..550069ec47 100644
--- a/build/repo.targets
+++ b/build/repo.targets
@@ -24,9 +24,8 @@
MSBuildLocation=$(VisualStudioMSBuildx86Path);
- MicrosoftNETCoreAppVersion=$(MicrosoftNETCoreApp22PackageVersion);
- MicrosoftNETCoreApp22PackageVersion=$(MicrosoftNETCoreApp22PackageVersion);
- NETStandardLibraryVersion=$(NETStandardLibrary20PackageVersion)
+ MicrosoftNETCoreAppPackageVersion=$(MicrosoftNETCoreApp22PackageVersion);
+ NETStandardLibraryPackageVersion=$(NETStandardLibrary20PackageVersion)
diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/BuildVariables.cs b/test/Microsoft.AspNetCore.Razor.Design.Test/BuildVariables.cs
index cb8b132417..7c6900f9b5 100644
--- a/test/Microsoft.AspNetCore.Razor.Design.Test/BuildVariables.cs
+++ b/test/Microsoft.AspNetCore.Razor.Design.Test/BuildVariables.cs
@@ -6,6 +6,8 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
internal static partial class BuildVariables
{
private static string _msBuildPath = string.Empty;
+ private static string _microsoftNETCoreAppPackageVersion = string.Empty;
+ private static string _netStandardLibraryPackageVersion = string.Empty;
static partial void InitializeVariables();
@@ -17,5 +19,23 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
return _msBuildPath;
}
}
+
+ public static string MicrosoftNETCoreAppPackageVersion
+ {
+ get
+ {
+ InitializeVariables();
+ return _microsoftNETCoreAppPackageVersion;
+ }
+ }
+
+ public static string NETStandardLibraryPackageVersion
+ {
+ get
+ {
+ InitializeVariables();
+ return _netStandardLibraryPackageVersion;
+ }
+ }
}
}
diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/BuildVariables.cs.template b/test/Microsoft.AspNetCore.Razor.Design.Test/BuildVariables.cs.template
index e31b16adc7..128f1c90bd 100644
--- a/test/Microsoft.AspNetCore.Razor.Design.Test/BuildVariables.cs.template
+++ b/test/Microsoft.AspNetCore.Razor.Design.Test/BuildVariables.cs.template
@@ -8,6 +8,8 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
static partial void InitializeVariables()
{
_msBuildPath = @"${MSBuildLocation}";
+ _microsoftNETCoreAppPackageVersion = "${MicrosoftNETCoreAppPackageVersion}";
+ _netStandardLibraryPackageVersion = "${NETStandardLibraryPackageVersion}";
}
}
}
diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/MSBuildIntegrationTestBase.cs b/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/MSBuildIntegrationTestBase.cs
index 22e66f05ee..9b225130eb 100644
--- a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/MSBuildIntegrationTestBase.cs
+++ b/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/MSBuildIntegrationTestBase.cs
@@ -70,6 +70,9 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
// Let the test app know it is running as part of a test.
"/p:RunningAsTest=true",
+
+ $"/p:MicrosoftNETCoreAppVersion={BuildVariables.MicrosoftNETCoreAppPackageVersion}",
+ $"/p:NETStandardLibraryPackageVersion={BuildVariables.NETStandardLibraryPackageVersion}",
};
if (!suppressRestore)
diff --git a/test/testapps/Directory.Build.props b/test/testapps/Directory.Build.props
index 50781d1e7c..a716d247ec 100644
--- a/test/testapps/Directory.Build.props
+++ b/test/testapps/Directory.Build.props
@@ -10,13 +10,14 @@
$(SolutionRoot)src\Microsoft.NET.Sdk.Razor\build\netstandard2.0\Sdk.Razor.CurrentVersion.targets
-
+
+
99.9
- $(NETStandardLibrary20PackageVersion)
+ $(NETStandardLibraryPackageVersion)
diff --git a/test/testapps/Directory.Build.targets b/test/testapps/Directory.Build.targets
index 41fd7366c6..f9e03832a0 100644
--- a/test/testapps/Directory.Build.targets
+++ b/test/testapps/Directory.Build.targets
@@ -2,7 +2,7 @@
- $(MicrosoftNETCoreApp22PackageVersion)
+ $(MicrosoftNETCoreAppVersion)
99.9