Refactor tests to use CliTargetFramework variable instead of hard-coding target framework

This commit is contained in:
Daniel Plaisted 2018-07-06 15:15:46 -07:00
parent c6925a5388
commit ec9914424c
11 changed files with 17 additions and 12 deletions

View file

@ -28,12 +28,9 @@ tools\TestAssetsDependencies\TestAssetsDependencies.csproj
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<DisableImplicitPackageTargetFallback>true</DisableImplicitPackageTargetFallback>
<CliTargetFramework>netcoreapp3.0</CliTargetFramework>
<!-- We only need this until we get a stage0 with a 3.0 SDK. -->
<NETCoreAppMaximumVersion>3.0</NETCoreAppMaximumVersion>
</PropertyGroup>
<Import Project="build/TargetFramework.props" />
<Import Project="build/InitRepo.props" />
<Import Condition=" '$(GeneratePropsFile)' != 'true' " Project="$(GitCommitInfoProps)" />
<Import Condition=" '$(GeneratePropsFile)' != 'true' " Project="$(HostInfoProps)" />

View file

@ -3,7 +3,7 @@
<PropertyGroup>
<VersionPrefix>1.0.0-rc</VersionPrefix>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>$(CliTargetFramework)</TargetFramework>
<OutputType>Exe</OutputType>
<VersionSuffix></VersionSuffix>
</PropertyGroup>

View file

@ -2,7 +2,7 @@
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), testAsset.props))\testAsset.props" />
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>$(CliTargetFramework)</TargetFramework>
<OutputType>Exe</OutputType>
</PropertyGroup>

View file

@ -2,7 +2,7 @@
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), testAsset.props))\testAsset.props" />
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>$(CliTargetFramework)</TargetFramework>
<OutputType>Exe</OutputType>
<VersionSuffix></VersionSuffix>
</PropertyGroup>

View file

@ -3,6 +3,6 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>$(CliTargetFramework)</TargetFramework>
</PropertyGroup>
</Project>

View file

@ -3,7 +3,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>$(CliTargetFramework)</TargetFramework>
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.12-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;rhel.6-x64;centos.7-x64;rhel.7-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64;linux-musl-x64</RuntimeIdentifiers>
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
</PropertyGroup>

View file

@ -3,7 +3,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>$(CliTargetFramework)</TargetFramework>
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
</PropertyGroup>

View file

@ -2,7 +2,7 @@
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), testAsset.props))\testAsset.props" />
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>$(CliTargetFramework)</TargetFramework>
</PropertyGroup>
<ItemGroup>

View file

@ -0,0 +1,7 @@
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CliTargetFramework>netcoreapp3.0</CliTargetFramework>
<!-- We only need this until we get a stage0 with a 3.0 SDK. -->
<NETCoreAppMaximumVersion>3.0</NETCoreAppMaximumVersion>
</PropertyGroup>
</Project>

View file

@ -2,6 +2,7 @@
<PropertyGroup>
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
</PropertyGroup>
<Import Project="build/TargetFramework.props" />
<Import Project="build/InitRepo.props" />
<Import Project="build/DependencyVersions.props" />
<PropertyGroup>

View file

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>$(CliTargetFramework)</TargetFramework>
<RuntimeIdentifier>$(SharedFrameworkRid)</RuntimeIdentifier>
</PropertyGroup>