Skip to content

Move FQN related code into a separate NuGet package #2714

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jan 27, 2021
Merged
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ build*.log
build*.wrn
build*.err
*.binlog
*.svclog
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case you were wondering, there was a bug in some recent internal builds of VS that would cause svclog files to be dropped in devenv.exe's CWD. I believe that bug should be fixed now :)


# MSTest test Results
[Tt]est[Rr]esult*/
Expand Down
17 changes: 16 additions & 1 deletion TestPlatform.sln
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.TestPlatform.Exte
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "coverlet.collector", "test\coverlet.collector\coverlet.collector.csproj", "{074F5BD6-DC05-460B-B78F-044D125FD787}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.TestPlatform.ObjectModel.ManagedNameUtilities.UnitTests", "test\Microsoft.TestPlatform.ObjectModel.ManagedNameUtilities.UnitTests\Microsoft.TestPlatform.ObjectModel.ManagedNameUtilities.UnitTests.csproj", "{DCD0C39E-C78C-4A44-B0BD-7325254A2E97}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.TestPlatform.ManagedNameUtilities.UnitTests", "test\Microsoft.TestPlatform.ManagedNameUtilities.UnitTests\Microsoft.TestPlatform.ManagedNameUtilities.UnitTests.csproj", "{DCD0C39E-C78C-4A44-B0BD-7325254A2E97}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.TestPlatform.ManagedNames", "src\Microsoft.TestPlatform.ManagedNames\Microsoft.TestPlatform.ManagedNames.csproj", "{2DE99835-A3A3-4922-82AD-6D10D284816D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -764,6 +766,18 @@ Global
{DCD0C39E-C78C-4A44-B0BD-7325254A2E97}.Release|x64.Build.0 = Release|Any CPU
{DCD0C39E-C78C-4A44-B0BD-7325254A2E97}.Release|x86.ActiveCfg = Release|Any CPU
{DCD0C39E-C78C-4A44-B0BD-7325254A2E97}.Release|x86.Build.0 = Release|Any CPU
{2DE99835-A3A3-4922-82AD-6D10D284816D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2DE99835-A3A3-4922-82AD-6D10D284816D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2DE99835-A3A3-4922-82AD-6D10D284816D}.Debug|x64.ActiveCfg = Debug|Any CPU
{2DE99835-A3A3-4922-82AD-6D10D284816D}.Debug|x64.Build.0 = Debug|Any CPU
{2DE99835-A3A3-4922-82AD-6D10D284816D}.Debug|x86.ActiveCfg = Debug|Any CPU
{2DE99835-A3A3-4922-82AD-6D10D284816D}.Debug|x86.Build.0 = Debug|Any CPU
{2DE99835-A3A3-4922-82AD-6D10D284816D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2DE99835-A3A3-4922-82AD-6D10D284816D}.Release|Any CPU.Build.0 = Release|Any CPU
{2DE99835-A3A3-4922-82AD-6D10D284816D}.Release|x64.ActiveCfg = Release|Any CPU
{2DE99835-A3A3-4922-82AD-6D10D284816D}.Release|x64.Build.0 = Release|Any CPU
{2DE99835-A3A3-4922-82AD-6D10D284816D}.Release|x86.ActiveCfg = Release|Any CPU
{2DE99835-A3A3-4922-82AD-6D10D284816D}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -831,6 +845,7 @@ Global
{41248B96-6E15-4E5E-A78F-859897676814} = {020E15EA-731F-4667-95AF-226671E0C3AE}
{074F5BD6-DC05-460B-B78F-044D125FD787} = {D9A30E32-D466-4EC5-B4F2-62E17562279B}
{DCD0C39E-C78C-4A44-B0BD-7325254A2E97} = {B27FAFDF-2DBA-4AB0-BA85-FD5F21D359D6}
{2DE99835-A3A3-4922-82AD-6D10D284816D} = {7D4082EA-7AC9-4DFB-98E8-C5E08BDC0EC3}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0541B30C-FF51-4E28-B172-83F5F3934BCD}
Expand Down
23 changes: 13 additions & 10 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -781,16 +781,19 @@ function Create-NugetPackages
$tpNuspecDir = Join-Path $env:TP_PACKAGE_PROJ_DIR "nuspec"

