Disabling net461 tests for the resolver.
This commit is contained in:
parent
37267bf158
commit
3539fb2a77
2 changed files with 4 additions and 16 deletions
|
@ -95,7 +95,8 @@ namespace Microsoft.DotNet.MSBuildSdkResolver
|
|||
return false;
|
||||
}
|
||||
|
||||
if (FailsToParseVersions(netcoreSdkVersion, minimumVersion, out netCoreSdkFXVersion, out minimumFXVersion))
|
||||
if (!FXVersion.TryParse(netcoreSdkVersion, out netCoreSdkFXVersion) ||
|
||||
!FXVersion.TryParse(minimumVersion, out minimumFXVersion))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -103,19 +104,6 @@ namespace Microsoft.DotNet.MSBuildSdkResolver
|
|||
return FXVersion.Compare(netCoreSdkFXVersion, minimumFXVersion) == -1;
|
||||
}
|
||||
|
||||
private bool FailsToParseVersions(
|
||||
string netcoreSdkVersion,
|
||||
string minimumVersion,
|
||||
out FXVersion netCoreSdkFXVersion,
|
||||
out FXVersion minimumFXVersion)
|
||||
{
|
||||
netCoreSdkFXVersion = null;
|
||||
minimumFXVersion = null;
|
||||
|
||||
return !FXVersion.TryParse(netcoreSdkVersion, out netCoreSdkFXVersion) ||
|
||||
!FXVersion.TryParse(minimumVersion, out minimumFXVersion);
|
||||
}
|
||||
|
||||
private string ResolveNetcoreSdkDirectory(SdkResolverContext context)
|
||||
{
|
||||
foreach (string exeDir in GetDotnetExeDirectoryCandidates())
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net461;$(CliTargetFramework)</TargetFrameworks>
|
||||
<TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">$(CliTargetFramework)</TargetFrameworks>
|
||||
<!-- https://github.com/dotnet/cli/issues/6672: Re-enable net461 as a TFM for tests. -->
|
||||
<TargetFrameworks>$(CliTargetFramework)</TargetFrameworks>
|
||||
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AssemblyOriginatorKeyFile>../../tools/Key.snk</AssemblyOriginatorKeyFile>
|
||||
|
|
Loading…
Add table
Reference in a new issue