Pass versions using MSBuild template instead of importing dependencies.props
This commit is contained in:
parent
41324bd37a
commit
754d7ba64e
|
|
@ -24,9 +24,8 @@
|
|||
<PropertyGroup>
|
||||
<TemplateProperties>
|
||||
MSBuildLocation=$(VisualStudioMSBuildx86Path);
|
||||
MicrosoftNETCoreAppVersion=$(MicrosoftNETCoreApp22PackageVersion);
|
||||
MicrosoftNETCoreApp22PackageVersion=$(MicrosoftNETCoreApp22PackageVersion);
|
||||
NETStandardLibraryVersion=$(NETStandardLibrary20PackageVersion)
|
||||
MicrosoftNETCoreAppPackageVersion=$(MicrosoftNETCoreApp22PackageVersion);
|
||||
NETStandardLibraryPackageVersion=$(NETStandardLibrary20PackageVersion)
|
||||
</TemplateProperties>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
static partial void InitializeVariables()
|
||||
{
|
||||
_msBuildPath = @"${MSBuildLocation}";
|
||||
_microsoftNETCoreAppPackageVersion = "${MicrosoftNETCoreAppPackageVersion}";
|
||||
_netStandardLibraryPackageVersion = "${NETStandardLibraryPackageVersion}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -10,13 +10,14 @@
|
|||
<RazorSdkCurrentVersionTargets>$(SolutionRoot)src\Microsoft.NET.Sdk.Razor\build\netstandard2.0\Sdk.Razor.CurrentVersion.targets</RazorSdkCurrentVersionTargets>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(SolutionRoot)build\dependencies.props" />
|
||||
<!-- Import solution dependencies.props when building in place -->
|
||||
<Import Project="..\..\build\dependencies.props" Condition="'$(BinariesRoot)'==''"/>
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- aspnet/BuildTools#662 Don't police what version of NetCoreApp we use -->
|
||||
<NETCoreAppMaximumVersion>99.9</NETCoreAppMaximumVersion>
|
||||
|
||||
<NETStandardImplicitPackageVersion>$(NETStandardLibrary20PackageVersion)</NETStandardImplicitPackageVersion>
|
||||
<NETStandardImplicitPackageVersion>$(NETStandardLibraryPackageVersion)</NETStandardImplicitPackageVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Don't use the server when building in place. This locks up rzc.dll -->
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<Import Project="RazorTest.Introspection.targets" />
|
||||
|
||||
<PropertyGroup>
|
||||
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp2.2' ">$(MicrosoftNETCoreApp22PackageVersion)</RuntimeFrameworkVersion>
|
||||
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp2.2' ">$(MicrosoftNETCoreAppVersion)</RuntimeFrameworkVersion>
|
||||
<!-- aspnet/BuildTools#662 Don't police what version of NetCoreApp we use -->
|
||||
<NETCoreAppMaximumVersion>99.9</NETCoreAppMaximumVersion>
|
||||
</PropertyGroup>
|
||||
|
|
|
|||
Loading…
Reference in New Issue