# Copy over the nuspecs to the staging directory
$nuspecFiles = @("TestPlatform.TranslationLayer.nuspec",
"TestPlatform.ObjectModel.nuspec",
"TestPlatform.TestHost.nuspec",
"TestPlatform.CLI.nuspec",
"TestPlatform.Build.nuspec",
"TestPlatform.Extensions.TrxLogger.nuspec",
"Microsoft.NET.Test.Sdk.nuspec",
"Microsoft.TestPlatform.nuspec",
"Microsoft.TestPlatform.Portable.nuspec",
"Microsoft.CodeCoverage.nuspec")
$nuspecFiles = @(
"TestPlatform.TranslationLayer.nuspec",
"TestPlatform.ObjectModel.nuspec",
"Microsoft.TestPlatform.ManagedNames.nuspec",
"TestPlatform.TestHost.nuspec",
"TestPlatform.CLI.nuspec",
"TestPlatform.Build.nuspec",
"TestPlatform.Extensions.TrxLogger.nuspec",
"Microsoft.NET.Test.Sdk.nuspec",
"Microsoft.TestPlatform.nuspec",
"Microsoft.TestPlatform.Portable.nuspec",
"Microsoft.CodeCoverage.nuspec"
)

$targetFiles = @("Microsoft.CodeCoverage.targets")
$propFiles = @("Microsoft.NET.Test.Sdk.props", "Microsoft.CodeCoverage.props")
Expand Down
22 changes: 12 additions & 10 deletions scripts/verify-nupkgs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@ function Verify-Nuget-Packages($packageDirectory, $version)
{
Write-Log "Starting Verify-Nuget-Packages."
$expectedNumOfFiles = @{
"Microsoft.CodeCoverage" = 59;
"Microsoft.NET.Test.Sdk" = 18;
"Microsoft.TestPlatform" = 513;
"Microsoft.TestPlatform.Build" = 19;
"Microsoft.TestPlatform.CLI" = 379;
"Microsoft.TestPlatform.Extensions.TrxLogger" = 33;
"Microsoft.TestPlatform.ObjectModel" = 178;
"Microsoft.TestPlatform.Portable" = 568;
"Microsoft.TestPlatform.TestHost" = 212;
"Microsoft.TestPlatform.TranslationLayer" = 121}
"Microsoft.CodeCoverage" = 59;
"Microsoft.NET.Test.Sdk" = 18;
"Microsoft.TestPlatform" = 527;
"Microsoft.TestPlatform.Build" = 19;
"Microsoft.TestPlatform.CLI" = 409;
"Microsoft.TestPlatform.Extensions.TrxLogger" = 33;
"Microsoft.TestPlatform.ObjectModel" = 256;
"Microsoft.TestPlatform.ManagedNames" = 32;
"Microsoft.TestPlatform.Portable" = 610;
"Microsoft.TestPlatform.TestHost" = 371;
"Microsoft.TestPlatform.TranslationLayer" = 121
}

$nugetPackages = Get-ChildItem -Filter "*$version*.nupkg" $packageDirectory | % { $_.FullName }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,4 @@
<data name="Utility_ProcessNameWhenCannotGetIt" xml:space="preserve">
<value>Error getting process name.</value>
</data>
<data name="MethodNotImplementedOnPlatform" xml:space="preserve">
<value>'{0}.{1}' is not implemented on this platform!</value>
<comment>'{className}.{methodName}' is not implemented on this platform!

Example: 'System.Reflection.MethodBase' is not implemented on this platform!</comment>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,6 @@
<target state="translated">Hostitele {0} nešlo najít. Ujistěte se, jestli je {0} nainstalovaný na počítači a dostupný v cestě určené proměnnou prostředí PATH.</target>
<note />
</trans-unit>
<trans-unit id="MethodNotImplementedOnPlatform">
<source>'{0}.{1}' is not implemented on this platform!</source>
<target state="translated">Metoda {0}.{1} není na této platformě implementována.</target>
<note>'{className}.{methodName}' is not implemented on this platform!

