From 89d77fa468eb59faa1787c7da86bde6dedc403b7 Mon Sep 17 00:00:00 2001 From: Vagisha Nidhi Date: Mon, 4 Mar 2019 16:56:26 +0530 Subject: [PATCH 1/2] Revert "LOC CHECKIN | Microsoft/vstest master | 20190213 (#1923)" This reverts commit 08b8fab95ea0773150e86dac784674470ec247b5. --- .../Resources/xlf/Resources.cs.xlf | 4 ++-- .../Resources/xlf/Resources.de.xlf | 4 ++-- .../Resources/xlf/Resources.es.xlf | 4 ++-- .../Resources/xlf/Resources.fr.xlf | 4 ++-- .../Resources/xlf/Resources.it.xlf | 4 ++-- .../Resources/xlf/Resources.ja.xlf | 4 ++-- .../Resources/xlf/Resources.ko.xlf | 4 ++-- .../Resources/xlf/Resources.pl.xlf | 4 ++-- .../Resources/xlf/Resources.pt-BR.xlf | 4 ++-- .../Resources/xlf/Resources.ru.xlf | 4 ++-- .../Resources/xlf/Resources.tr.xlf | 4 ++-- .../Resources/xlf/Resources.zh-Hans.xlf | 4 ++-- .../Resources/xlf/Resources.zh-Hant.xlf | 4 ++-- .../Resources/xlf/Resources.cs.xlf | 16 +++++++++++----- .../Resources/xlf/Resources.de.xlf | 16 +++++++++++----- .../Resources/xlf/Resources.es.xlf | 16 +++++++++++----- .../Resources/xlf/Resources.fr.xlf | 16 +++++++++++----- .../Resources/xlf/Resources.it.xlf | 16 +++++++++++----- .../Resources/xlf/Resources.ja.xlf | 16 +++++++++++----- .../Resources/xlf/Resources.ko.xlf | 16 +++++++++++----- .../Resources/xlf/Resources.pl.xlf | 16 +++++++++++----- .../Resources/xlf/Resources.pt-BR.xlf | 16 +++++++++++----- .../Resources/xlf/Resources.ru.xlf | 16 +++++++++++----- .../Resources/xlf/Resources.tr.xlf | 16 +++++++++++----- .../Resources/xlf/Resources.zh-Hans.xlf | 16 +++++++++++----- .../Resources/xlf/Resources.zh-Hant.xlf | 16 +++++++++++----- 26 files changed, 169 insertions(+), 91 deletions(-) diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.cs.xlf b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.cs.xlf index 1b49c492a4..fc2d60a7bc 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.cs.xlf +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.cs.xlf @@ -58,8 +58,8 @@ File {0} does not exists - Soubor {0} neexistuje. - + File {0} does not exists + diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.de.xlf b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.de.xlf index 7ff831419b..7b80a4a064 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.de.xlf +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.de.xlf @@ -58,8 +58,8 @@ File {0} does not exists - Die Datei "{0}" ist nicht vorhanden. - + File {0} does not exists + diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.es.xlf b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.es.xlf index 3160169511..5f6d8b8d75 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.es.xlf +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.es.xlf @@ -58,8 +58,8 @@ File {0} does not exists - El archivo {0} no existe - + File {0} does not exists + diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.fr.xlf b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.fr.xlf index 5c4b310162..c0bb489585 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.fr.xlf +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.fr.xlf @@ -58,8 +58,8 @@ File {0} does not exists - Le fichier {0} n'existe pas - + File {0} does not exists + diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.it.xlf b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.it.xlf index bb5b29d97a..c227f8c775 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.it.xlf +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.it.xlf @@ -58,8 +58,8 @@ File {0} does not exists - Il file {0} non esiste - + File {0} does not exists + diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.ja.xlf b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.ja.xlf index ab9ede3fab..0a302e68b9 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.ja.xlf +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.ja.xlf @@ -58,8 +58,8 @@ File {0} does not exists - ファイル {0} は存在しません - + File {0} does not exists + diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.ko.xlf b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.ko.xlf index b6c8f22f6e..4613012f09 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.ko.xlf +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.ko.xlf @@ -58,8 +58,8 @@ File {0} does not exists - {0} 파일이 없습니다. - + File {0} does not exists + diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.pl.xlf b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.pl.xlf index 769dc4ed96..3dd65d3da9 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.pl.xlf +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.pl.xlf @@ -58,8 +58,8 @@ File {0} does not exists - Plik {0} nie istnieje - + File {0} does not exists + diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.pt-BR.xlf b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.pt-BR.xlf index 5ec1cfca59..ad183f6acc 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.pt-BR.xlf +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.pt-BR.xlf @@ -58,8 +58,8 @@ File {0} does not exists - O arquivo {0} não existe - + File {0} does not exists + diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.ru.xlf b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.ru.xlf index 91c630cf6a..66a39cb7fd 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.ru.xlf +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.ru.xlf @@ -58,8 +58,8 @@ File {0} does not exists - Файл {0} не существует. - + File {0} does not exists + diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.tr.xlf b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.tr.xlf index e7f5b65f56..d10df89242 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.tr.xlf +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.tr.xlf @@ -58,8 +58,8 @@ File {0} does not exists - {0} dosyası yok - + File {0} does not exists + diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.zh-Hans.xlf b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.zh-Hans.xlf index 2f51c13087..920a316e8e 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.zh-Hans.xlf +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.zh-Hans.xlf @@ -58,8 +58,8 @@ File {0} does not exists - 文件 {0} 不存在 - + File {0} does not exists + diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.zh-Hant.xlf b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.zh-Hant.xlf index 4eb384f0d4..fed746bce6 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.zh-Hant.xlf +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.zh-Hant.xlf @@ -58,8 +58,8 @@ File {0} does not exists - 檔案 {0} 不存在。 - + File {0} does not exists + diff --git a/src/vstest.console/Resources/xlf/Resources.cs.xlf b/src/vstest.console/Resources/xlf/Resources.cs.xlf index 2fc722ccd4..d5760cc3de 100644 --- a/src/vstest.console/Resources/xlf/Resources.cs.xlf +++ b/src/vstest.console/Resources/xlf/Resources.cs.xlf @@ -1517,9 +1517,9 @@ - Test Run Aborted. - Testovací běh se přerušil. - + Test Run Aborted. {0} + Testovací běh se přerušil. + Test Run Canceled. @@ -1634,8 +1634,14 @@ Framework35 is not supported. For projects targeting .Net Framework 3.5, test will run in CLR 4.0 "compatibility mode". - Framework35 není podporován. Pro projekty sestavované pro .Net Framework 3.5 poběží test v režimu kompatibility pomocí CLR 4.0. - + Zadání Framework35 není podporováno. U projektů mířících na .Net Framework 3.5 prosím použijte Framework40, aby testy v CLR 4.0 běžely v režimu kompatibility. + + + + +The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. + Conflicts in framework/platform identifier of provided sources. + diff --git a/src/vstest.console/Resources/xlf/Resources.de.xlf b/src/vstest.console/Resources/xlf/Resources.de.xlf index 24c29c7ef6..5daba271d0 100644 --- a/src/vstest.console/Resources/xlf/Resources.de.xlf +++ b/src/vstest.console/Resources/xlf/Resources.de.xlf @@ -1517,9 +1517,9 @@ - Test Run Aborted. - Testlauf abgebrochen. - + Test Run Aborted. {0} + Testlauf abgebrochen. + Test Run Canceled. @@ -1634,8 +1634,14 @@ Framework35 is not supported. For projects targeting .Net Framework 3.5, test will run in CLR 4.0 "compatibility mode". - Framework35 wird nicht unterstützt. Für Projekte, die auf .NET Framework 3.5 ausgerichtet sind, wird der Test im "Kompatibilitätsmodus" von CLR 4.0 ausgeführt. - + Framework35 wird nicht unterstützt. Verwenden Sie für Projekte, die auf .Net Framework 3.5 ausgerichtet sind, Framework40 zum Ausführen von Tests im "Kompatibilitätsmodus" von CLR 4.0. + + + + +The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. + Conflicts in framework/platform identifier of provided sources. + diff --git a/src/vstest.console/Resources/xlf/Resources.es.xlf b/src/vstest.console/Resources/xlf/Resources.es.xlf index fe668501f5..e54b04cb06 100644 --- a/src/vstest.console/Resources/xlf/Resources.es.xlf +++ b/src/vstest.console/Resources/xlf/Resources.es.xlf @@ -1522,9 +1522,9 @@ - Test Run Aborted. - Serie de pruebas anulada. - + Test Run Aborted. {0} + Serie de pruebas anulada. + Test Run Canceled. @@ -1639,8 +1639,14 @@ Framework35 is not supported. For projects targeting .Net Framework 3.5, test will run in CLR 4.0 "compatibility mode". - No se admite Framework35. Para proyectos con destino .Net Framework 3.5, las pruebas se ejecutarán en "modo de compatibilidad" de CLR 4.0. - + No se admite Framework35. Para proyectos con destino .Net Framework 3.5, use Framework40 para ejecutar las pruebas en "modo de compatibilidad" de CLR 4.0. + + + + +The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. + Conflicts in framework/platform identifier of provided sources. + diff --git a/src/vstest.console/Resources/xlf/Resources.fr.xlf b/src/vstest.console/Resources/xlf/Resources.fr.xlf index 092c49d39b..c4b571787e 100644 --- a/src/vstest.console/Resources/xlf/Resources.fr.xlf +++ b/src/vstest.console/Resources/xlf/Resources.fr.xlf @@ -1517,9 +1517,9 @@ - Test Run Aborted. - Série de tests abandonnée. - + Test Run Aborted. {0} + Série de tests abandonnée. + Test Run Canceled. @@ -1634,8 +1634,14 @@ Framework35 is not supported. For projects targeting .Net Framework 3.5, test will run in CLR 4.0 "compatibility mode". - Framework35 n'est pas pris en charge. Pour les projets ciblant le .Net Framework 3.5, le test s'exécute dans CLR 4.0 en "mode compatibilité". - + Framework35 n'est pas pris en charge. Pour les projets ciblant .Net Framework 3.5, utilisez Framework40 pour exécuter les tests dans CLR 4.0 en "mode compatibilité". + + + + +The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. + Conflicts in framework/platform identifier of provided sources. + diff --git a/src/vstest.console/Resources/xlf/Resources.it.xlf b/src/vstest.console/Resources/xlf/Resources.it.xlf index 606536bdbb..11698b06c3 100644 --- a/src/vstest.console/Resources/xlf/Resources.it.xlf +++ b/src/vstest.console/Resources/xlf/Resources.it.xlf @@ -1517,9 +1517,9 @@ - Test Run Aborted. - Esecuzione dei test interrotta. - + Test Run Aborted. {0} + Esecuzione dei test interrotta. + Test Run Canceled. @@ -1634,8 +1634,14 @@ Framework35 is not supported. For projects targeting .Net Framework 3.5, test will run in CLR 4.0 "compatibility mode". - Framework35 non è supportato. Per i progetti destinati a .NET Framework 3.5, i test verranno eseguiti nella modalità di compatibilità di CLR 4.0. - + Framework35 non è supportato. Per i progetti destinati a .NET Framework 3.5, usare Framework40 per eseguire i test nella modalità di compatibilità di CLR 4.0. + + + + +The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. + Conflicts in framework/platform identifier of provided sources. + diff --git a/src/vstest.console/Resources/xlf/Resources.ja.xlf b/src/vstest.console/Resources/xlf/Resources.ja.xlf index 33194ccabd..40a076ffdc 100644 --- a/src/vstest.console/Resources/xlf/Resources.ja.xlf +++ b/src/vstest.console/Resources/xlf/Resources.ja.xlf @@ -1517,9 +1517,9 @@ - Test Run Aborted. - テスト実行が中止されました。 - + Test Run Aborted. {0} + テスト実行が中止されました。 + Test Run Canceled. @@ -1634,8 +1634,14 @@ Framework35 is not supported. For projects targeting .Net Framework 3.5, test will run in CLR 4.0 "compatibility mode". - Framework35 はサポートされていません。.Net Framework 3.5 を対象とするプロジェクトでは、CLR 4.0 の "互換モード" でテストが稼働します。 - + Framework35 はサポートされていません。.Net Framework 3.5 を対象とするプロジェクトでは、Framework40 を使用して CLR 4.0 の "互換モード" でテストを実行してください。 + + + + +The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. + Conflicts in framework/platform identifier of provided sources. + diff --git a/src/vstest.console/Resources/xlf/Resources.ko.xlf b/src/vstest.console/Resources/xlf/Resources.ko.xlf index c7ab987e5f..47e9c29850 100644 --- a/src/vstest.console/Resources/xlf/Resources.ko.xlf +++ b/src/vstest.console/Resources/xlf/Resources.ko.xlf @@ -1517,9 +1517,9 @@ - Test Run Aborted. - 테스트 실행이 중단되었습니다. - + Test Run Aborted. {0} + 테스트 실행이 중단되었습니다. + Test Run Canceled. @@ -1634,8 +1634,14 @@ Framework35 is not supported. For projects targeting .Net Framework 3.5, test will run in CLR 4.0 "compatibility mode". - Framework35는 지원되지 않습니다. .NET Framework 3.5를 대상으로 하는 프로젝트의 경우 CLR 4.0 "호환 모드"에서 테스트가 실행됩니다. - + Framework35는 지원되지 않습니다. .NET Framework 3.5를 대상으로 하는 프로젝트의 경우 Framework40을 사용하여 CLR 4.0 "호환 모드"에서 테스트를 실행하세요. + + + + +The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. + Conflicts in framework/platform identifier of provided sources. + diff --git a/src/vstest.console/Resources/xlf/Resources.pl.xlf b/src/vstest.console/Resources/xlf/Resources.pl.xlf index 7540031e01..c65e76f0ae 100644 --- a/src/vstest.console/Resources/xlf/Resources.pl.xlf +++ b/src/vstest.console/Resources/xlf/Resources.pl.xlf @@ -1516,9 +1516,9 @@ - Test Run Aborted. - Przebieg testu został przerwany. - + Test Run Aborted. {0} + Przebieg testu został przerwany. + Test Run Canceled. @@ -1632,8 +1632,14 @@ Framework35 is not supported. For projects targeting .Net Framework 3.5, test will run in CLR 4.0 "compatibility mode". - Wersja Framework35 nie jest obsługiwana. W przypadku projektów przeznaczonych dla programu .Net Framework 3.5 testy będą uruchamiane w „trybie zgodności” CLR 4.0. - + Wersja Framework35 nie jest obsługiwana. W przypadku projektów przeznaczonych dla programu .Net Framework 3.5 użyj wersji Framework40 do uruchamiania testów w „trybie zgodności” CLR 4.0. + + + + +The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. + Conflicts in framework/platform identifier of provided sources. + diff --git a/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf b/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf index 205ad9e923..337b63c78e 100644 --- a/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf +++ b/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf @@ -1516,9 +1516,9 @@ - Test Run Aborted. - Execução de Teste Anulada. - + Test Run Aborted. {0} + Execução de Teste Anulada. + Test Run Canceled. @@ -1632,8 +1632,14 @@ Framework35 is not supported. For projects targeting .Net Framework 3.5, test will run in CLR 4.0 "compatibility mode". - Não há suporte para Framework35. Para projetos com .Net Framework 3.5 de destino, o teste será executado no “modo de compatibilidade” CLR 4.0. - + Não há suporte para Framework35. Para projetos com .Net Framework 3.5 de destino, use o Framework40 para executar testes em “modo de compatibilidade” CLR 4.0. + + + + +The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. + Conflicts in framework/platform identifier of provided sources. + diff --git a/src/vstest.console/Resources/xlf/Resources.ru.xlf b/src/vstest.console/Resources/xlf/Resources.ru.xlf index 5e780de9a4..c1567f8456 100644 --- a/src/vstest.console/Resources/xlf/Resources.ru.xlf +++ b/src/vstest.console/Resources/xlf/Resources.ru.xlf @@ -1517,9 +1517,9 @@ - Test Run Aborted. - Тестовый запуск прерван. - + Test Run Aborted. {0} + Тестовый запуск прерван. + Test Run Canceled. @@ -1634,8 +1634,14 @@ Framework35 is not supported. For projects targeting .Net Framework 3.5, test will run in CLR 4.0 "compatibility mode". - Framework35 не поддерживается. В проектах для .Net Framework 3.5 тесты будут запускаться в режиме совместимости CLR 4.0. - + Framework35 не поддерживается. В проектах для .Net Framework 3.5 запускайте тесты в режиме совместимости CLR 4.0 с использованием Framework40. + + + + +The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. + Conflicts in framework/platform identifier of provided sources. + diff --git a/src/vstest.console/Resources/xlf/Resources.tr.xlf b/src/vstest.console/Resources/xlf/Resources.tr.xlf index aecf1786eb..9246f1964e 100644 --- a/src/vstest.console/Resources/xlf/Resources.tr.xlf +++ b/src/vstest.console/Resources/xlf/Resources.tr.xlf @@ -1517,9 +1517,9 @@ - Test Run Aborted. - Test Çalıştırması Durduruldu. - + Test Run Aborted. {0} + Test Çalıştırması Durduruldu. + Test Run Canceled. @@ -1634,8 +1634,14 @@ Framework35 is not supported. For projects targeting .Net Framework 3.5, test will run in CLR 4.0 "compatibility mode". - Framework35 desteklenmiyor. .NET Framework 3.5’i hedefleyen projeler için test CLR 4.0 “uyumluluk modunda” çalışacak. - + Framework35 desteklenmiyor. .NET Framework 3.5’i hedefleyen projeler için lütfen Framework40 kullanarak testleri CLR 4.0’ın “uyumluluk modunda” çalıştırın. + + + + +The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. + Conflicts in framework/platform identifier of provided sources. + diff --git a/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf b/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf index fcb653550a..68f7f88c9d 100644 --- a/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf +++ b/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf @@ -1517,9 +1517,9 @@ - Test Run Aborted. - 测试运行已中止。 - + Test Run Aborted. {0} + 测试运行已中止。 + Test Run Canceled. @@ -1634,8 +1634,14 @@ Framework35 is not supported. For projects targeting .Net Framework 3.5, test will run in CLR 4.0 "compatibility mode". - Framework35 不受支持。对于面向 .Net Framework 3.5 的项目,将在 CLR 4.0“兼容性模式”下运行测试。 - + Framework35 不受支持。对于面向 .Net Framework 3.5 的项目,请使用 Framework40 在 CLR 4.0“兼容性模式”下运行测试。 + + + + +The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. + Conflicts in framework/platform identifier of provided sources. + diff --git a/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf b/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf index dbbc8f9917..9f9e92a8ee 100644 --- a/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf +++ b/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf @@ -1517,9 +1517,9 @@ - Test Run Aborted. - 測試回合已中止。 - + Test Run Aborted. {0} + 測試回合已中止。 + Test Run Canceled. @@ -1634,8 +1634,14 @@ Framework35 is not supported. For projects targeting .Net Framework 3.5, test will run in CLR 4.0 "compatibility mode". - 不支援 Framework35。若為以 .Net Framework 3.5 為目標的專案,則會在 CLR 4.0 「相容性模式」中執行測試。 - + 不支援 Framework35。若為以 .Net Framework 3.5 為目標的專案,請使用 Framework40 在 CLR 4.0「相容模式」中執行測試。 + + + + +The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. + Conflicts in framework/platform identifier of provided sources. + From be347ef8f12e95367c46d347c7267a9139e5b1af Mon Sep 17 00:00:00 2001 From: Vagisha Nidhi Date: Mon, 4 Mar 2019 17:50:47 +0530 Subject: [PATCH 2/2] Revert "Aborting test run when source and target frameworks/architectures are incompatible (#1789)" This reverts commit 37678c471025e36cada738b49b3caf02de29b3dd. --- .../Resources/CommonResources.Designer.cs | 4 +- .../Resources/CommonResources.resx | 3 +- .../Resources/xlf/CommonResources.cs.xlf | 7 +- .../Resources/xlf/CommonResources.de.xlf | 7 +- .../Resources/xlf/CommonResources.es.xlf | 7 +- .../Resources/xlf/CommonResources.fr.xlf | 7 +- .../Resources/xlf/CommonResources.it.xlf | 7 +- .../Resources/xlf/CommonResources.ja.xlf | 7 +- .../Resources/xlf/CommonResources.ko.xlf | 7 +- .../Resources/xlf/CommonResources.pl.xlf | 7 +- .../Resources/xlf/CommonResources.pt-BR.xlf | 7 +- .../Resources/xlf/CommonResources.ru.xlf | 7 +- .../Resources/xlf/CommonResources.tr.xlf | 7 +- .../Resources/xlf/CommonResources.xlf | 3 +- .../Resources/xlf/CommonResources.zh-Hans.xlf | 7 +- .../Resources/xlf/CommonResources.zh-Hant.xlf | 7 +- .../InferRunSettingsHelper.cs | 38 ++--- src/vstest.console/CommandLine/InferHelper.cs | 45 +++--- .../Resources/Resources.Designer.cs | 11 -- src/vstest.console/Resources/Resources.resx | 6 +- .../Resources/xlf/Resources.cs.xlf | 12 +- .../Resources/xlf/Resources.de.xlf | 12 +- .../Resources/xlf/Resources.es.xlf | 12 +- .../Resources/xlf/Resources.fr.xlf | 12 +- .../Resources/xlf/Resources.it.xlf | 12 +- .../Resources/xlf/Resources.ja.xlf | 12 +- .../Resources/xlf/Resources.ko.xlf | 12 +- .../Resources/xlf/Resources.pl.xlf | 12 +- .../Resources/xlf/Resources.pt-BR.xlf | 12 +- .../Resources/xlf/Resources.ru.xlf | 12 +- .../Resources/xlf/Resources.tr.xlf | 12 +- .../Resources/xlf/Resources.xlf | 8 +- .../Resources/xlf/Resources.zh-Hans.xlf | 12 +- .../Resources/xlf/Resources.zh-Hant.xlf | 12 +- .../TestPlatformHelpers/TestRequestManager.cs | 42 ++--- .../ExecutionTests.cs | 9 +- .../FrameworkTests.cs | 9 +- .../InferRunSettingsHelperTests.cs | 32 +--- .../CommandLine/InferHelperTests.cs | 143 ++++++------------ .../TestRequestManagerTests.cs | 87 ++--------- 40 files changed, 212 insertions(+), 475 deletions(-) diff --git a/src/Microsoft.TestPlatform.ObjectModel/Resources/CommonResources.Designer.cs b/src/Microsoft.TestPlatform.ObjectModel/Resources/CommonResources.Designer.cs index 8953794fc9..de5b2db5a4 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Resources/CommonResources.Designer.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/Resources/CommonResources.Designer.cs @@ -69,9 +69,9 @@ public static string CannotBeNullOrEmpty { return ResourceManager.GetString("CannotBeNullOrEmpty", resourceCulture); } } - + /// - /// Looks up a localized string similar to The following DLL(s) do not match the specified framework {0} and platform {1} settings.{2}Ensure that the test assemblies target the specified framework/platform settings. Go to {3} for more details on managing these settings.. + /// Looks up a localized string similar to Test run will use DLL(s) built for framework {0} and platform {1}. Following DLL(s) will not be part of run: {2} Go to {3} for more details on managing these settings.. /// public static string DisplayChosenSettings { get { diff --git a/src/Microsoft.TestPlatform.ObjectModel/Resources/CommonResources.resx b/src/Microsoft.TestPlatform.ObjectModel/Resources/CommonResources.resx index 5ca295f037..870ef40055 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Resources/CommonResources.resx +++ b/src/Microsoft.TestPlatform.ObjectModel/Resources/CommonResources.resx @@ -121,7 +121,8 @@ The parameter cannot be null or empty. - The following DLL(s) do not match the specified framework {0} and platform {1} settings.{2}Ensure that the test assemblies target the specified framework/platform settings. Go to {3} for more details on managing these settings. + Test run will use DLL(s) built for framework {0} and platform {1}. Following DLL(s) do not match framework/platform settings.{2}Go to {3} for more details on managing these settings. + Settings file provided does not conform to required format. diff --git a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.cs.xlf b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.cs.xlf index 41a4f22174..6cbcd9aec0 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.cs.xlf +++ b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.cs.xlf @@ -30,10 +30,11 @@ fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95" - The following DLL(s) do not match the specified framework {0} and platform {1} settings.{2}Ensure that the test assemblies target the specified framework/platform settings. Go to {3} for more details on managing these settings. - Testovací běh použije knihovny DLL sestavené pro rozhraní {0} a platformu {1}. Tyto knihovny DLL nebudou součástí běhu: {2}Další podrobnosti o správě těchto nastavení najdete na adrese {3}. + Test run will use DLL(s) built for framework {0} and platform {1}. Following DLL(s) do not match framework/platform settings.{2}Go to {3} for more details on managing these settings. + + Testovací běh použije knihovny DLL sestavené pro rozhraní {0} a platformu {1}. Tyto knihovny DLL nebudou součástí běhu: {2}Další podrobnosti o správě těchto nastavení najdete na adrese {3}. - + Spuštění testu použije DLL(s) vybudované framework {0} a platformu {1}. Po DLL(s) nebudou součástí run: {2} {3} podrobnosti přejít na správu těchto nastavení. diff --git a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.de.xlf b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.de.xlf index 6b4cf68d3b..ba40291dc4 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.de.xlf +++ b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.de.xlf @@ -30,10 +30,11 @@ fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95" - The following DLL(s) do not match the specified framework {0} and platform {1} settings.{2}Ensure that the test assemblies target the specified framework/platform settings. Go to {3} for more details on managing these settings. - Der Testlauf verwendet DLLs, die für das Framework {0} und die Plattform {1} erstellt wurden. Die folgenden DLLs sind nicht Teil der Ausführung: {2}.Navigieren Sie zu {3}, um weitere Details zum Verwalten dieser Einstellungen zu erhalten. + Test run will use DLL(s) built for framework {0} and platform {1}. Following DLL(s) do not match framework/platform settings.{2}Go to {3} for more details on managing these settings. + + Der Testlauf verwendet DLLs, die für das Framework {0} und die Plattform {1} erstellt wurden. Die folgenden DLLs sind nicht Teil der Ausführung: {2}.Navigieren Sie zu {3}, um weitere Details zum Verwalten dieser Einstellungen zu erhalten. - + Testlauf verwendet DLLs für Framework {0} und {1}-Plattform integriert. Folgende DLLs nicht Teil ausführen: {2} zur {3} Einzelheiten auf diese Einstellungen. diff --git a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.es.xlf b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.es.xlf index 50f7f02136..b0cb7caed0 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.es.xlf +++ b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.es.xlf @@ -30,10 +30,11 @@ fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95" - The following DLL(s) do not match the specified framework {0} and platform {1} settings.{2}Ensure that the test assemblies target the specified framework/platform settings. Go to {3} for more details on managing these settings. - La serie de pruebas usará archivos DLL compilados para el marco {0} y la plataforma {1}. Los siguientes archivos DLL no formarán parte de la ejecución: {2}Vaya a {3} para obtener más información sobre cómo administrar esta configuración. + Test run will use DLL(s) built for framework {0} and platform {1}. Following DLL(s) do not match framework/platform settings.{2}Go to {3} for more details on managing these settings. + + La serie de pruebas usará archivos DLL compilados para el marco {0} y la plataforma {1}. Los siguientes archivos DLL no formarán parte de la ejecución: {2}Vaya a {3} para obtener más información sobre cómo administrar esta configuración. - + Ejecución de prueba utilizará archivos DLL construido para framework {0} y plataforma {1}. Siguiendo los archivos DLL no formarán parte de la ejecución: {2} vaya a {3} para obtener más información acerca de cómo administrar esta configuración. diff --git a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.fr.xlf b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.fr.xlf index cde50de7d1..e0b422ac29 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.fr.xlf +++ b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.fr.xlf @@ -30,10 +30,11 @@ fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95" - The following DLL(s) do not match the specified framework {0} and platform {1} settings.{2}Ensure that the test assemblies target the specified framework/platform settings. Go to {3} for more details on managing these settings. - La série de tests utilise des DLL générées pour le framework {0} et la plateforme {1}. Les DLL suivantes ne font pas partie de la série de tests : {2}Accédez à {3} pour plus de détails sur la gestion de ces paramètres. + Test run will use DLL(s) built for framework {0} and platform {1}. Following DLL(s) do not match framework/platform settings.{2}Go to {3} for more details on managing these settings. + + La série de tests utilise des DLL générées pour le framework {0} et la plateforme {1}. Les DLL suivantes ne font pas partie de la série de tests : {2}Accédez à {3} pour plus de détails sur la gestion de ces paramètres. - + Série de tests utilise DLL conçu pour {0} de l’infrastructure et de plateforme {1}. Suivant les DLL ne fera pas partie de l’exécution : {2} atteindre {3} pour plus de détails sur la gestion de ces paramètres. diff --git a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.it.xlf b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.it.xlf index 397d990497..8696f0b6f2 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.it.xlf +++ b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.it.xlf @@ -30,10 +30,11 @@ fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95" - The following DLL(s) do not match the specified framework {0} and platform {1} settings.{2}Ensure that the test assemblies target the specified framework/platform settings. Go to {3} for more details on managing these settings. - Per l'esecuzione dei test verranno usate DLL compilate per il framework {0} e la piattaforma {1}. Le DLL seguenti non saranno incluse nell'esecuzione: {2}.Per maggiori dettagli sulla gestione di queste impostazioni, passare a {3}. + Test run will use DLL(s) built for framework {0} and platform {1}. Following DLL(s) do not match framework/platform settings.{2}Go to {3} for more details on managing these settings. + + Per l'esecuzione dei test verranno usate DLL compilate per il framework {0} e la piattaforma {1}. Le DLL seguenti non saranno incluse nell'esecuzione: {2}.Per maggiori dettagli sulla gestione di queste impostazioni, passare a {3}. - + Esecuzione dei test utilizzerà dll compilato per framework {0} e {1} piattaforma. DLL di seguito non saranno parte dell'esecuzione: {2} Vai a {3} per ulteriori informazioni sulla gestione di queste impostazioni. diff --git a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.ja.xlf b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.ja.xlf index 6e9724b8ec..d5d5b37389 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.ja.xlf +++ b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.ja.xlf @@ -30,10 +30,11 @@ fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95" - The following DLL(s) do not match the specified framework {0} and platform {1} settings.{2}Ensure that the test assemblies target the specified framework/platform settings. Go to {3} for more details on managing these settings. - テスト実行ではフレームワーク {0} およびプラットフォーム {1} 用にビルドされた DLL を使用します。次の DLL は実行には含まれません: {2}これらの設定の管理方法の詳細については、{3} にアクセスしてください。 + Test run will use DLL(s) built for framework {0} and platform {1}. Following DLL(s) do not match framework/platform settings.{2}Go to {3} for more details on managing these settings. + + テスト実行ではフレームワーク {0} およびプラットフォーム {1} 用にビルドされた DLL を使用します。次の DLL は実行には含まれません: {2}これらの設定の管理方法の詳細については、{3} にアクセスしてください。 - + テストの実行では、framework {0} と {1} のプラットフォーム用に構築された DLL(s) を使用します。次の DLL(s) は含まれませんの実行: {2} には、詳細については {3} にこれらの設定を管理します。 diff --git a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.ko.xlf b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.ko.xlf index 3ec0948089..ae391abfd5 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.ko.xlf +++ b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.ko.xlf @@ -30,10 +30,11 @@ fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95" - The following DLL(s) do not match the specified framework {0} and platform {1} settings.{2}Ensure that the test assemblies target the specified framework/platform settings. Go to {3} for more details on managing these settings. - 테스트 실행에서는 프레임워크 {0} 및 플랫폼 {1}용으로 작성된 DLL을 사용합니다. 다음 DLL은 실행에서 사용할 수 없습니다. {2}.이러한 설정의 관리에 대한 자세한 내용은 {3}을(를) 참조하세요. + Test run will use DLL(s) built for framework {0} and platform {1}. Following DLL(s) do not match framework/platform settings.{2}Go to {3} for more details on managing these settings. + + 테스트 실행에서는 프레임워크 {0} 및 플랫폼 {1}용으로 작성된 DLL을 사용합니다. 다음 DLL은 실행에서 사용할 수 없습니다. {2}.이러한 설정의 관리에 대한 자세한 내용은 {3}을(를) 참조하세요. - + 테스트 실행 프레임 워크 {0}에서 {1} 플랫폼에 대 한 빌드 DLL(s)를 사용 합니다. DLL(s) 다음 부분에서는 실행 되지 것입니다: 이러한 설정을 관리에 대 한 자세한 내용은 {3} {2} 이동 합니다. diff --git a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.pl.xlf b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.pl.xlf index c52dc9e994..69ccc57bba 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.pl.xlf +++ b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.pl.xlf @@ -30,10 +30,11 @@ fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95" - The following DLL(s) do not match the specified framework {0} and platform {1} settings.{2}Ensure that the test assemblies target the specified framework/platform settings. Go to {3} for more details on managing these settings. - Przebieg testu użyje plików DLL przeznaczonych dla struktury {0} i platformy {1}. Następujące pliki DLL nie pasują do ustawień struktury/platformy.{2}.Aby uzyskać więcej informacji na temat zarządzania tymi ustawieniami, przejdź do strony {3}. + Test run will use DLL(s) built for framework {0} and platform {1}. Following DLL(s) do not match framework/platform settings.{2}Go to {3} for more details on managing these settings. + + Przebieg testu użyje plików DLL przeznaczonych dla struktury {0} i platformy {1}. Następujące pliki DLL nie pasują do ustawień struktury/platformy.{2}.Aby uzyskać więcej informacji na temat zarządzania tymi ustawieniami, przejdź do strony {3}. - + Uruchom test użyje dll (s), zbudowane dla framework {0} i platformy {1}. Po dll (s) nie będzie częścią run: {2} Przejdź do {3} szczegółowe informacje dotyczące zarządzania tych ustawień. diff --git a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.pt-BR.xlf b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.pt-BR.xlf index 66206d0e83..b8d76c6881 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.pt-BR.xlf +++ b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.pt-BR.xlf @@ -30,10 +30,11 @@ fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95" - The following DLL(s) do not match the specified framework {0} and platform {1} settings.{2}Ensure that the test assemblies target the specified framework/platform settings. Go to {3} for more details on managing these settings. - A execução de teste usará DLLs criadas para a estrutura {0} e a plataforma {1}. As seguintes DLLs não farão parte da execução: {2}Acesse {3} para obter mais detalhes sobre como gerenciar essas configurações. + Test run will use DLL(s) built for framework {0} and platform {1}. Following DLL(s) do not match framework/platform settings.{2}Go to {3} for more details on managing these settings. + + A execução de teste usará DLLs criadas para a estrutura {0} e a plataforma {1}. As seguintes DLLs não farão parte da execução: {2}Acesse {3} para obter mais detalhes sobre como gerenciar essas configurações. - + Execução do teste usará DLL(s) criado para o framework {0} e plataforma {1}. DLL(s) a seguir não farão parte da execução: {2} vá para {3} para obter mais detalhes sobre como gerenciar essas configurações. diff --git a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.ru.xlf b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.ru.xlf index 2d39b2f233..3ccb65d854 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.ru.xlf +++ b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.ru.xlf @@ -30,10 +30,11 @@ fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95" - The following DLL(s) do not match the specified framework {0} and platform {1} settings.{2}Ensure that the test assemblies target the specified framework/platform settings. Go to {3} for more details on managing these settings. - При запуске тестов будут использоваться библиотеки DLL, собранные для платформ {0} и {1}. Следующие библиотеки DLL не будут участвовать в запуске: {2}.Дополнительные сведения об управлении этими параметрами см. в разделе {3}. + Test run will use DLL(s) built for framework {0} and platform {1}. Following DLL(s) do not match framework/platform settings.{2}Go to {3} for more details on managing these settings. + + При запуске тестов будут использоваться библиотеки DLL, собранные для платформ {0} и {1}. Следующие библиотеки DLL не будут участвовать в запуске: {2}.Дополнительные сведения об управлении этими параметрами см. в разделе {3}. - + Тестовый запуск будет использовать DLL(s) для framework {0} и платформы {1}. После DLL(s) не будет частью выполнения: {2} перейти {3} для получения дополнительных сведений об управлении эти параметры. diff --git a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.tr.xlf b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.tr.xlf index ed438a5e49..bbfe507a1a 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.tr.xlf +++ b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.tr.xlf @@ -30,10 +30,11 @@ fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95" - The following DLL(s) do not match the specified framework {0} and platform {1} settings.{2}Ensure that the test assemblies target the specified framework/platform settings. Go to {3} for more details on managing these settings. - Test çalıştırmasında, {0} çerçevesi ve {1} platformu için oluşturulan DLL’ler kullanılacak. Şu DLL’ler çalıştırmaya dahil edilmeyecek: {2}Bu ayarları yönetmeye ilişkin ayrıntılar için {3} sayfasına gidin. + Test run will use DLL(s) built for framework {0} and platform {1}. Following DLL(s) do not match framework/platform settings.{2}Go to {3} for more details on managing these settings. + + Test çalıştırmasında, {0} çerçevesi ve {1} platformu için oluşturulan DLL’ler kullanılacak. Şu DLL’ler çalıştırmaya dahil edilmeyecek: {2}Bu ayarları yönetmeye ilişkin ayrıntılar için {3} sayfasına gidin. - + Test çalışması DLL(s) framework {0} ve {1} platform için yerleşik kullanır. DLL(s) aşağıdaki çalışma parçası olmayacak: {2} Git {3} daha fazla ayrıntı için bu ayarları yönetme hakkında. diff --git a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.xlf b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.xlf index 2393867f14..a053d2ffff 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.xlf +++ b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.xlf @@ -7,7 +7,8 @@ - The following DLL(s) do not match the specified framework {0} and platform {1} settings.{2}Ensure that the test assemblies target the specified framework/platform settings. Go to {3} for more details on managing these settings. + Test run will use DLL(s) built for framework {0} and platform {1}. Following DLL(s) do not match framework/platform settings.{2}Go to {3} for more details on managing these settings. + diff --git a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.zh-Hans.xlf b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.zh-Hans.xlf index 1457d46ac3..dc1fcf651a 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.zh-Hans.xlf +++ b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.zh-Hans.xlf @@ -30,10 +30,11 @@ fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95" - The following DLL(s) do not match the specified framework {0} and platform {1} settings.{2}Ensure that the test assemblies target the specified framework/platform settings. Go to {3} for more details on managing these settings. - 测试运行将使用为框架 {0} 和平台 {1} 生成的 DLL。以下 DLL 将不是运行的一部分: {2}转到 {3} 了解有关管理这些设置的详细信息。 + Test run will use DLL(s) built for framework {0} and platform {1}. Following DLL(s) do not match framework/platform settings.{2}Go to {3} for more details on managing these settings. + + 测试运行将使用为框架 {0} 和平台 {1} 生成的 DLL。以下 DLL 将不是运行的一部分: {2}转到 {3} 了解有关管理这些设置的详细信息。 - + 测试运行将使用 DLL(s) 框架 {0} 和 {1} 的平台的构建。按照 DLL(s) 将不能运行的过程︰ {2} 转到详细 {3} 上管理这些设置。 diff --git a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.zh-Hant.xlf b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.zh-Hant.xlf index d125400484..632c7cc4e7 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.zh-Hant.xlf +++ b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/CommonResources.zh-Hant.xlf @@ -30,10 +30,11 @@ fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95" - The following DLL(s) do not match the specified framework {0} and platform {1} settings.{2}Ensure that the test assemblies target the specified framework/platform settings. Go to {3} for more details on managing these settings. - 測試回合將使用替架構 {0} 與平台 {1} 所建置的 DLL。下列 DLL 將不包含在測試回合中: {2}如需如何管理這些設定的詳細資料,請前往 {3}。 + Test run will use DLL(s) built for framework {0} and platform {1}. Following DLL(s) do not match framework/platform settings.{2}Go to {3} for more details on managing these settings. + + 測試回合將使用替架構 {0} 與平台 {1} 所建置的 DLL。下列 DLL 將不包含在測試回合中: {2}如需如何管理這些設定的詳細資料,請前往 {3}。 - + 测试运行将使用 DLL(s) 框架 {0} 和 {1} 的平台的构建。按照 DLL(s) 将不能运行的过程︰ {2} 转到详细 {3} 上管理这些设置。 diff --git a/src/Microsoft.TestPlatform.Utilities/InferRunSettingsHelper.cs b/src/Microsoft.TestPlatform.Utilities/InferRunSettingsHelper.cs index 8ad00f096f..882ad87a88 100644 --- a/src/Microsoft.TestPlatform.Utilities/InferRunSettingsHelper.cs +++ b/src/Microsoft.TestPlatform.Utilities/InferRunSettingsHelper.cs @@ -608,7 +608,6 @@ public static bool TryGetFrameworkXml(XPathNavigator runSettingsNavigator, out s return XmlUtilities.IsValidNodeXmlValue(frameworkXml, validator); } - /// /// Returns the sources matching the specified platform and framework settings. /// For incompatible sources, warning is added to incompatibleSettingWarning. @@ -616,11 +615,10 @@ public static bool TryGetFrameworkXml(XPathNavigator runSettingsNavigator, out s public static IEnumerable FilterCompatibleSources(Architecture chosenPlatform, Framework chosenFramework, IDictionary sourcePlatforms, IDictionary sourceFrameworks, out String incompatibleSettingWarning) { incompatibleSettingWarning = string.Empty; - bool incompatibilityFound = false; List compatibleSources = new List(); StringBuilder warnings = new StringBuilder(); warnings.AppendLine(); - + bool incompatiblityFound = false; foreach (var source in sourcePlatforms.Keys) { Architecture actualPlatform = sourcePlatforms[source]; @@ -634,14 +632,15 @@ public static IEnumerable FilterCompatibleSources(Architecture chosenPla incompatiblityMessage = string.Format(CultureInfo.CurrentCulture, OMResources.SourceIncompatible, onlyFileName, actualFramework.Version, actualPlatform); warnings.AppendLine(incompatiblityMessage); - incompatibilityFound = true; + incompatiblityFound = true; } else { compatibleSources.Add(source); } } - if (incompatibilityFound) + + if (incompatiblityFound) { incompatibleSettingWarning = string.Format(CultureInfo.CurrentCulture, OMResources.DisplayChosenSettings, chosenFramework, chosenPlatform, warnings.ToString(), multiTargettingForwardLink); } @@ -657,7 +656,7 @@ private static bool IsSettingIncompatible(Architecture sourcePlatform, Framework sourceFramework, Framework targetFramework) { - return IsPlatformIncompatible(sourcePlatform, targetPlatform) || IsFrameworkIncompatible(new List() { sourceFramework }, targetFramework); + return IsPlatformIncompatible(sourcePlatform, targetPlatform) || IsFrameworkIncompatible(sourceFramework, targetFramework); } @@ -676,32 +675,15 @@ private static bool IsPlatformIncompatible(Architecture sourcePlatform, Architec } /// - /// Returns true if source Framework or version is incompatible with target Framework or version. + /// Returns true if source FrameworkVersion is incompatible with target FrameworkVersion. /// - public static bool IsFrameworkIncompatible(IEnumerable sourceFrameworks, Framework targetFramework, bool versionCheckRequired = true) + private static bool IsFrameworkIncompatible(Framework sourceFramework, Framework targetFramework) { - foreach (var actualFramework in sourceFrameworks) + if (sourceFramework.Name.Equals(Framework.DefaultFramework.Name, StringComparison.OrdinalIgnoreCase)) { - if (versionCheckRequired) - { - if (!actualFramework.Name.Equals(targetFramework.Name, StringComparison.OrdinalIgnoreCase)) - { - return true; - } - } - else - { - string sourceFrameworkName = actualFramework.Name.Split(',')[0]; - string targetFrameworkName = targetFramework.Name.Split(',')[0]; - - if (!sourceFrameworkName.Equals(targetFrameworkName, StringComparison.OrdinalIgnoreCase)) - { - return true; - } - } + return false; } - - return false; + return !sourceFramework.Name.Equals(targetFramework.Name, StringComparison.OrdinalIgnoreCase); } } } diff --git a/src/vstest.console/CommandLine/InferHelper.cs b/src/vstest.console/CommandLine/InferHelper.cs index f8ad21b2db..f9dda8b734 100644 --- a/src/vstest.console/CommandLine/InferHelper.cs +++ b/src/vstest.console/CommandLine/InferHelper.cs @@ -25,12 +25,11 @@ internal InferHelper(IAssemblyMetadataProvider assemblyMetadataProvider) } /// - /// Determines Architecture from sources and returns true if source architectures are incompatible + /// Determines Architecture from sources. /// - public bool TryGetAutoDetectCompatibleArchitecture(List sources, IDictionary sourcePlatforms, out Architecture inferredArchitecture) + public Architecture AutoDetectArchitecture(List sources, IDictionary sourcePlatforms) { - inferredArchitecture = Constants.DefaultPlatform; - bool isArchitectureIncompatible = false; + Architecture architecture = Constants.DefaultPlatform; try { if (sources != null && sources.Count > 0) @@ -67,66 +66,60 @@ public bool TryGetAutoDetectCompatibleArchitecture(List sources, IDictio { finalArch = Constants.DefaultPlatform; EqtTrace.Info("Conflict in platform architecture, using default platform:{0}", finalArch); - isArchitectureIncompatible = true; } } if (finalArch != null) { - inferredArchitecture = (Architecture)finalArch; + architecture = (Architecture)finalArch; } } } catch (Exception ex) { - EqtTrace.Error("Failed to determine platform: {0}, using default: {1}", ex, inferredArchitecture); + EqtTrace.Error("Failed to determine platform: {0}, using default: {1}", ex, architecture); } if (EqtTrace.IsInfoEnabled) { - EqtTrace.Info("Determined platform for all sources: {0}", inferredArchitecture); + EqtTrace.Info("Determined platform for all sources: {0}", architecture); } - return isArchitectureIncompatible; + return architecture; } /// - /// Determines Framework from sources and returns true if source frameworks are incompatible + /// Determines Framework from sources. /// - public bool TryGetAutoDetectCompatibleFramework(List sources, IDictionary sourceFrameworkVersions, out Framework inferredFramework) + public Framework AutoDetectFramework(List sources, IDictionary sourceFrameworkVersions) { - inferredFramework = Framework.DefaultFramework; - bool isFrameworkIncompatible = false; + Framework framework = Framework.DefaultFramework; try { if (sources != null && sources.Count > 0) { var finalFx = DetermineFrameworkName(sources, sourceFrameworkVersions, out var conflictInFxIdentifier); - inferredFramework = Framework.FromString(finalFx.FullName); - - if (conflictInFxIdentifier) + framework = Framework.FromString(finalFx.FullName); + if (conflictInFxIdentifier && EqtTrace.IsInfoEnabled) { - isFrameworkIncompatible = true; - if (EqtTrace.IsInfoEnabled) - { - EqtTrace.Info( - "conflicts in Framework indentifier of provided sources(test assemblies), using default framework:{0}", - inferredFramework); - } + // TODO Log to console and client. + EqtTrace.Info( + "conflicts in Framework indentifier of provided sources(test assemblies), using default framework:{0}", + framework); } } } catch (Exception ex) { - EqtTrace.Error("Failed to determine framework:{0}, using defaulf: {1}", ex, inferredFramework); + EqtTrace.Error("Failed to determine framework:{0}, using defaulf: {1}", ex, framework); } if (EqtTrace.IsInfoEnabled) { - EqtTrace.Info("Determined framework for all sources: {0}", inferredFramework); + EqtTrace.Info("Determined framework for all sources: {0}", framework); } - return isFrameworkIncompatible; + return framework; } private FrameworkName DetermineFrameworkName(IEnumerable sources, IDictionary sourceFrameworkVersions, out bool conflictInFxIdentifier) diff --git a/src/vstest.console/Resources/Resources.Designer.cs b/src/vstest.console/Resources/Resources.Designer.cs index 9a6457805c..8b7c47a4d0 100644 --- a/src/vstest.console/Resources/Resources.Designer.cs +++ b/src/vstest.console/Resources/Resources.Designer.cs @@ -1967,16 +1967,5 @@ public static string DataCollectorFriendlyNameInvalid return ResourceManager.GetString("DataCollectorFriendlyNameInvalid", resourceCulture); } } - - /// - /// ConflictInFrameworkPlatform - /// - public static string ConflictInFrameworkPlatform - { - get - { - return ResourceManager.GetString("ConflictInFrameworkPlatform", resourceCulture); - } - } } } diff --git a/src/vstest.console/Resources/Resources.resx b/src/vstest.console/Resources/Resources.resx index eee926df2e..cb54ccd943 100644 --- a/src/vstest.console/Resources/Resources.resx +++ b/src/vstest.console/Resources/Resources.resx @@ -668,7 +668,7 @@ /Blame:CollectDump;CollectAlways=true;DumpType=full - Test Run Aborted. {0} + Test Run Aborted. Test Run Canceled. @@ -718,8 +718,4 @@ Logger argument '{0}' is not valid. - - -The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. - \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.cs.xlf b/src/vstest.console/Resources/xlf/Resources.cs.xlf index d5760cc3de..cf3b705f31 100644 --- a/src/vstest.console/Resources/xlf/Resources.cs.xlf +++ b/src/vstest.console/Resources/xlf/Resources.cs.xlf @@ -1517,9 +1517,9 @@ - Test Run Aborted. {0} - Testovací běh se přerušil. - + Test Run Aborted. + Testovací běh se přerušil. + Test Run Canceled. @@ -1637,12 +1637,6 @@ Zadání Framework35 není podporováno. U projektů mířících na .Net Framework 3.5 prosím použijte Framework40, aby testy v CLR 4.0 běžely v režimu kompatibility. - - -The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. - Conflicts in framework/platform identifier of provided sources. - - \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.de.xlf b/src/vstest.console/Resources/xlf/Resources.de.xlf index 5daba271d0..db6617f413 100644 --- a/src/vstest.console/Resources/xlf/Resources.de.xlf +++ b/src/vstest.console/Resources/xlf/Resources.de.xlf @@ -1517,9 +1517,9 @@ - Test Run Aborted. {0} - Testlauf abgebrochen. - + Test Run Aborted. + Testlauf abgebrochen. + Test Run Canceled. @@ -1637,12 +1637,6 @@ Framework35 wird nicht unterstützt. Verwenden Sie für Projekte, die auf .Net Framework 3.5 ausgerichtet sind, Framework40 zum Ausführen von Tests im "Kompatibilitätsmodus" von CLR 4.0. - - -The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. - Conflicts in framework/platform identifier of provided sources. - - \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.es.xlf b/src/vstest.console/Resources/xlf/Resources.es.xlf index e54b04cb06..bbfb59d3a9 100644 --- a/src/vstest.console/Resources/xlf/Resources.es.xlf +++ b/src/vstest.console/Resources/xlf/Resources.es.xlf @@ -1522,9 +1522,9 @@ - Test Run Aborted. {0} - Serie de pruebas anulada. - + Test Run Aborted. + Serie de pruebas anulada. + Test Run Canceled. @@ -1642,12 +1642,6 @@ No se admite Framework35. Para proyectos con destino .Net Framework 3.5, use Framework40 para ejecutar las pruebas en "modo de compatibilidad" de CLR 4.0. - - -The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. - Conflicts in framework/platform identifier of provided sources. - - \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.fr.xlf b/src/vstest.console/Resources/xlf/Resources.fr.xlf index c4b571787e..6b888403fc 100644 --- a/src/vstest.console/Resources/xlf/Resources.fr.xlf +++ b/src/vstest.console/Resources/xlf/Resources.fr.xlf @@ -1517,9 +1517,9 @@ - Test Run Aborted. {0} - Série de tests abandonnée. - + Test Run Aborted. + Série de tests abandonnée. + Test Run Canceled. @@ -1637,12 +1637,6 @@ Framework35 n'est pas pris en charge. Pour les projets ciblant .Net Framework 3.5, utilisez Framework40 pour exécuter les tests dans CLR 4.0 en "mode compatibilité". - - -The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. - Conflicts in framework/platform identifier of provided sources. - - \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.it.xlf b/src/vstest.console/Resources/xlf/Resources.it.xlf index 11698b06c3..a9c6ee4f1d 100644 --- a/src/vstest.console/Resources/xlf/Resources.it.xlf +++ b/src/vstest.console/Resources/xlf/Resources.it.xlf @@ -1517,9 +1517,9 @@ - Test Run Aborted. {0} - Esecuzione dei test interrotta. - + Test Run Aborted. + Esecuzione dei test interrotta. + Test Run Canceled. @@ -1637,12 +1637,6 @@ Framework35 non è supportato. Per i progetti destinati a .NET Framework 3.5, usare Framework40 per eseguire i test nella modalità di compatibilità di CLR 4.0. - - -The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. - Conflicts in framework/platform identifier of provided sources. - - \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.ja.xlf b/src/vstest.console/Resources/xlf/Resources.ja.xlf index 40a076ffdc..0bbdae6462 100644 --- a/src/vstest.console/Resources/xlf/Resources.ja.xlf +++ b/src/vstest.console/Resources/xlf/Resources.ja.xlf @@ -1517,9 +1517,9 @@ - Test Run Aborted. {0} - テスト実行が中止されました。 - + Test Run Aborted. + テスト実行が中止されました。 + Test Run Canceled. @@ -1637,12 +1637,6 @@ Framework35 はサポートされていません。.Net Framework 3.5 を対象とするプロジェクトでは、Framework40 を使用して CLR 4.0 の "互換モード" でテストを実行してください。 - - -The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. - Conflicts in framework/platform identifier of provided sources. - - \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.ko.xlf b/src/vstest.console/Resources/xlf/Resources.ko.xlf index 47e9c29850..2bdb09826f 100644 --- a/src/vstest.console/Resources/xlf/Resources.ko.xlf +++ b/src/vstest.console/Resources/xlf/Resources.ko.xlf @@ -1517,9 +1517,9 @@ - Test Run Aborted. {0} - 테스트 실행이 중단되었습니다. - + Test Run Aborted. + 테스트 실행이 중단되었습니다. + Test Run Canceled. @@ -1637,12 +1637,6 @@ Framework35는 지원되지 않습니다. .NET Framework 3.5를 대상으로 하는 프로젝트의 경우 Framework40을 사용하여 CLR 4.0 "호환 모드"에서 테스트를 실행하세요. - - -The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. - Conflicts in framework/platform identifier of provided sources. - - \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.pl.xlf b/src/vstest.console/Resources/xlf/Resources.pl.xlf index c65e76f0ae..6098711c9e 100644 --- a/src/vstest.console/Resources/xlf/Resources.pl.xlf +++ b/src/vstest.console/Resources/xlf/Resources.pl.xlf @@ -1516,9 +1516,9 @@ - Test Run Aborted. {0} - Przebieg testu został przerwany. - + Test Run Aborted. + Przebieg testu został przerwany. + Test Run Canceled. @@ -1635,12 +1635,6 @@ Wersja Framework35 nie jest obsługiwana. W przypadku projektów przeznaczonych dla programu .Net Framework 3.5 użyj wersji Framework40 do uruchamiania testów w „trybie zgodności” CLR 4.0. - - -The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. - Conflicts in framework/platform identifier of provided sources. - - \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf b/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf index 337b63c78e..bbe4bdd51c 100644 --- a/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf +++ b/src/vstest.console/Resources/xlf/Resources.pt-BR.xlf @@ -1516,9 +1516,9 @@ - Test Run Aborted. {0} - Execução de Teste Anulada. - + Test Run Aborted. + Execução de Teste Anulada. + Test Run Canceled. @@ -1635,12 +1635,6 @@ Não há suporte para Framework35. Para projetos com .Net Framework 3.5 de destino, use o Framework40 para executar testes em “modo de compatibilidade” CLR 4.0. - - -The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. - Conflicts in framework/platform identifier of provided sources. - - \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.ru.xlf b/src/vstest.console/Resources/xlf/Resources.ru.xlf index c1567f8456..3fd7725c75 100644 --- a/src/vstest.console/Resources/xlf/Resources.ru.xlf +++ b/src/vstest.console/Resources/xlf/Resources.ru.xlf @@ -1517,9 +1517,9 @@ - Test Run Aborted. {0} - Тестовый запуск прерван. - + Test Run Aborted. + Тестовый запуск прерван. + Test Run Canceled. @@ -1637,12 +1637,6 @@ Framework35 не поддерживается. В проектах для .Net Framework 3.5 запускайте тесты в режиме совместимости CLR 4.0 с использованием Framework40. - - -The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. - Conflicts in framework/platform identifier of provided sources. - - \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.tr.xlf b/src/vstest.console/Resources/xlf/Resources.tr.xlf index 9246f1964e..a0f8394125 100644 --- a/src/vstest.console/Resources/xlf/Resources.tr.xlf +++ b/src/vstest.console/Resources/xlf/Resources.tr.xlf @@ -1517,9 +1517,9 @@ - Test Run Aborted. {0} - Test Çalıştırması Durduruldu. - + Test Run Aborted. + Test Çalıştırması Durduruldu. + Test Run Canceled. @@ -1637,12 +1637,6 @@ Framework35 desteklenmiyor. .NET Framework 3.5’i hedefleyen projeler için lütfen Framework40 kullanarak testleri CLR 4.0’ın “uyumluluk modunda” çalıştırın. - - -The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. - Conflicts in framework/platform identifier of provided sources. - - \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.xlf b/src/vstest.console/Resources/xlf/Resources.xlf index 36926b4faa..6a18bf3040 100644 --- a/src/vstest.console/Resources/xlf/Resources.xlf +++ b/src/vstest.console/Resources/xlf/Resources.xlf @@ -690,7 +690,7 @@ - Test Run Aborted. {0} + Test Run Aborted. Test Run Aborted. @@ -819,12 +819,6 @@ Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode". - - -The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. - Conflicts in framework/platform identifier of provided sources. - - \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf b/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf index 68f7f88c9d..2491ecca96 100644 --- a/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf +++ b/src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf @@ -1517,9 +1517,9 @@ - Test Run Aborted. {0} - 测试运行已中止。 - + Test Run Aborted. + 测试运行已中止。 + Test Run Canceled. @@ -1637,12 +1637,6 @@ Framework35 不受支持。对于面向 .Net Framework 3.5 的项目,请使用 Framework40 在 CLR 4.0“兼容性模式”下运行测试。 - - -The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. - Conflicts in framework/platform identifier of provided sources. - - \ No newline at end of file diff --git a/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf b/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf index 9f9e92a8ee..e9e1af8986 100644 --- a/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf +++ b/src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf @@ -1517,9 +1517,9 @@ - Test Run Aborted. {0} - 測試回合已中止。 - + Test Run Aborted. + 測試回合已中止。 + Test Run Canceled. @@ -1637,12 +1637,6 @@ 不支援 Framework35。若為以 .Net Framework 3.5 為目標的專案,請使用 Framework40 在 CLR 4.0「相容模式」中執行測試。 - - -The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform. - Conflicts in framework/platform identifier of provided sources. - - \ No newline at end of file diff --git a/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs b/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs index f691cfc902..2736921d60 100644 --- a/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs +++ b/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs @@ -5,7 +5,6 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.TestPlatformHelpers { using System; using System.Collections.Generic; - using System.Globalization; using System.IO; using System.Linq; using System.Reflection; @@ -364,51 +363,34 @@ private bool UpdateRunSettingsIfRequired(string runsettingsXml, List sou var navigator = document.CreateNavigator(); - // Automatically detect frameworks and platforms from sources and return true if any incompatibility - var isFrameworkIncompatible = inferHelper.TryGetAutoDetectCompatibleFramework(sources, sourceFrameworks, out var inferredFramework); - var isPlatformIncompatible = inferHelper.TryGetAutoDetectCompatibleArchitecture(sources, sourcePlatforms, out var inferredPlatform); - - // Throw exception if conflicts found in framework/platform - if (isFrameworkIncompatible || isPlatformIncompatible) - { - throw new TestPlatformException(Resources.ConflictInFrameworkPlatform); - } - - // Update framework and platform if required. For commandline scenario update happens in ArgumentProcessor. + var inferedFramework = inferHelper.AutoDetectFramework(sources, sourceFrameworks); Framework chosenFramework; - bool updateFramework = IsAutoFrameworkUpdateRequired(navigator, out chosenFramework); + var inferedPlatform = inferHelper.AutoDetectArchitecture(sources, sourcePlatforms); Architecture chosenPlatform; - bool updatePlatform = IsAutoPlatformUpdateRequired(navigator, out chosenPlatform); - // Update framework and platform + // Update frmaework and platform if required. For commandline scenario update happens in ArgumentProcessor. + bool updateFramework = IsAutoFrameworkDetectRequired(navigator, out chosenFramework); + bool updatePlatform = IsAutoPlatformDetectRequired(navigator, out chosenPlatform); + if (updateFramework) { - InferRunSettingsHelper.UpdateTargetFramework(document, inferredFramework?.ToString(), overwrite: true); - chosenFramework = inferredFramework; + InferRunSettingsHelper.UpdateTargetFramework(document, inferedFramework?.ToString(), overwrite: true); + chosenFramework = inferedFramework; settingsUpdated = true; } if (updatePlatform) { - InferRunSettingsHelper.UpdateTargetPlatform(document, inferredPlatform.ToString(), overwrite: true); - chosenPlatform = inferredPlatform; + InferRunSettingsHelper.UpdateTargetPlatform(document, inferedPlatform.ToString(), overwrite: true); + chosenPlatform = inferedPlatform; settingsUpdated = true; } - // Get compatible sources and construct warning messages if any incompatibilty found var compatibleSources = InferRunSettingsHelper.FilterCompatibleSources(chosenPlatform, chosenFramework, sourcePlatforms, sourceFrameworks, out var incompatibleSettingWarning); - // isSettingIncompatible wil be true if run needs to be aborted due to incompatibility in source and target frameworks - var isSettingIncompatible = InferRunSettingsHelper.IsFrameworkIncompatible(sourceFrameworks.Values.Distinct(), chosenFramework, false); - if (!string.IsNullOrEmpty(incompatibleSettingWarning)) { EqtTrace.Info(incompatibleSettingWarning); - if(isSettingIncompatible) - { - throw new TestPlatformException(string.Format(CultureInfo.CurrentCulture, Resources.TestRunAborted, incompatibleSettingWarning)); - } - // If run does not need to abort, raise warning messages ConsoleLogger.RaiseTestRunWarning(incompatibleSettingWarning); } @@ -575,7 +557,7 @@ private void RunTests(IRequestData requestData, TestRunCriteria testRunCriteria, } } - private bool IsAutoFrameworkUpdateRequired(XPathNavigator navigator, out Framework chosenFramework) + private bool IsAutoFrameworkDetectRequired(XPathNavigator navigator, out Framework chosenFramework) { bool required = true; chosenFramework = null; @@ -598,7 +580,7 @@ private bool IsAutoFrameworkUpdateRequired(XPathNavigator navigator, out Framewo return required; } - private bool IsAutoPlatformUpdateRequired(XPathNavigator navigator, out Architecture chosenPlatform) + private bool IsAutoPlatformDetectRequired(XPathNavigator navigator, out Architecture chosenPlatform) { bool required = true; chosenPlatform = Architecture.Default; diff --git a/test/Microsoft.TestPlatform.AcceptanceTests/ExecutionTests.cs b/test/Microsoft.TestPlatform.AcceptanceTests/ExecutionTests.cs index cd9ea340cb..42aa0fa34d 100644 --- a/test/Microsoft.TestPlatform.AcceptanceTests/ExecutionTests.cs +++ b/test/Microsoft.TestPlatform.AcceptanceTests/ExecutionTests.cs @@ -217,7 +217,7 @@ public void UnhandleExceptionExceptionShouldBeLoggedToDiagLogFile(RunnerInfo run public void IncompatibleSourcesWarningShouldBeDisplayedInTheConsole(RunnerInfo runnerInfo) { AcceptanceTestBase.SetTestEnvironment(this.testEnvironment, runnerInfo); - var expectedErrorContains = @"The given test sources target multiple frameworks/platforms that are incompatible. Please make sure the sources target the same framework and platform."; + var expectedWarningContains = @"Following DLL(s) do not match framework/platform settings. SimpleTestProject3.dll is built for Framework 4.5.1 and Platform X64"; var assemblyPaths = this.BuildMultipleAssemblyPath("SimpleTestProject3.dll", "SimpleTestProjectx86.dll").Trim('\"'); var arguments = PrepareArguments(assemblyPaths, this.GetTestAdapterPath(), string.Empty, this.FrameworkArgValue, runnerInfo.InIsolationValue); @@ -225,10 +225,11 @@ public void IncompatibleSourcesWarningShouldBeDisplayedInTheConsole(RunnerInfo r this.InvokeVsTest(arguments); - this.ValidateSummaryStatus(0, 0, 0); + this.ValidateSummaryStatus(1, 0, 0); + this.ExitCodeEquals(0); - // When both x64 & x86 DLL is passed the run should abort with error message. - this.StdErrorContains(expectedErrorContains); + // When both x64 & x86 DLL is passed x64 dll will be ignored. + this.StdOutputContains(expectedWarningContains); } } } diff --git a/test/Microsoft.TestPlatform.AcceptanceTests/FrameworkTests.cs b/test/Microsoft.TestPlatform.AcceptanceTests/FrameworkTests.cs index c9730fe680..fd7dbb729a 100644 --- a/test/Microsoft.TestPlatform.AcceptanceTests/FrameworkTests.cs +++ b/test/Microsoft.TestPlatform.AcceptanceTests/FrameworkTests.cs @@ -41,7 +41,14 @@ public void OnWrongFrameworkPassedTestRunShouldNotRun(RunnerInfo runnerInfo) } this.InvokeVsTest(arguments); - this.StdErrorContains("Test Run Aborted. The following DLL(s) do not match the specified framework"); + if (runnerInfo.TargetFramework.Contains("netcore")) + { + this.StdOutputContains("No test is available"); + } + else + { + this.StdErrorContains("Test Run Aborted."); + } } } } \ No newline at end of file diff --git a/test/Microsoft.TestPlatform.Utilities.UnitTests/InferRunSettingsHelperTests.cs b/test/Microsoft.TestPlatform.Utilities.UnitTests/InferRunSettingsHelperTests.cs index edd37f064d..d3baeacbb5 100644 --- a/test/Microsoft.TestPlatform.Utilities.UnitTests/InferRunSettingsHelperTests.cs +++ b/test/Microsoft.TestPlatform.Utilities.UnitTests/InferRunSettingsHelperTests.cs @@ -391,7 +391,7 @@ public void UpdateTargetFrameworkShouldAddFrameworkXmlNodeIfNotPresent() } [TestMethod] - public void FilterCompatibleSourcesShouldIdentifyIncompatibleSourcesAndConstructWarningMessage() + public void FilterCompatibleSourcesShouldIdentifyIncomaptiableSourcesAndConstructWarningMessage() { #region Arrange sourceArchitectures["AnyCPU1net46.dll"] = Architecture.AnyCPU; @@ -468,36 +468,6 @@ public void FilterCompatibleSourcesShouldRetrunWarningMessageIfNoConflict() Assert.IsTrue(string.IsNullOrEmpty(warningMessage)); } - [TestMethod] - public void IsFrameworkIncompatibleShouldReturnTrueIfNoVersionCheckAndFrameworksIncompatible() - { - Framework targetFramework = Framework.FromString(".NETCoreApp,Version=1.0"); - HashSet sourceFrameworks = new HashSet() { targetFramework , frameworkNet45, frameworkNet47 }; - - bool isFrameworkIncompatible = InferRunSettingsHelper.IsFrameworkIncompatible(sourceFrameworks, targetFramework, false); - Assert.IsTrue(isFrameworkIncompatible); - } - - [TestMethod] - public void IsFrameworkIncompatibleShouldReturnFalseIfNoVersionCheckAndFrameworksHaveDifferentVersions() - { - HashSet sourceFrameworks = new HashSet() { frameworkNet46, frameworkNet45, frameworkNet47 }; - Framework targetFramework = frameworkNet46; - - bool isFrameworkIncompatible = InferRunSettingsHelper.IsFrameworkIncompatible(sourceFrameworks, targetFramework, false); - Assert.IsFalse(isFrameworkIncompatible); - } - - [TestMethod] - public void IsFrameworkIncompatibleShouldReturnTrueIfVersionCheckAndFrameworksHaveDifferentVersions() - { - HashSet sourceFrameworks = new HashSet() { frameworkNet45, frameworkNet47 }; - Framework targetFramework = frameworkNet46; - - bool isFrameworkIncompatible = InferRunSettingsHelper.IsFrameworkIncompatible(sourceFrameworks, targetFramework, true); - Assert.IsTrue(isFrameworkIncompatible); - } - [TestMethod] public void IsTestSettingsEnabledShouldReturnTrueIfRunsettingsHasTestSettings() { diff --git a/test/vstest.console.UnitTests/CommandLine/InferHelperTests.cs b/test/vstest.console.UnitTests/CommandLine/InferHelperTests.cs index 26898a3629..4c35efddd4 100644 --- a/test/vstest.console.UnitTests/CommandLine/InferHelperTests.cs +++ b/test/vstest.console.UnitTests/CommandLine/InferHelperTests.cs @@ -36,139 +36,103 @@ public InferHelperTests() } [TestMethod] - public void TryGetAutoDetectCompatibleArchitectureShouldReturnDefaultArchitectureOnNullSources() + public void AutoDetectArchitectureShouldReturnDefaultArchitectureOnNullSources() { - bool isArchitectureIncompatible = inferHelper.TryGetAutoDetectCompatibleArchitecture(null, sourceArchitectures, out var inferredArchitecture); - - Assert.AreEqual(false, isArchitectureIncompatible); - Assert.AreEqual(Constants.DefaultPlatform, inferredArchitecture); + Assert.AreEqual(Constants.DefaultPlatform, inferHelper.AutoDetectArchitecture(null, sourceArchitectures)); } [TestMethod] - public void TryGeAutoDetectCompatibleArchitectureShouldReturnDefaultArchitectureOnEmptySources() + public void AutoDetectArchitectureShouldReturnDefaultArchitectureOnEmptySources() { - bool isArchitectureIncompatible = inferHelper.TryGetAutoDetectCompatibleArchitecture(new List(0), sourceArchitectures, out var inferredArchitecture); - - Assert.AreEqual(false, isArchitectureIncompatible); - Assert.AreEqual(Constants.DefaultPlatform, inferredArchitecture); + Assert.AreEqual(Constants.DefaultPlatform, inferHelper.AutoDetectArchitecture(new List(0), sourceArchitectures)); } [TestMethod] - public void TryGetAutoDetectCompatibleArchitectureShouldReturnDefaultArchitectureOnNullItemInSources() + public void AutoDetectArchitectureShouldReturnDefaultArchitectureOnNullItemInSources() { - bool isArchitectureIncompatible = inferHelper.TryGetAutoDetectCompatibleArchitecture(new List() { null }, sourceArchitectures, out var inferredArchitecture); - - Assert.AreEqual(false, isArchitectureIncompatible); - Assert.AreEqual(Constants.DefaultPlatform, inferredArchitecture); + Assert.AreEqual(Constants.DefaultPlatform, inferHelper.AutoDetectArchitecture(new List(){null}, sourceArchitectures)); } [TestMethod] - public void TryGetAutoDetectCompatibleArchitectureShouldReturnDefaultArchitectureOnWhiteSpaceItemInSources() + public void AutoDetectArchitectureShouldReturnDefaultArchitectureOnWhiteSpaceItemInSources() { - bool isArchitectureIncompatible = inferHelper.TryGetAutoDetectCompatibleArchitecture(new List() { " " }, sourceArchitectures, out var inferredArchitecture); - - Assert.AreEqual(false, isArchitectureIncompatible); - Assert.AreEqual(Constants.DefaultPlatform, inferredArchitecture); + Assert.AreEqual(Constants.DefaultPlatform, inferHelper.AutoDetectArchitecture(new List() { " "}, sourceArchitectures)); } [TestMethod] - public void TryGetAutoDetectCompatibleArchitectureShouldReturnCorrectArchForOneSource() + public void AutoDetectArchitectureShouldReturnCorrectArchForOneSource() { this.mockAssemblyHelper.Setup(ah => ah.GetArchitecture(It.IsAny())).Returns(Architecture.X86); - - bool isArchitectureIncompatible = inferHelper.TryGetAutoDetectCompatibleArchitecture(new List() { "1.dll" }, sourceArchitectures, out var inferredArchitecture); - - Assert.AreEqual(false, isArchitectureIncompatible); - Assert.AreEqual(Constants.DefaultPlatform, inferredArchitecture); + Assert.AreEqual(Architecture.X86, inferHelper.AutoDetectArchitecture(new List(){"1.dll"}, sourceArchitectures)); this.mockAssemblyHelper.Verify(ah => ah.GetArchitecture(It.IsAny())); } [TestMethod] - public void TryGetAutoDetectCompatibleArchitectureShouldReturnCorrectDefaultArchForNotDotNetAssembly() + public void AutoDetectArchitectureShouldReturnCorrectDefaultArchForNotDotNetAssembly() { - bool isArchitectureIncompatible = inferHelper.TryGetAutoDetectCompatibleArchitecture(new List() { "NotDotNetAssebly.appx" }, sourceArchitectures, out var inferredArchitecture); - - Assert.AreEqual(false, isArchitectureIncompatible); - Assert.AreEqual(Constants.DefaultPlatform, inferredArchitecture); + Assert.AreEqual(Constants.DefaultPlatform, inferHelper.AutoDetectArchitecture(new List() { "NotDotNetAssebly.appx" }, sourceArchitectures)); this.mockAssemblyHelper.Verify(ah => ah.GetArchitecture(It.IsAny()), Times.Never); } [TestMethod] - public void TryGetAutoDetectCompatibleArchitectureShouldSetAnyCpuArchForNotDotNetAssembly() + public void AutoDetectArchitectureShouldSetAnyCpuArchForNotDotNetAssembly() { - bool isArchitectureIncompatible = inferHelper.TryGetAutoDetectCompatibleArchitecture(new List() { "NotDotNetAssebly.appx" }, sourceArchitectures, out var inferredArchitecture); - - Assert.AreEqual(false, isArchitectureIncompatible); + inferHelper.AutoDetectArchitecture(new List() { "NotDotNetAssebly.appx" }, sourceArchitectures); Assert.AreEqual(Architecture.AnyCPU, sourceArchitectures["NotDotNetAssebly.appx"]); } [TestMethod] - public void TryGetAutoDetectCompatibleArchitectureShouldReturnDefaultArchForAllAnyCpuAssemblies() + public void AutoDetectArchitectureShouldReturnDefaultArchForAllAnyCpuAssemblies() { this.mockAssemblyHelper.SetupSequence(ah => ah.GetArchitecture(It.IsAny())) .Returns(Architecture.AnyCPU).Returns(Architecture.AnyCPU).Returns(Architecture.AnyCPU); - - bool isArchitectureIncompatible = inferHelper.TryGetAutoDetectCompatibleArchitecture(new List() { "AnyCPU1.dll", "AnyCPU2.exe", "AnyCPU3.dll" }, sourceArchitectures, out var inferredArchitecture); - Assert.AreEqual(Constants.DefaultPlatform, inferredArchitecture); - Assert.AreEqual(false, isArchitectureIncompatible); + Assert.AreEqual(Constants.DefaultPlatform, inferHelper.AutoDetectArchitecture(new List() { "AnyCPU1.dll", "AnyCPU2.exe", "AnyCPU3.dll" }, sourceArchitectures)); this.mockAssemblyHelper.Verify(ah => ah.GetArchitecture(It.IsAny()), Times.Exactly(3)); } [TestMethod] - public void TryGetAutoDetectCompatibleArchitectureShouldReturnX86ArchIfOneX86AssemblyAndRestAnyCPU() + public void AutoDetectArchitectureShouldReturnX86ArchIfOneX86AssemblyAndRestAnyCPU() { this.mockAssemblyHelper.SetupSequence(ah => ah.GetArchitecture(It.IsAny())) .Returns(Architecture.AnyCPU).Returns(Architecture.AnyCPU).Returns(Architecture.X86); - bool isArchitectureIncompatible = inferHelper.TryGetAutoDetectCompatibleArchitecture(new List() { "AnyCPU1.dll", "AnyCPU2.exe", "x86.dll" }, sourceArchitectures, out var inferredArchitecture); - Assert.AreEqual(false, isArchitectureIncompatible); - Assert.AreEqual(Architecture.X86, inferredArchitecture); + Assert.AreEqual(Architecture.X86, inferHelper.AutoDetectArchitecture(new List() { "AnyCPU1.dll", "AnyCPU2.exe", "x86.dll" }, sourceArchitectures)); this.mockAssemblyHelper.Verify(ah => ah.GetArchitecture(It.IsAny()), Times.Exactly(3)); } [TestMethod] - public void TryGetAutoDetectCompatibleArchitectureShouldReturnARMArchIfOneARMAssemblyAndRestAnyCPU() + public void AutoDetectArchitectureShouldReturnARMArchIfOneARMAssemblyAndRestAnyCPU() { this.mockAssemblyHelper.SetupSequence(ah => ah.GetArchitecture(It.IsAny())) .Returns(Architecture.ARM).Returns(Architecture.ARM).Returns(Architecture.ARM); - - bool isArchitectureIncompatible = inferHelper.TryGetAutoDetectCompatibleArchitecture(new List() { "ARM1.dll", "ARM2.dll", "ARM3.dll" }, sourceArchitectures, out var inferredArchitecture); - Assert.AreEqual(false, isArchitectureIncompatible); - Assert.AreEqual(Architecture.ARM, inferredArchitecture); + Assert.AreEqual(Architecture.ARM, inferHelper.AutoDetectArchitecture(new List() { "ARM1.dll", "ARM2.dll", "ARM3.dll" }, sourceArchitectures)); this.mockAssemblyHelper.Verify(ah => ah.GetArchitecture(It.IsAny()), Times.Exactly(3)); } [TestMethod] - public void TryGetAutoDetectCompatibleArchitectureShouldReturnX64ArchIfOneX64AssemblyAndRestAnyCPU() + public void AutoDetectArchitectureShouldReturnX64ArchIfOneX64AssemblyAndRestAnyCPU() { this.mockAssemblyHelper.SetupSequence(ah => ah.GetArchitecture(It.IsAny())) .Returns(Architecture.AnyCPU).Returns(Architecture.AnyCPU).Returns(Architecture.X64); - - bool isArchitectureIncompatible = inferHelper.TryGetAutoDetectCompatibleArchitecture(new List() { "x64.dll", "AnyCPU2.exe", "x64.dll" }, sourceArchitectures, out var inferredArchitecture); - Assert.AreEqual(false, isArchitectureIncompatible); - Assert.AreEqual(Architecture.X64, inferredArchitecture); + Assert.AreEqual(Architecture.X64, inferHelper.AutoDetectArchitecture(new List() { "x64.dll", "AnyCPU2.exe", "x64.dll" }, sourceArchitectures)); this.mockAssemblyHelper.Verify(ah => ah.GetArchitecture(It.IsAny()), Times.Exactly(3)); } [TestMethod] - public void TryGetAutoDetectCompatibleArchitectureShouldReturnDefaultArchOnConflictArches() + public void AutoDetectArchitectureShouldReturnDefaultArchOnConflictArches() { this.mockAssemblyHelper.SetupSequence(ah => ah.GetArchitecture(It.IsAny())) .Returns(Architecture.AnyCPU).Returns(Architecture.X64).Returns(Architecture.X86); - - bool isArchitectureIncompatible = inferHelper.TryGetAutoDetectCompatibleArchitecture(new List() { "AnyCPU1.dll", "x64.exe", "x86.dll" }, sourceArchitectures, out var inferredArchitecture); - Assert.AreEqual(true, isArchitectureIncompatible); - Assert.AreEqual(Constants.DefaultPlatform, inferredArchitecture); + Assert.AreEqual(Constants.DefaultPlatform, inferHelper.AutoDetectArchitecture(new List() { "AnyCPU1.dll", "x64.exe", "x86.dll" }, sourceArchitectures)); this.mockAssemblyHelper.Verify(ah => ah.GetArchitecture(It.IsAny()), Times.Exactly(3)); } [TestMethod] - public void TryGetAutoDetectCompatibleArchitectureShouldPopulateSourceArchitectureDictionary() + public void AutoDetectArchitectureShouldPoulateSourceArchitectureDictionary() { this.mockAssemblyHelper.SetupSequence(ah => ah.GetArchitecture(It.IsAny())) .Returns(Architecture.AnyCPU).Returns(Architecture.X64).Returns(Architecture.X86); - inferHelper.TryGetAutoDetectCompatibleArchitecture(new List() { "AnyCPU1.dll", "x64.exe", "x86.dll" }, sourceArchitectures, out var inferredArchitecture); - Assert.AreEqual(Constants.DefaultPlatform, inferredArchitecture); + Assert.AreEqual(Constants.DefaultPlatform, inferHelper.AutoDetectArchitecture(new List() { "AnyCPU1.dll", "x64.exe", "x86.dll" }, sourceArchitectures)); Assert.AreEqual(3, sourceArchitectures.Count); Assert.AreEqual(Architecture.AnyCPU, sourceArchitectures["AnyCPU1.dll"]); Assert.AreEqual(Architecture.X64, sourceArchitectures["x64.exe"]); @@ -178,46 +142,40 @@ public void TryGetAutoDetectCompatibleArchitectureShouldPopulateSourceArchitectu } [TestMethod] - public void TryGetAutoDetectCompatibleArchitectureShouldReturnDefaultArchIfthereIsNotDotNetAssemblyInSources() + public void AutoDetectArchitectureShouldReturnDefaultArchIfthereIsNotDotNetAssemblyInSources() { this.mockAssemblyHelper.SetupSequence(ah => ah.GetArchitecture(It.IsAny())) .Returns(Architecture.AnyCPU); - - inferHelper.TryGetAutoDetectCompatibleArchitecture(new List() { "AnyCPU1.dll", "NotDotNetAssebly.appx" }, sourceArchitectures, out var inferredArchitecture); - Assert.AreEqual(Constants.DefaultPlatform, inferredArchitecture); + Assert.AreEqual(Constants.DefaultPlatform, inferHelper.AutoDetectArchitecture(new List() { "AnyCPU1.dll", "NotDotNetAssebly.appx" }, sourceArchitectures)); this.mockAssemblyHelper.Verify(ah => ah.GetArchitecture(It.IsAny()), Times.Exactly(1)); } [TestMethod] - public void TryGetAutoDetectCompatibleFrameworkShouldReturnDefaultFrameworkOnNullSources() + public void AutoDetectFrameworkShouldReturnDefaultFrameworkOnNullSources() { - inferHelper.TryGetAutoDetectCompatibleFramework(null, sourceFrameworks, out var inferredFramework); - Assert.AreEqual(defaultFramework, inferredFramework); + Assert.AreEqual(defaultFramework, inferHelper.AutoDetectFramework(null, sourceFrameworks)); } [TestMethod] - public void TryGetAutoDetectCompatibleFrameworkShouldReturnDefaultFrameworkOnEmptySources() + public void AutoDetectFrameworkShouldReturnDefaultFrameworkOnEmptySources() { - inferHelper.TryGetAutoDetectCompatibleFramework(new List(0), sourceFrameworks, out var inferredFramework); - Assert.AreEqual(defaultFramework, inferredFramework); + Assert.AreEqual(defaultFramework, inferHelper.AutoDetectFramework(new List(0), sourceFrameworks)); } [TestMethod] - public void TryGetAutoDetectCompatibleFrameworkShouldReturnDefaultFrameworkOnNullItemInSources() + public void AutoDetectFrameworkShouldReturnDefaultFrameworkOnNullItemInSources() { - inferHelper.TryGetAutoDetectCompatibleFramework(new List() { null }, sourceFrameworks, out var inferredFramework); - Assert.AreEqual(defaultFramework, inferredFramework); + Assert.AreEqual(defaultFramework, inferHelper.AutoDetectFramework(new List(){null}, sourceFrameworks)); } [TestMethod] - public void TryGetAutoDetectCompatibleFrameworkShouldReturnDefaultFrameworkOnEmptyItemInSources() + public void AutoDetectFrameworkShouldReturnDefaultFrameworkOnEmptyItemInSources() { - inferHelper.TryGetAutoDetectCompatibleFramework(new List() { string.Empty }, sourceFrameworks, out var inferredFramework); - Assert.AreEqual(defaultFramework.Name, inferredFramework.Name); + Assert.AreEqual(defaultFramework.Name, inferHelper.AutoDetectFramework(new List() { string.Empty }, sourceFrameworks).Name); } [TestMethod] - public void TryGetAutoDetectCompatibleFrameworkShouldReturnFrameworkCore10OnCore10Sources() + public void AutoDetectFrameworkShouldReturnFrameworkCore10OnCore10Sources() { var fx = frameworkCore10; var assemblyName = "netcoreapp.dll"; @@ -225,7 +183,7 @@ public void TryGetAutoDetectCompatibleFrameworkShouldReturnFrameworkCore10OnCore } [TestMethod] - public void TryGetAutoDetectCompatibleFrameworkShouldReturnFramework46On46Sources() + public void AutoDetectFrameworkShouldReturnFramework46On46Sources() { var fx = frameworkNet46; var assemblyName = "net46.dll"; @@ -233,7 +191,7 @@ public void TryGetAutoDetectCompatibleFrameworkShouldReturnFramework46On46Source } [TestMethod] - public void TryGetAutoDetectCompatibleFrameworkShouldReturnFrameworkUap10ForAppxFiles() + public void AutoDetectFrameworkShouldReturnFrameworkUap10ForAppxFiles() { var fx = Framework.FromString(Constants.DotNetFrameworkUap10); var assemblyName = "uwp10.appx"; @@ -241,7 +199,7 @@ public void TryGetAutoDetectCompatibleFrameworkShouldReturnFrameworkUap10ForAppx } [TestMethod] - public void TryGetAutoDetectCompatibleFrameworkShouldReturnFrameworkUap10ForAppxrecipeFiles() + public void AutoDetectFrameworkShouldReturnFrameworkUap10ForAppxrecipeFiles() { var fx = Framework.FromString(Constants.DotNetFrameworkUap10); var assemblyName = "uwp10.appxrecipe"; @@ -249,7 +207,7 @@ public void TryGetAutoDetectCompatibleFrameworkShouldReturnFrameworkUap10ForAppx } [TestMethod] - public void TryGetAutoDetectCompatibleFrameworkShouldReturnDefaultFullFrameworkForJsFiles() + public void AutoDetectFrameworkShouldReturnDefaultFullFrameworkForJsFiles() { var fx = Framework.FromString(Constants.DotNetFramework40); var assemblyName = "vstests.js"; @@ -257,28 +215,25 @@ public void TryGetAutoDetectCompatibleFrameworkShouldReturnDefaultFullFrameworkF } [TestMethod] - public void TryGetAutoDetectCompatibleFrameworkShouldReturnHighestVersionFxOnSameFxName() + public void AutoDetectFrameworkShouldReturnHighestVersionFxOnSameFxName() { this.mockAssemblyHelper.SetupSequence(sh => sh.GetFrameWork(It.IsAny())) .Returns(new FrameworkName(frameworkNet46.Name)) .Returns(new FrameworkName(frameworkNet47.Name)) .Returns(new FrameworkName(frameworkNet45.Name)); - - inferHelper.TryGetAutoDetectCompatibleFramework(new List() { "net46.dll", "net47.exe", "net45.dll" }, sourceFrameworks, out var inferredFramework); - Assert.AreEqual(frameworkNet47.Name, inferredFramework.Name); + Assert.AreEqual(frameworkNet47.Name, inferHelper.AutoDetectFramework(new List() { "net46.dll", "net47.exe", "net45.dll" }, sourceFrameworks).Name); this.mockAssemblyHelper.Verify(ah => ah.GetFrameWork(It.IsAny()),Times.Exactly(3)); } [TestMethod] - public void TryGetAutoDetectCompatibleFrameworkShouldPopulatetheDictionaryForAllTheSources() + public void AutoDetectFrameworkShouldPopulatetheDictionaryForAllTheSources() { this.mockAssemblyHelper.SetupSequence(sh => sh.GetFrameWork(It.IsAny())) .Returns(new FrameworkName(frameworkNet46.Name)) .Returns(new FrameworkName(frameworkNet47.Name)) .Returns(new FrameworkName(frameworkNet45.Name)); - inferHelper.TryGetAutoDetectCompatibleFramework(new List() { "net46.dll", "net47.exe", "net45.dll" }, sourceFrameworks, out var inferredFramework); - Assert.AreEqual(frameworkNet47.Name, inferredFramework.Name); + Assert.AreEqual(frameworkNet47.Name, inferHelper.AutoDetectFramework(new List() { "net46.dll", "net47.exe", "net45.dll" }, sourceFrameworks).Name); Assert.AreEqual(3, sourceFrameworks.Count); Assert.AreEqual(frameworkNet46.Name, sourceFrameworks["net46.dll"].Name); @@ -288,14 +243,13 @@ public void TryGetAutoDetectCompatibleFrameworkShouldPopulatetheDictionaryForAll } [TestMethod] - public void TryGetAutoDetectCompatibleFrameworkShouldReturnHighestVersionFxOnEvenManyLowerVersionFxNameExists() + public void AutoDetectFrameworkShouldReturnHighestVersionFxOnEvenManyLowerVersionFxNameExists() { this.mockAssemblyHelper.SetupSequence(sh => sh.GetFrameWork(It.IsAny())) .Returns(new FrameworkName(frameworkCore10.Name)) .Returns(new FrameworkName(frameworkCore11.Name)) .Returns(new FrameworkName(frameworkCore10.Name)); - inferHelper.TryGetAutoDetectCompatibleFramework(new List() { "netcore10_1.dll", "netcore11.dll", "netcore10_2.dll" }, sourceFrameworks, out var inferredFramework); - Assert.AreEqual(frameworkCore11.Name, inferredFramework.Name); + Assert.AreEqual(frameworkCore11.Name, inferHelper.AutoDetectFramework(new List() { "netcore10_1.dll", "netcore11.dll", "netcore10_2.dll" }, sourceFrameworks).Name); this.mockAssemblyHelper.Verify(ah => ah.GetFrameWork(It.IsAny()), Times.Exactly(3)); } @@ -303,8 +257,7 @@ private void SetupAndValidateForSingleAssembly(string assemblyName, Framework fx { this.mockAssemblyHelper.Setup(sh => sh.GetFrameWork(assemblyName)) .Returns(new FrameworkName(fx.Name)); - inferHelper.TryGetAutoDetectCompatibleFramework(new List() { assemblyName }, sourceFrameworks, out var inferredFramework); - Assert.AreEqual(fx.Name, inferredFramework.Name); + Assert.AreEqual(fx.Name, inferHelper.AutoDetectFramework(new List() { assemblyName }, sourceFrameworks).Name); if (verify) { this.mockAssemblyHelper.Verify(ah => ah.GetFrameWork(assemblyName)); diff --git a/test/vstest.console.UnitTests/TestPlatformHelpers/TestRequestManagerTests.cs b/test/vstest.console.UnitTests/TestPlatformHelpers/TestRequestManagerTests.cs index 701fd6fb4a..289aacff79 100644 --- a/test/vstest.console.UnitTests/TestPlatformHelpers/TestRequestManagerTests.cs +++ b/test/vstest.console.UnitTests/TestPlatformHelpers/TestRequestManagerTests.cs @@ -671,7 +671,7 @@ public void DiscoverTestsShouldNotUpdateFrameworkAndPlatformIfSpecifiedInDesignM $@" - {new FrameworkName(Framework.DefaultFramework.Name)} + {Constants.DotNetFramework46} {Architecture.ARM.ToString()} " @@ -680,7 +680,7 @@ public void DiscoverTestsShouldNotUpdateFrameworkAndPlatformIfSpecifiedInDesignM this.mockAssemblyMetadataProvider.Setup(a => a.GetArchitecture(It.IsAny())) .Returns(Architecture.X86); this.mockAssemblyMetadataProvider.Setup(a => a.GetFrameWork(It.IsAny())) - .Returns(new FrameworkName(Framework.DefaultFramework.Name)); + .Returns(new FrameworkName(Constants.DotNetFramework451)); DiscoveryCriteria actualDiscoveryCriteria = null; var mockDiscoveryRequest = new Mock(); this.mockTestPlatform.Setup(mt => mt.CreateDiscoveryRequest(It.IsAny(), It.IsAny(), It.IsAny())).Callback( @@ -694,7 +694,7 @@ public void DiscoverTestsShouldNotUpdateFrameworkAndPlatformIfSpecifiedInDesignM this.mockAssemblyMetadataProvider.Verify(a => a.GetArchitecture(It.IsAny()), Times.Never); this.mockAssemblyMetadataProvider.Verify(a => a.GetFrameWork(It.IsAny()), Times.Never); - Assert.IsTrue(actualDiscoveryCriteria.RunSettings.Contains(Framework.DefaultFramework.Name)); + Assert.IsTrue(actualDiscoveryCriteria.RunSettings.Contains(Constants.DotNetFramework46)); Assert.IsTrue(actualDiscoveryCriteria.RunSettings.Contains(Architecture.ARM.ToString())); } @@ -751,8 +751,7 @@ public void DiscoverTestsShouldNotUpdateFrameworkAndPlatformInCommandLineScenari this.mockAssemblyMetadataProvider.Setup(a => a.GetArchitecture(It.IsAny())) .Returns(Architecture.ARM); this.mockAssemblyMetadataProvider.Setup(a => a.GetFrameWork(It.IsAny())) - .Returns(new FrameworkName(Framework.DefaultFramework.Name)); - + .Returns(new FrameworkName(Constants.DotNetFramework46)); DiscoveryCriteria actualDiscoveryCriteria = null; var mockDiscoveryRequest = new Mock(); this.mockTestPlatform @@ -768,46 +767,10 @@ public void DiscoverTestsShouldNotUpdateFrameworkAndPlatformInCommandLineScenari this.mockAssemblyMetadataProvider.Verify(a => a.GetArchitecture(It.IsAny()), Times.Once); this.mockAssemblyMetadataProvider.Verify(a => a.GetFrameWork(It.IsAny()), Times.Once); - Assert.IsFalse(actualDiscoveryCriteria.RunSettings.Contains("")); + Assert.IsFalse(actualDiscoveryCriteria.RunSettings.Contains(Constants.DotNetFramework46)); Assert.IsFalse(actualDiscoveryCriteria.RunSettings.Contains(Architecture.ARM.ToString())); } - [TestMethod] - public void DiscoverTestsShouldThrowTestPlatformExceptionIfSourceAndTargetFrameworkRuntimesAreIncompatible() - { - var payload = new DiscoveryRequestPayload() - { - Sources = new List() { "a.dll" }, - RunSettings = - @" - - - - " - }; - this.commandLineOptions.TargetFrameworkVersion = Framework.FromString(Constants.DotNetFramework45); - this.mockAssemblyMetadataProvider.Setup(a => a.GetArchitecture(It.IsAny())) - .Returns(Architecture.X86); - - this.mockAssemblyMetadataProvider.Setup(a => a.GetFrameWork(It.IsAny())) - .Returns(new FrameworkName(Constants.DotNetFrameworkCore10)); - - DiscoveryCriteria actualDiscoveryCriteria = null; - var mockDiscoveryRequest = new Mock(); - this.mockTestPlatform - .Setup(mt => mt.CreateDiscoveryRequest(It.IsAny(), It.IsAny(), It.IsAny())) - .Callback( - (IRequestData requestData, DiscoveryCriteria discoveryCriteria, TestPlatformOptions options) => - { - actualDiscoveryCriteria = discoveryCriteria; - }).Returns(mockDiscoveryRequest.Object); - - var actualErrorMessage = Assert.ThrowsException(() => this.testRequestManager.DiscoverTests(payload, - new Mock().Object, this.protocolConfig)).Message; - - Assert.IsTrue(actualErrorMessage.Contains("Test Run Aborted.")); - } - [TestMethod] public void DiscoverTestsShouldPublishMetrics() { @@ -917,35 +880,6 @@ public void RunTestsShouldNotThrowForFramework35() mockTestPlatformEventSource.Verify(mt => mt.ExecutionRequestStop(), Times.Once); } - [TestMethod] - public void RunTestsShouldThrowTestPlatformExceptionIfSourceAndTargetFrameworksAreIncompatible() - { - var payload = new TestRunRequestPayload() - { - Sources = new List() { "a.dll" }, - RunSettings = - @" - - - Framework35 - - " - }; - - this.commandLineOptions.TargetFrameworkVersion = Framework.FromString(Constants.DotNetFramework45); - TestRunCriteria actualTestRunCriteria = null; - var mockDiscoveryRequest = new Mock(); - this.mockTestPlatform.Setup(mt => mt.CreateTestRunRequest(It.IsAny(), It.IsAny(), It.IsAny())).Callback( - (IRequestData requestData, TestRunCriteria runCriteria, TestPlatformOptions options) => - { - actualTestRunCriteria = runCriteria; - }).Returns(mockDiscoveryRequest.Object); - this.mockAssemblyMetadataProvider.Setup(a => a.GetFrameWork(It.IsAny())).Returns(new FrameworkName(Constants.DotNetFrameworkCore10)); - var actualErrorMessage = Assert.ThrowsException(() => this.testRequestManager.RunTests(payload, new Mock().Object, new Mock().Object, this.protocolConfig)).Message; - - Assert.IsTrue(actualErrorMessage.Contains("Test Run Aborted.")); - } - [TestMethod] public void RunTestsShouldPassSameProtocolConfigInRequestData() { @@ -1488,7 +1422,7 @@ public void RunTestsShouldNotUpdateFrameworkAndPlatformIfSpecifiedInDesignModeBu $@" - {Framework.DefaultFramework.Name} + {Constants.DotNetFramework46} {Architecture.ARM.ToString()} " @@ -1498,8 +1432,7 @@ public void RunTestsShouldNotUpdateFrameworkAndPlatformIfSpecifiedInDesignModeBu this.mockAssemblyMetadataProvider.Setup(a => a.GetArchitecture(It.IsAny())) .Returns(Architecture.X86); this.mockAssemblyMetadataProvider.Setup(a => a.GetFrameWork(It.IsAny())) - .Returns(new FrameworkName(Framework.DefaultFramework.Name)); - + .Returns(new FrameworkName(Constants.DotNetFramework451)); TestRunCriteria actualTestRunCriteria = null; var mockTestRunRequest = new Mock(); this.mockTestPlatform.Setup(mt => mt.CreateTestRunRequest(It.IsAny(), It.IsAny(), It.IsAny())).Callback( @@ -1513,7 +1446,7 @@ public void RunTestsShouldNotUpdateFrameworkAndPlatformIfSpecifiedInDesignModeBu this.mockAssemblyMetadataProvider.Verify(a => a.GetArchitecture(It.IsAny()), Times.Once); this.mockAssemblyMetadataProvider.Verify(a => a.GetFrameWork(It.IsAny()), Times.Once); - Assert.IsTrue(actualTestRunCriteria.TestRunSettings.Contains(Framework.DefaultFramework.Name)); + Assert.IsTrue(actualTestRunCriteria.TestRunSettings.Contains(Constants.DotNetFramework46)); Assert.IsTrue(actualTestRunCriteria.TestRunSettings.Contains(Architecture.ARM.ToString())); } @@ -1613,7 +1546,7 @@ public void RunTestsShouldNotpdateFrameworkAndPlatformInCommandLineScenariosIfSp this.mockAssemblyMetadataProvider.Setup(a => a.GetArchitecture(It.IsAny())) .Returns(Architecture.ARM); this.mockAssemblyMetadataProvider.Setup(a => a.GetFrameWork(It.IsAny())) - .Returns(new FrameworkName(Framework.DefaultFramework.Name)); + .Returns(new FrameworkName(Constants.DotNetFramework46)); TestRunCriteria actualTestRunCriteria = null; var mockTestRunRequest = new Mock(); this.mockTestPlatform.Setup(mt => mt.CreateTestRunRequest(It.IsAny(), It.IsAny(), It.IsAny())).Callback( @@ -1627,7 +1560,7 @@ public void RunTestsShouldNotpdateFrameworkAndPlatformInCommandLineScenariosIfSp this.mockAssemblyMetadataProvider.Verify(a => a.GetArchitecture(It.IsAny()), Times.Once); this.mockAssemblyMetadataProvider.Verify(a => a.GetFrameWork(It.IsAny()), Times.Once); - Assert.IsFalse(actualTestRunCriteria.TestRunSettings.Contains("")); + Assert.IsFalse(actualTestRunCriteria.TestRunSettings.Contains(Constants.DotNetFramework46)); Assert.IsFalse(actualTestRunCriteria.TestRunSettings.Contains(Architecture.ARM.ToString())); }