diff --git a/scripts/build.ps1 b/scripts/build.ps1 index b80ccd4bcd..d7af546be0 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -335,8 +335,7 @@ function Publish-Package $fullCLRPackage451Dir = Get-FullCLRPackageDirectory $fullCLRPackage45Dir = Get-FullCLRPackageDirectory45 $uap100PackageDir = $(Join-Path $env:TP_OUT_DIR "$TPB_Configuration\$TPB_TargetFrameworkUap100"); - $net20PackageDir = $(Join-Path $env:TP_OUT_DIR "$TPB_Configuration\net20"); - $net35PackageDir = $(Join-Path $env:TP_OUT_DIR "$TPB_Configuration\net35"); + $net45PackageDir = $(Join-Path $env:TP_OUT_DIR "$TPB_Configuration\net45"); $netstandard10PackageDir = $(Join-Path $env:TP_OUT_DIR "$TPB_Configuration\$TPB_TargetFrameworkNS10"); $netstandard13PackageDir = $(Join-Path $env:TP_OUT_DIR "$TPB_Configuration\$TPB_TargetFrameworkNS13"); $netstandard20PackageDir = $(Join-Path $env:TP_OUT_DIR "$TPB_Configuration\$TPB_TargetFrameworkNS20"); @@ -485,8 +484,8 @@ function Publish-Package # Publish Microsoft.TestPlatform.AdapterUtilities Copy-Bulk -root (Join-Path $env:TP_ROOT_DIR "src\Microsoft.TestPlatform.AdapterUtilities\bin\$TPB_Configuration") ` -files @{ - # "net20" = $net20PackageDir # net20 \ net20, and net35 isn't supported by the Test Platform - # "net35" = $net35PackageDir # net35 / but this package supports, so adding targets. + # "net20" = $net20PackageDir # net20 + "net45/any" = $net45PackageDir # $net4 $TPB_TargetFrameworkNS10 = $netstandard10PackageDir # netstandard1_0 $TPB_TargetFrameworkNS20 = $netstandard20PackageDir # netstandard2_0 $TPB_TargetFrameworkUap100 = $uap100PackageDir # uap10.0 diff --git a/scripts/verify-nupkgs.ps1 b/scripts/verify-nupkgs.ps1 index 1ac89ac370..a7575287d9 100644 --- a/scripts/verify-nupkgs.ps1 +++ b/scripts/verify-nupkgs.ps1 @@ -19,7 +19,7 @@ function Verify-Nuget-Packages($packageDirectory, $version) "Microsoft.TestPlatform.CLI" = 381; "Microsoft.TestPlatform.Extensions.TrxLogger" = 35; "Microsoft.TestPlatform.ObjectModel" = 180; - "Microsoft.TestPlatform.AdapterUtilities" = 48; + "Microsoft.TestPlatform.AdapterUtilities" = 62; "Microsoft.TestPlatform.Portable" = 570; "Microsoft.TestPlatform.TestHost" = 214; "Microsoft.TestPlatform.TranslationLayer" = 123; diff --git a/src/Microsoft.TestPlatform.AdapterUtilities/HierarchyConstants.cs b/src/Microsoft.TestPlatform.AdapterUtilities/HierarchyConstants.cs new file mode 100644 index 0000000000..71eaba0d9d --- /dev/null +++ b/src/Microsoft.TestPlatform.AdapterUtilities/HierarchyConstants.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace Microsoft.TestPlatform.AdapterUtilities +{ + /// + /// Constants to help declare Hierarchy test property. + /// + public static class HierarchyConstants + { + /// + /// Label to use on Hierarchy test property. + /// + public const string HierarchyLabel = "Hierarchy"; + + /// + /// Property id to use on Hierarchy test property. + /// + public const string HierarchyPropertyId = "TestCase." + HierarchyLabel; + + /// + /// Meanings of the indices in the Hierarchy array. + /// + public static class Levels + { + /// + /// Total length of Hierarchy array. + /// + public const int TotalLevelCount = 4; + + /// + /// Index of the namespace element of the array. + /// + public const int NamespaceIndex = 0; + + /// + /// Index of the class element of the array. + /// + public const int ClassIndex = 1; + + /// + /// Index of the test group element of the array. + /// + public const int TestGroupIndex = 2; + + /// + /// Index of the display name element of the array. + /// + public const int DisplayNameIndex = 3; + } + } +} diff --git a/src/Microsoft.TestPlatform.AdapterUtilities/ManagedNameConstants.cs b/src/Microsoft.TestPlatform.AdapterUtilities/ManagedNameConstants.cs new file mode 100644 index 0000000000..caca513122 --- /dev/null +++ b/src/Microsoft.TestPlatform.AdapterUtilities/ManagedNameConstants.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace Microsoft.TestPlatform.AdapterUtilities +{ + /// + /// Contants to help declare ManagedType and ManagedMethod test properties. + /// + public static class ManagedNameConstants + { + /// + /// Label to use on ManagedType test property. + /// + public const string ManagedTypeLabel = "ManagedType"; + + /// + /// Label to use on ManagedMethod test property. + /// + public const string ManagedMethodLabel = "ManagedMethod"; + + /// + /// Property id to use on ManagedType test property. + /// + public const string ManagedTypePropertyId = "TestCase." + ManagedTypeLabel; + + /// + /// Property id to use on ManagedMethod test property. + /// + public const string ManagedMethodPropertyId = "TestCase." + ManagedMethodLabel; + } +} diff --git a/src/Microsoft.TestPlatform.AdapterUtilities/ManagedNameUtilities/Contants.cs b/src/Microsoft.TestPlatform.AdapterUtilities/ManagedNameUtilities/Contants.cs deleted file mode 100644 index 77b8c2c2bb..0000000000 --- a/src/Microsoft.TestPlatform.AdapterUtilities/ManagedNameUtilities/Contants.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -namespace Microsoft.TestPlatform.AdapterUtilities.ManagedNameUtilities -{ - public static class Contants - { - public const string ManagedTypeLabel = "ManagedType"; - public const string ManagedMethodLabel = "ManagedMethod"; - - public const string ManagedTypePropertyId = "TestCase." + ManagedTypeLabel; - public const string ManagedMethodPropertyId = "TestCase." + ManagedMethodLabel; - } -} diff --git a/src/Microsoft.TestPlatform.AdapterUtilities/Microsoft.TestPlatform.AdapterUtilities.csproj b/src/Microsoft.TestPlatform.AdapterUtilities/Microsoft.TestPlatform.AdapterUtilities.csproj index aae96bd1d3..ba46a8f08f 100644 --- a/src/Microsoft.TestPlatform.AdapterUtilities/Microsoft.TestPlatform.AdapterUtilities.csproj +++ b/src/Microsoft.TestPlatform.AdapterUtilities/Microsoft.TestPlatform.AdapterUtilities.csproj @@ -5,7 +5,7 @@ - netstandard1.0;netstandard2.0 + netstandard1.0;netstandard2.0;net45 $(TargetFrameworks);uap10.0 true @@ -28,6 +28,11 @@ v4.5.1 + + any + false + + diff --git a/src/Microsoft.TestPlatform.AdapterUtilities/Resources/Resources.Designer.cs b/src/Microsoft.TestPlatform.AdapterUtilities/Resources/Resources.Designer.cs index 19827c698e..039f006b5e 100644 --- a/src/Microsoft.TestPlatform.AdapterUtilities/Resources/Resources.Designer.cs +++ b/src/Microsoft.TestPlatform.AdapterUtilities/Resources/Resources.Designer.cs @@ -27,7 +27,7 @@ internal Resources() { if (object.ReferenceEquals(resourceMan, null)) { -#if NET20 || NET35 +#if NET20 || NET35 || NET40 global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.TestPlatform.AdapterUtilities.Resources.Resources", typeof(Resources).Assembly); #else global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.TestPlatform.AdapterUtilities.Resources.Resources", typeof(Resources).GetTypeInfo().Assembly); diff --git a/src/package/nuspec/Microsoft.TestPlatform.AdapterUtilities.nuspec b/src/package/nuspec/Microsoft.TestPlatform.AdapterUtilities.nuspec index 84b41b837e..08cd5b6528 100644 --- a/src/package/nuspec/Microsoft.TestPlatform.AdapterUtilities.nuspec +++ b/src/package/nuspec/Microsoft.TestPlatform.AdapterUtilities.nuspec @@ -23,22 +23,30 @@ - + + + + + + + + - - - + + + + @@ -47,5 +55,8 @@ + + +