Example: 'System.Reflection.MethodBase' is not implemented on this platform!</note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,6 @@
<target state="translated">Der Host "{0}" wurde nicht gefunden. Stellen Sie sicher, dass "{0}" auf dem Computer installiert und in der PATH-Umgebungsvariablen verfügbar ist.</target>
<note />
</trans-unit>
<trans-unit id="MethodNotImplementedOnPlatform">
<source>'{0}.{1}' is not implemented on this platform!</source>
<target state="translated">"{0}.{1}" ist auf dieser Plattform nicht implementiert!</target>
<note>'{className}.{methodName}' is not implemented on this platform!

Example: 'System.Reflection.MethodBase' is not implemented on this platform!</note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,6 @@
<target state="translated">No se pudo encontrar el host "{0}". Asegúrese de que "{0}" está instalado en el equipo y está disponible en la variable de entorno PATH.</target>
<note />
</trans-unit>
<trans-unit id="MethodNotImplementedOnPlatform">
<source>'{0}.{1}' is not implemented on this platform!</source>
<target state="translated">"{0}.{1}" no se ha implementado en esta plataforma.</target>
<note>'{className}.{methodName}' is not implemented on this platform!

Example: 'System.Reflection.MethodBase' is not implemented on this platform!</note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,6 @@
<target state="translated">L'hôte '{0}' est introuvable. Vérifiez que '{0}' est installé sur la machine et qu'il est disponible dans la variable d'environnement PATH.</target>
<note />
</trans-unit>
<trans-unit id="MethodNotImplementedOnPlatform">
<source>'{0}.{1}' is not implemented on this platform!</source>
<target state="translated">'{0}.{1}' n'est pas implémenté sur cette plateforme !</target>
<note>'{className}.{methodName}' is not implemented on this platform!

Example: 'System.Reflection.MethodBase' is not implemented on this platform!</note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,6 @@
<target state="translated">L'host '{0}' non è stato trovato. Assicurarsi che '{0}' sia installato nel computer e che sia disponibile nella variabile di ambiente PATH.</target>
<note />
</trans-unit>
<trans-unit id="MethodNotImplementedOnPlatform">
<source>'{0}.{1}' is not implemented on this platform!</source>
<target state="translated">'{0}.{1}' non è implementato in questa piattaforma.</target>
<note>'{className}.{methodName}' is not implemented on this platform!

Example: 'System.Reflection.MethodBase' is not implemented on this platform!</note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,6 @@
<target state="translated">'{0}' ホストが見つかりませんでした。'{0}' がコンピューターにインストールされており、PATH 環境変数で使用できることを確認してください。</target>
<note />
</trans-unit>
<trans-unit id="MethodNotImplementedOnPlatform">
<source>'{0}.{1}' is not implemented on this platform!</source>
<target state="translated">'{0}.{1}' はこのプラットフォームに実装されていません。</target>
<note>'{className}.{methodName}' is not implemented on this platform!

Example: 'System.Reflection.MethodBase' is not implemented on this platform!</note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,6 @@
<target state="translated">‘{0}’ 호스트를 찾을 수 없습니다. ‘{0}’이(가) 컴퓨터에 설치되어 있고 PATH 환경 변수에서 사용할 수 있는지 확인하세요.</target>
<note />
</trans-unit>
<trans-unit id="MethodNotImplementedOnPlatform">
<source>'{0}.{1}' is not implemented on this platform!</source>
<target state="translated">'{0}.{1}'이(가)이 플랫폼에서 구현되지 않았습니다.</target>
<note>'{className}.{methodName}' is not implemented on this platform!

Example: 'System.Reflection.MethodBase' is not implemented on this platform!</note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,6 @@
<target state="translated">Nie można znaleźć hosta „{0}”. Upewnij się, że element „{0}” jest zainstalowany na maszynie i jest dostępny w zmiennej środowiskowej PATH.</target>
<note />
</trans-unit>
<trans-unit id="MethodNotImplementedOnPlatform">
<source>'{0}.{1}' is not implemented on this platform!</source>
<target state="translated">Element „{0}.{1}” nie jest zaimplementowany na tej platformie.</target>
<note>'{className}.{methodName}' is not implemented on this platform!

Example: 'System.Reflection.MethodBase' is not implemented on this platform!</note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,6 @@
<target state="translated">Não foi possível encontrar o host '{0}'. Verifique se o '{0}' está instalado no computador e está disponível na variável de ambiente PATH.</target>
<note />
</trans-unit>
<trans-unit id="MethodNotImplementedOnPlatform">
<source>'{0}.{1}' is not implemented on this platform!</source>
<target state="translated">'{0}.{1}' não está implementado nesta plataforma.</target>
<note>'{className}.{methodName}' is not implemented on this platform!

