Fixes package references for .NET Standard
This commit is contained in:
Родитель
fa80fad09c
Коммит
471727767d
|
@ -29,7 +29,6 @@ namespace Microsoft.VisualStudio.TestTools.UnitTesting {
|
|||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal FailedTestMessage() {
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,11 @@
|
|||
<ReleaseNotes Include="Transition to MSTest V2" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.0' ">
|
||||
<NetStandardImplicitPackageVersion>1.0.0</NetStandardImplicitPackageVersion>
|
||||
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(TargetFramework)' == 'uap10.0' ">
|
||||
<SignAssembly>false</SignAssembly>
|
||||
<DefineConstants>$(DefineConstants);UAP10_0</DefineConstants>
|
||||
|
@ -31,6 +36,18 @@
|
|||
<PackageReference Include="MSTest.TestFramework" Version="1.1.17" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.0' ">
|
||||
<PackageReference Include="System.Collections" Version="4.0.11" />
|
||||
<PackageReference Include="System.Diagnostics.Tools" Version="4.0.1" />
|
||||
<PackageReference Include="System.Diagnostics.Debug" Version="4.0.11" />
|
||||
<PackageReference Include="System.Globalization" Version="4.0.11" />
|
||||
<PackageReference Include="System.Linq" Version="4.1.0" />
|
||||
<PackageReference Include="System.Linq.Expressions" Version="4.1.0" />
|
||||
<PackageReference Include="System.ObjectModel" Version="4.0.12" />
|
||||
<PackageReference Include="System.Reflection.Extensions" Version="4.0.1" />
|
||||
<PackageReference Include="System.Resources.ResourceManager" Version="4.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'uap10.0' ">
|
||||
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.Win32.Primitives" Version="4.0.1" NoWarn="NU1608" />
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#pragma warning disable CA1811
|
||||
|
||||
namespace Microsoft
|
||||
{
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Diagnostics.Contracts;
|
||||
|
||||
static class Arg
|
||||
{
|
||||
[DebuggerStepThrough]
|
||||
[ContractArgumentValidator]
|
||||
[SuppressMessage( "Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Contract validator." )]
|
||||
internal static void NotNull<T>( T value, string name ) where T : class
|
||||
{
|
||||
if ( value == null )
|
||||
|
@ -25,7 +25,6 @@ namespace Microsoft
|
|||
|
||||
[DebuggerStepThrough]
|
||||
[ContractArgumentValidator]
|
||||
[SuppressMessage( "Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Contract validator." )]
|
||||
internal static void NotNull<T>( T? value, string name ) where T : struct
|
||||
{
|
||||
if ( value == null )
|
||||
|
@ -38,7 +37,6 @@ namespace Microsoft
|
|||
|
||||
[DebuggerStepThrough]
|
||||
[ContractArgumentValidator]
|
||||
[SuppressMessage( "Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Contract validator." )]
|
||||
internal static void NotNullOrEmpty( string value, string name )
|
||||
{
|
||||
if ( string.IsNullOrEmpty( value ) )
|
||||
|
@ -50,7 +48,6 @@ namespace Microsoft
|
|||
}
|
||||
|
||||
[DebuggerStepThrough]
|
||||
[SuppressMessage( "Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Contract validator." )]
|
||||
internal static void InRange<T>( T value, T minValue, string name ) where T : IComparable<T>
|
||||
{
|
||||
if ( value.CompareTo( minValue ) < 0 )
|
||||
|
@ -62,7 +59,6 @@ namespace Microsoft
|
|||
}
|
||||
|
||||
[DebuggerStepThrough]
|
||||
[SuppressMessage( "Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Contract validator." )]
|
||||
internal static void InRange<T>( T value, T minValue, T maxValue, string name ) where T : IComparable<T>
|
||||
{
|
||||
if ( value.CompareTo( minValue ) < 0 || value.CompareTo( maxValue ) > 0 )
|
||||
|
@ -74,7 +70,6 @@ namespace Microsoft
|
|||
}
|
||||
|
||||
[DebuggerStepThrough]
|
||||
[SuppressMessage( "Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Contract validator." )]
|
||||
internal static void LessThan<T>( T param, T value, string paramName ) where T : struct, IComparable<T>
|
||||
{
|
||||
if ( param.CompareTo( value ) >= 0 )
|
||||
|
@ -84,7 +79,6 @@ namespace Microsoft
|
|||
}
|
||||
|
||||
[DebuggerStepThrough]
|
||||
[SuppressMessage( "Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Contract validator." )]
|
||||
internal static void LessThanOrEqualTo<T>( T param, T value, string paramName ) where T : struct, IComparable<T>
|
||||
{
|
||||
if ( param.CompareTo( value ) > 0 )
|
||||
|
@ -94,7 +88,6 @@ namespace Microsoft
|
|||
}
|
||||
|
||||
[DebuggerStepThrough]
|
||||
[SuppressMessage( "Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Contract validator." )]
|
||||
internal static void GreaterThan<T>( T param, T value, string paramName ) where T : struct, IComparable<T>
|
||||
{
|
||||
if ( param.CompareTo( value ) <= 0 )
|
||||
|
@ -104,7 +97,6 @@ namespace Microsoft
|
|||
}
|
||||
|
||||
[DebuggerStepThrough]
|
||||
[SuppressMessage( "Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Contract validator." )]
|
||||
internal static void GreaterThanOrEqualTo<T>( T param, T value, string paramName ) where T : struct, IComparable<T>
|
||||
{
|
||||
if ( param.CompareTo( value ) < 0 )
|
||||
|
|
Загрузка…
Ссылка в новой задаче