Example: 'System.Reflection.MethodBase' is not implemented on this platform!</note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,6 @@
<target state="translated">Не удалось найти хост "{0}". Убедитесь, что "{0}" установлен на компьютере и доступен в переменной среды PATH.</target>
<note />
</trans-unit>
<trans-unit id="MethodNotImplementedOnPlatform">
<source>'{0}.{1}' is not implemented on this platform!</source>
<target state="translated">Метод "{0}.{1}" не реализован на этой платформе.</target>
<note>'{className}.{methodName}' is not implemented on this platform!

Example: 'System.Reflection.MethodBase' is not implemented on this platform!</note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,6 @@
<target state="translated">'{0}' konağı bulunamadı. '{0}' konağının makinede yüklü olduğundan ve PATH ortam değişkeninde bulunduğundan emin olun.</target>
<note />
</trans-unit>
<trans-unit id="MethodNotImplementedOnPlatform">
<source>'{0}.{1}' is not implemented on this platform!</source>
<target state="translated">'{0}.{1}' bu platformda uygulanmıyor!</target>
<note>'{className}.{methodName}' is not implemented on this platform!

Example: 'System.Reflection.MethodBase' is not implemented on this platform!</note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,6 @@
<target state="new">Could not find {0}. Make sure that the dotnet is installed on the machine.</target>
<note></note>
</trans-unit>
<trans-unit id="MethodNotImplementedOnPlatform">
<source>'{0}.{1}' is not implemented on this platform!</source>
<target state="new">'{0}.{1}' is not implemented on this platform!</target>
<note>'{className}.{methodName}' is not implemented on this platform!

Example: 'System.Reflection.MethodBase' is not implemented on this platform!</note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,6 @@
<target state="translated">找不到“{0}”主机。请确保计算机上已安装“{0}”且位于 PATH 环境变量中。</target>
<note />
</trans-unit>
<trans-unit id="MethodNotImplementedOnPlatform">
<source>'{0}.{1}' is not implemented on this platform!</source>
<target state="translated">未在此平台上实现 "{0}.{1}"!</target>
<note>'{className}.{methodName}' is not implemented on this platform!

Example: 'System.Reflection.MethodBase' is not implemented on this platform!</note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,6 @@
<target state="translated">找不到 '{0}' 主機。請確認 '{0}' 已安裝在機器上,而且可在 PATH 環境變數中使用。</target>
<note />
</trans-unit>
<trans-unit id="MethodNotImplementedOnPlatform">
<source>'{0}.{1}' is not implemented on this platform!</source>
<target state="translated">'{0}.{1}' 未在此平台上實作!</target>
<note>'{className}.{methodName}' is not implemented on this platform!

Example: 'System.Reflection.MethodBase' is not implemented on this platform!</note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// 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.VisualStudio.TestPlatform.PlatformAbstractions.Extensions
namespace Microsoft.VisualStudio.TestPlatform.Extensions
{
using System;
using System.Reflection;

public static partial class ReflectionExtensions
internal static partial class ReflectionExtensions
{
#if NETSTANDARD1_0 || NETSTANDARD1_3 || WINDOWS_UWP
private static readonly Type methodBase = typeof(MethodBase);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// 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.VisualStudio.TestPlatform.PlatformAbstractions.Extensions
namespace Microsoft.VisualStudio.TestPlatform.Extensions
{
using System;
using System.Reflection;

public static partial class ReflectionExtensions
internal static partial class ReflectionExtensions
{
public static bool IsGenericType(this Type type)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// 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.VisualStudio.TestPlatform.PlatformAbstractions.Extensions
namespace Microsoft.VisualStudio.TestPlatform.Extensions
{
using Microsoft.VisualStudio.TestPlatform.CoreUtilities.Resources;
using Microsoft.VisualStudio.TestPlatform.Resources;

using System;

public static partial class ReflectionExtensions
internal static partial class ReflectionExtensions
{
private static void AssertSupport<T>(T obj, string methodName, string className)
private static void AssertSupport<T>(T obj, string methodName, string className)
where T : class
{
if (obj == null)
Expand Down
Loading