diff --git a/Directory.Packages.props b/Directory.Packages.props index 05ded62687..639f668e92 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -22,8 +22,8 @@ 6.2.14 - 18.0.0 - 1.55.0 + 18.0.1 + 1.56.0 18.1.1 1.5.0-preview.24577.4 4.5.4 diff --git a/docs/Changelog-Platform.md b/docs/Changelog-Platform.md index 3be0df25cd..57f38cab39 100644 --- a/docs/Changelog-Platform.md +++ b/docs/Changelog-Platform.md @@ -4,6 +4,26 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) +## [2.0.2] - 2025-11-11 + +See full log [of v4.0.1...v4.0.2](https://github.com/microsoft/testfx/compare/v4.0.1...v4.0.2) + +* No change, released to keep version aligned with MSTest. + +### Artifacts + +* Microsoft.Testing.Platform: [2.0.2](https://www.nuget.org/packages/Microsoft.Testing.Platform/2.0.2) +* Microsoft.Testing.Platform.MSBuild: [2.0.2](https://www.nuget.org/packages/Microsoft.Testing.Platform.MSBuild/2.0.2) +* Microsoft.Testing.Extensions.CrashDump: [2.0.2](https://www.nuget.org/packages/Microsoft.Testing.Extensions.CrashDump/2.0.2) +* Microsoft.Testing.Extensions.HangDump: [2.0.2](https://www.nuget.org/packages/Microsoft.Testing.Extensions.HangDump/2.0.2) +* Microsoft.Testing.Extensions.HotReload: [2.0.2](https://www.nuget.org/packages/Microsoft.Testing.Extensions.HotReload/2.0.2) +* Microsoft.Testing.Extensions.Retry: [2.0.2](https://www.nuget.org/packages/Microsoft.Testing.Extensions.Retry/2.0.2) +* Microsoft.Testing.Extensions.Telemetry: [2.0.2](https://www.nuget.org/packages/Microsoft.Testing.Extensions.Telemetry/2.0.2) +* Microsoft.Testing.Extensions.TrxReport: [2.0.2](https://www.nuget.org/packages/Microsoft.Testing.Extensions.TrxReport/2.0.2) +* Microsoft.Testing.Extensions.TrxReport.Abstractions: [2.0.2](https://www.nuget.org/packages/Microsoft.Testing.Extensions.TrxReport.Abstractions/2.0.2) +* Microsoft.Testing.Extensions.VSTestBridge: [2.0.2](https://www.nuget.org/packages/Microsoft.Testing.Extensions.VSTestBridge/2.0.2) +* Microsoft.Testing.Extensions.AzureDevOpsReport [2.0.2](https://www.nuget.org/packages/Microsoft.Testing.Extensions.AzureDevOpsReport/2.0.2) + ## [2.0.1] - 2025-10-14 See full log [of v4.0.0...v4.0.1](https://github.com/microsoft/testfx/compare/v4.0.0...v4.0.1) @@ -48,6 +68,26 @@ See full log [of v3.11.0...v4.0.0](https://github.com/microsoft/testfx/compare/v * Microsoft.Testing.Extensions.VSTestBridge: [2.0.0](https://www.nuget.org/packages/Microsoft.Testing.Extensions.VSTestBridge/2.0.0) * Microsoft.Testing.Extensions.AzureDevOpsReport [2.0.0](https://www.nuget.org/packages/Microsoft.Testing.Extensions.AzureDevOpsReport/2.0.0) +## [1.9.1] - 2025-11-11 + +See full log [of v4.0.1...v4.0.2](https://github.com/microsoft/testfx/compare/v4.0.1...v4.0.2) + +* No change, released to keep version aligned with MSTest. + +### Artifacts + +* Microsoft.Testing.Platform: [1.9.1](https://www.nuget.org/packages/Microsoft.Testing.Platform/1.9.1) +* Microsoft.Testing.Platform.MSBuild: [1.9.1](https://www.nuget.org/packages/Microsoft.Testing.Platform.MSBuild/1.9.1) +* Microsoft.Testing.Extensions.CrashDump: [1.9.1](https://www.nuget.org/packages/Microsoft.Testing.Extensions.CrashDump/1.9.1) +* Microsoft.Testing.Extensions.HangDump: [1.9.1](https://www.nuget.org/packages/Microsoft.Testing.Extensions.HangDump/1.9.1) +* Microsoft.Testing.Extensions.HotReload: [1.9.1](https://www.nuget.org/packages/Microsoft.Testing.Extensions.HotReload/1.9.1) +* Microsoft.Testing.Extensions.Retry: [1.9.1](https://www.nuget.org/packages/Microsoft.Testing.Extensions.Retry/1.9.1) +* Microsoft.Testing.Extensions.Telemetry: [1.9.1](https://www.nuget.org/packages/Microsoft.Testing.Extensions.Telemetry/1.9.1) +* Microsoft.Testing.Extensions.TrxReport: [1.9.1](https://www.nuget.org/packages/Microsoft.Testing.Extensions.TrxReport/1.9.1) +* Microsoft.Testing.Extensions.TrxReport.Abstractions: [1.9.1](https://www.nuget.org/packages/Microsoft.Testing.Extensions.TrxReport.Abstractions/1.9.1) +* Microsoft.Testing.Extensions.VSTestBridge: [1.9.1](https://www.nuget.org/packages/Microsoft.Testing.Extensions.VSTestBridge/1.9.1) +* Microsoft.Testing.Extensions.AzureDevOpsReport [1.9.1](https://www.nuget.org/packages/Microsoft.Testing.Extensions.AzureDevOpsReport/1.9.1) + ## [1.9.0] - 2025-10-01 See full log [of v3.10.5...v3.11.0](https://github.com/microsoft/testfx/compare/v3.10.5...v3.11.0) diff --git a/docs/Changelog.md b/docs/Changelog.md index 3839cca51b..6cb93482f4 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -4,6 +4,29 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) +## [4.0.2] - 2025-11-11 + +See full log [of v4.0.1...v4.0.2](https://github.com/microsoft/testfx/compare/v4.0.1...v4.0.2) + +### Fixed + +* Fix DisableAppDomain default value when not running in isolation under VSTest by @Copilot in [#6909](https://github.com/microsoft/testfx/pull/6909) +* Update Microsoft.NET.Test.Sdk version to 18.0.1 by @nohwnd in [#6924](https://github.com/microsoft/testfx/pull/6924) + +### Housekeeping + +* Update Microsoft.Build.Utilities.Core to 17.11.48 by @Youssef1313 in [#6846](https://github.com/microsoft/testfx/pull/6846) + +### Artifacts + +* MSTest: [4.0.2](https://www.nuget.org/packages/MSTest/4.0.2) +* MSTest.TestFramework: [4.0.2](https://www.nuget.org/packages/MSTest.TestFramework/4.0.2) +* MSTest.TestAdapter: [4.0.2](https://www.nuget.org/packages/MSTest.TestAdapter/4.0.2) +* MSTest.Analyzers: [4.0.2](https://www.nuget.org/packages/MSTest.Analyzers/4.0.2) +* MSTest.Sdk: [4.0.2](https://www.nuget.org/packages/MSTest.Sdk/4.0.2) +* MSTest.SourceGeneration: [2.0.0-alpha.25561.4](https://www.nuget.org/packages/MSTest.SourceGeneration/2.0.0-alpha.25561.4) +* MSTest.Engine: [2.0.0-alpha.25561.4](https://www.nuget.org/packages/MSTest.Engine/2.0.0-alpha.25561.4) + ## [4.0.1] - 2025-10-14 See full log [of v4.0.0...v4.0.1](https://github.com/microsoft/testfx/compare/v4.0.0...v4.0.1) @@ -45,6 +68,28 @@ See full log [of v3.11.0...v4.0.0](https://github.com/microsoft/testfx/compare/v * MSTest.SourceGeneration: [2.0.0-alpha.25507.7](https://www.nuget.org/packages/MSTest.SourceGeneration/2.0.0-alpha.25507.7) * MSTest.Engine: [2.0.0-alpha.25507.7](https://www.nuget.org/packages/MSTest.Engine/2.0.0-alpha.25507.7) +## [3.11.1] - 2025-11-11 + +See full log [of v3.11.0...v3.11.1](https://github.com/microsoft/testfx/compare/v3.11.0...v3.11.1) + +### Fixed + +* Fix deployment regression by @Youssef1313 in [#6904](https://github.com/microsoft/testfx/pull/6904) + +### Housekeeping + +* Update Microsoft.Build.Utilities.Core to 17.11.48 by @Youssef1313 in [#6847](https://github.com/microsoft/testfx/pull/6847) + +### Artifacts + +* MSTest: [3.11.1](https://www.nuget.org/packages/MSTest/3.11.1) +* MSTest.TestFramework: [3.11.1](https://www.nuget.org/packages/MSTest.TestFramework/3.11.1) +* MSTest.TestAdapter: [3.11.1](https://www.nuget.org/packages/MSTest.TestAdapter/3.11.1) +* MSTest.Analyzers: [3.11.1](https://www.nuget.org/packages/MSTest.Analyzers/3.11.1) +* MSTest.Sdk: [3.11.1](https://www.nuget.org/packages/MSTest.Sdk/3.11.1) +* MSTest.SourceGeneration: [1.0.0-alpha.25561.5](https://www.nuget.org/packages/MSTest.SourceGeneration/1.0.0-alpha.25561.5) +* MSTest.Engine: [1.0.0-alpha.25561.5](https://www.nuget.org/packages/MSTest.Engine/1.0.0-alpha.25561.5) + ## [3.11.0] - 2025-10-01 See full log [of v3.10.5...v3.11.0](https://github.com/microsoft/testfx/compare/v3.10.5...v3.11.0) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 70cf59b7ed..7d6d02a4a6 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,29 +1,29 @@ - + https://github.com/dotnet/arcade - 7d717a49d570577936361c14de38bf61271aa274 + 3a7f017be1c42a4ecc516446977cf55d429cf390 - + https://github.com/dotnet/arcade - 7d717a49d570577936361c14de38bf61271aa274 + 3a7f017be1c42a4ecc516446977cf55d429cf390 - + https://github.com/dotnet/arcade - 7d717a49d570577936361c14de38bf61271aa274 + 3a7f017be1c42a4ecc516446977cf55d429cf390 https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage b3ec110c7b23b6f726c516763f6810e74be7b192 - + https://github.com/microsoft/testfx - 7df896aeec9505a44371dbe0dd2712764d0ce0f6 + 29aa788ac17beff2313e392de6c484f585b4f59b - + https://github.com/microsoft/testfx - 7df896aeec9505a44371dbe0dd2712764d0ce0f6 + 29aa788ac17beff2313e392de6c484f585b4f59b diff --git a/eng/Versions.props b/eng/Versions.props index a99b2c2822..9329d1bad7 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -7,10 +7,10 @@ preview - 11.0.0-beta.25557.2 + 11.0.0-beta.25560.1 18.1.0-preview.25507.2 - 4.1.0-preview.25558.6 - 2.1.0-preview.25558.6 + 4.1.0-preview.25559.1 + 2.1.0-preview.25559.1 diff --git a/global.json b/global.json index aec92dc2bb..b74ede60a2 100644 --- a/global.json +++ b/global.json @@ -39,7 +39,7 @@ "runner": "Microsoft.Testing.Platform" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.25557.2", + "Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.25560.1", "MSBuild.Sdk.Extras": "3.0.44" } } diff --git a/samples/public/Directory.Build.props b/samples/public/Directory.Build.props index 9cda6ad52f..de64c982f5 100644 --- a/samples/public/Directory.Build.props +++ b/samples/public/Directory.Build.props @@ -3,10 +3,10 @@ 9.5.1 18.1.0 - 4.0.1 - 2.0.0-alpha.25514.6 - 1.55.0 - 2.0.1 + 4.0.2 + 2.0.0-alpha.25561.4 + 1.56.0 + 2.0.2 18.0.0 false $(NoWarn);SA0001;EnableGenerateDocumentationFile diff --git a/samples/public/global.json b/samples/public/global.json index 228b700818..ab49e414dc 100644 --- a/samples/public/global.json +++ b/samples/public/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "MSTest.Sdk": "4.0.0" + "MSTest.Sdk": "4.0.2" } } diff --git a/src/Adapter/MSTestAdapter.PlatformServices/Services/MSTestAdapterSettings.cs b/src/Adapter/MSTestAdapter.PlatformServices/Services/MSTestAdapterSettings.cs index a9c9bf0192..4e2a109300 100644 --- a/src/Adapter/MSTestAdapter.PlatformServices/Services/MSTestAdapterSettings.cs +++ b/src/Adapter/MSTestAdapter.PlatformServices/Services/MSTestAdapterSettings.cs @@ -189,9 +189,11 @@ public static bool IsAppDomainCreationDisabled(string? settingsXml) bool disableAppDomain = true; // HACK: When running VSTest, and VSTest didn't create TestHostAppDomain (default behavior), we must be enabling appdomain in MSTest. // Otherwise, we will not merge app.config properly, nor we will have correct BaseDirectory of current domain. + // This detects if we run in testhost.*.exe or in vstest.console.exe.This covers all: running with vstest.console.exe because there we can run in both modes, running with dotnet test or VS, because there we can run only in testhost(in isolation). #if NETFRAMEWORK if (AppDomain.CurrentDomain.Id == 1 && - AppDomain.CurrentDomain.FriendlyName.StartsWith("testhost.", StringComparison.Ordinal) && + (AppDomain.CurrentDomain.FriendlyName.StartsWith("testhost.", StringComparison.Ordinal) || + AppDomain.CurrentDomain.FriendlyName.StartsWith("vstest.console.", StringComparison.Ordinal)) && AppDomain.CurrentDomain.FriendlyName.EndsWith(".exe", StringComparison.Ordinal)) { disableAppDomain = false; diff --git a/src/Analyzers/MSTest.Analyzers/xlf/Resources.cs.xlf b/src/Analyzers/MSTest.Analyzers/xlf/Resources.cs.xlf index b7b156acca..a416844e86 100644 --- a/src/Analyzers/MSTest.Analyzers/xlf/Resources.cs.xlf +++ b/src/Analyzers/MSTest.Analyzers/xlf/Resources.cs.xlf @@ -991,17 +991,17 @@ Typ deklarující tyto metody by měl také respektovat následující pravidla: Do not use asserts in catch blocks - Do not use asserts in catch blocks + Nepoužívat kontrolní výrazy v blocích catch Do not use asserts in catch blocks because they may not fail the test if no exception is thrown - Do not use asserts in catch blocks because they may not fail the test if no exception is thrown + Nepoužívejte kontrolní výrazy v blocích catch, protože test nemusí selhat, pokud není vyvolána žádná výjimka. Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. - Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. + Používání kontrolních výrazů v blocích catch je problematické, protože test projde, i když se nevyvolá žádná výjimka a blok catch se nikdy nespustí. K ověření, že je vyvolána výjimka, použijte metody Assert.Throws, Assert.ThrowsExactly, Assert.ThrowsAsync nebo Assert.ThrowsExactlyAsync a poté proveďte další kontrolní výrazy nad zachycenou výjimkou bez použití bloku try-catch. diff --git a/src/Analyzers/MSTest.Analyzers/xlf/Resources.de.xlf b/src/Analyzers/MSTest.Analyzers/xlf/Resources.de.xlf index 5a331eb3c6..e19ae35063 100644 --- a/src/Analyzers/MSTest.Analyzers/xlf/Resources.de.xlf +++ b/src/Analyzers/MSTest.Analyzers/xlf/Resources.de.xlf @@ -992,17 +992,17 @@ Der Typ, der diese Methoden deklariert, sollte auch die folgenden Regeln beachte Do not use asserts in catch blocks - Do not use asserts in catch blocks + Keine Asserts in Catch-Blöcken verwenden Do not use asserts in catch blocks because they may not fail the test if no exception is thrown - Do not use asserts in catch blocks because they may not fail the test if no exception is thrown + Keine Asserts in Catch-Blöcken verwenden, da der Test möglicherweise nicht fehlschlägt, wenn keine Ausnahme ausgelöst wird Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. - Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. + Die Verwendung von Asserts in Catch-Blöcken ist problematisch, da der Test auch dann erfolgreich ist, wenn keine Ausnahme ausgelöst wird und der Catch-Block nie ausgeführt wird. Verwenden Sie „Assert.Throws“, „Assert.ThrowsExactly“, „Assert.ThrowsAsync“ oder „Assert.ThrowsExactlyAsync“, um zu überprüfen, ob eine Ausnahme ausgelöst wird, und erstellen Sie dann zusätzliche Assertionen für die abgefangene Ausnahme, ohne den „try-catch“-Block zu verwenden. diff --git a/src/Analyzers/MSTest.Analyzers/xlf/Resources.es.xlf b/src/Analyzers/MSTest.Analyzers/xlf/Resources.es.xlf index b5ad5d9582..34fe594c45 100644 --- a/src/Analyzers/MSTest.Analyzers/xlf/Resources.es.xlf +++ b/src/Analyzers/MSTest.Analyzers/xlf/Resources.es.xlf @@ -991,17 +991,17 @@ El tipo que declara estos métodos también debe respetar las reglas siguientes: Do not use asserts in catch blocks - Do not use asserts in catch blocks + No use aserciones en bloques catch Do not use asserts in catch blocks because they may not fail the test if no exception is thrown - Do not use asserts in catch blocks because they may not fail the test if no exception is thrown + No use aserciones en bloques catch porque es posible que no produzcan un error en la prueba si no se produce ninguna excepción Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. - Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. + El uso de aserciones en bloques catch es problemático porque la prueba se superará incluso aunque no se produzca ninguna excepción y el bloque catch nunca se ejecuta. Use "Assert.Throws", "Assert.ThrowsExactly", "Assert.ThrowsAsync" o "Assert.ThrowsExactlyAsync" para comprobar que se produzca una excepción y, a continuación, realice aserciones adicionales en la excepción detectada sin usar el bloque try-catch. diff --git a/src/Analyzers/MSTest.Analyzers/xlf/Resources.fr.xlf b/src/Analyzers/MSTest.Analyzers/xlf/Resources.fr.xlf index bf6b4b71e9..5df8892560 100644 --- a/src/Analyzers/MSTest.Analyzers/xlf/Resources.fr.xlf +++ b/src/Analyzers/MSTest.Analyzers/xlf/Resources.fr.xlf @@ -991,17 +991,17 @@ Le type doit être une classe Do not use asserts in catch blocks - Do not use asserts in catch blocks + N’utilisez pas d’assertions dans les blocs catch Do not use asserts in catch blocks because they may not fail the test if no exception is thrown - Do not use asserts in catch blocks because they may not fail the test if no exception is thrown + N’utilisez pas d’assertions dans les blocs catch, car elles peuvent ne pas faire échouer le test si aucune exception n’est levée Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. - Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. + L’utilisation d’assertions dans les blocs catch pose problème, car le test réussit même si aucune exception n’est levée et que le bloc catch n’est jamais exécuté. Utilisez « Assert.Throws », « Assert.ThrowsExactly », « Assert.ThrowsAsync » ou « Assert.ThrowsExactlyAsync » pour vérifier qu’une exception est levée, puis effectuez des assertions supplémentaires sur l’exception capturée sans utiliser le bloc try-catch. diff --git a/src/Analyzers/MSTest.Analyzers/xlf/Resources.it.xlf b/src/Analyzers/MSTest.Analyzers/xlf/Resources.it.xlf index 98b9f2dc46..e536fc735f 100644 --- a/src/Analyzers/MSTest.Analyzers/xlf/Resources.it.xlf +++ b/src/Analyzers/MSTest.Analyzers/xlf/Resources.it.xlf @@ -991,17 +991,17 @@ Anche il tipo che dichiara questi metodi deve rispettare le regole seguenti: Do not use asserts in catch blocks - Do not use asserts in catch blocks + Non usare asserzioni nei blocchi catch Do not use asserts in catch blocks because they may not fail the test if no exception is thrown - Do not use asserts in catch blocks because they may not fail the test if no exception is thrown + Non usare asserzioni nei blocchi catch perché potrebbero non far fallire il test se non viene generata alcuna eccezione Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. - Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. + L'uso di asserzioni nei blocchi catch è problematico perché il test risulta superato anche se non viene generata alcuna eccezione e il blocco catch non viene mai eseguito. Utilizzare 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' o 'Assert.ThrowsExactlyAsync' per verificare che venga generata un'eccezione, quindi effettuare ulteriori asserzioni sull'eccezione rilevata senza usare il blocco try-catch. diff --git a/src/Analyzers/MSTest.Analyzers/xlf/Resources.ja.xlf b/src/Analyzers/MSTest.Analyzers/xlf/Resources.ja.xlf index 143099764f..8e3595e788 100644 --- a/src/Analyzers/MSTest.Analyzers/xlf/Resources.ja.xlf +++ b/src/Analyzers/MSTest.Analyzers/xlf/Resources.ja.xlf @@ -991,17 +991,17 @@ The type declaring these methods should also respect the following rules: Do not use asserts in catch blocks - Do not use asserts in catch blocks + catch ブロックでアサートを使用しないでください Do not use asserts in catch blocks because they may not fail the test if no exception is thrown - Do not use asserts in catch blocks because they may not fail the test if no exception is thrown + 例外がスローされない場合、テストに失敗しない可能性があるため、catch ブロックでアサートを使用しないでください Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. - Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. + catch ブロックでアサートを使用すると、例外がスローされず、catch ブロックが実行されなくてもテストが成功するため、問題があります。'Assert.Throws'、'Assert.ThrowsExactly'、'Assert.ThrowsAsync'、または 'Assert.ThrowsExactlyAsync' を使用して例外がスローされたことを確認し、try-catch ブロックを使用せずにキャッチされた例外に対して追加のアサートを実行します。 diff --git a/src/Analyzers/MSTest.Analyzers/xlf/Resources.ko.xlf b/src/Analyzers/MSTest.Analyzers/xlf/Resources.ko.xlf index ba20940467..dfd7749d6f 100644 --- a/src/Analyzers/MSTest.Analyzers/xlf/Resources.ko.xlf +++ b/src/Analyzers/MSTest.Analyzers/xlf/Resources.ko.xlf @@ -991,17 +991,17 @@ The type declaring these methods should also respect the following rules: Do not use asserts in catch blocks - Do not use asserts in catch blocks + catch 블록에서 어설션 사용 안 함 Do not use asserts in catch blocks because they may not fail the test if no exception is thrown - Do not use asserts in catch blocks because they may not fail the test if no exception is thrown + 예외가 발생하지 않으면 테스트가 실패하지 않을 수 있으니 catch 블록에서 어설션을 사용하지 마세요. Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. - Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. + 예외가 발생하지 않고 catch 블록이 실행되지 않더라도 테스트가 통과하기 때문에 catch 블록에서 어설션을 사용하는 것은 문제가 됩니다. 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' 또는 'Assert.ThrowsExactlyAsync'를 사용하여 예외가 발생했는지 확인한 다음 try-catch 블록을 사용하지 않고 catch된 예외에 대해 추가 어설션을 만듭니다. diff --git a/src/Analyzers/MSTest.Analyzers/xlf/Resources.pl.xlf b/src/Analyzers/MSTest.Analyzers/xlf/Resources.pl.xlf index 0cddbbe3a1..5351c55de2 100644 --- a/src/Analyzers/MSTest.Analyzers/xlf/Resources.pl.xlf +++ b/src/Analyzers/MSTest.Analyzers/xlf/Resources.pl.xlf @@ -991,17 +991,17 @@ Typ deklarujący te metody powinien również przestrzegać następujących regu Do not use asserts in catch blocks - Do not use asserts in catch blocks + Nie używaj asercji w blokach catch Do not use asserts in catch blocks because they may not fail the test if no exception is thrown - Do not use asserts in catch blocks because they may not fail the test if no exception is thrown + Nie używaj asercji w blokach catch, ponieważ test może nie zakończyć się niepowodzeniem, jeśli nie zostanie zgłoszony żaden wyjątek Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. - Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. + Używanie asercji w blokach catch jest problematyczne, ponieważ test zakończy się powodzeniem, nawet jeśli nie zostanie zgłoszony żaden wyjątek i blok catch nigdy nie zostanie wykonany. Użyj instrukcji „Assert.Throws”, „Assert.ThrowsExactly”, „Assert.ThrowsAsync” lub „Assert.ThrowsExactlyAsync”, aby sprawdzić, czy zgłoszono wyjątek, a następnie wykonaj dodatkowe asercje dla przechwyconego wyjątku bez użycia bloku try-catch. diff --git a/src/Analyzers/MSTest.Analyzers/xlf/Resources.pt-BR.xlf b/src/Analyzers/MSTest.Analyzers/xlf/Resources.pt-BR.xlf index 455d4571c1..3836015abc 100644 --- a/src/Analyzers/MSTest.Analyzers/xlf/Resources.pt-BR.xlf +++ b/src/Analyzers/MSTest.Analyzers/xlf/Resources.pt-BR.xlf @@ -991,17 +991,17 @@ O tipo que declara esses métodos também deve respeitar as seguintes regras: Do not use asserts in catch blocks - Do not use asserts in catch blocks + Não usar assertivas em blocos catch Do not use asserts in catch blocks because they may not fail the test if no exception is thrown - Do not use asserts in catch blocks because they may not fail the test if no exception is thrown + Não use assertivas em blocos catch porque elas podem não falhar no teste se nenhuma exceção for lançada Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. - Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. + Usar assertivas em blocos catch é problemático porque o teste será aprovado mesmo que nenhuma exceção seja lançada e o bloco catch nunca seja executado. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' ou 'Assert.ThrowsExactlyAsync' para verificar se uma exceção foi lançada e, em seguida, faça asserções adicionais sobre a exceção capturada sem usar o bloco try-catch. diff --git a/src/Analyzers/MSTest.Analyzers/xlf/Resources.ru.xlf b/src/Analyzers/MSTest.Analyzers/xlf/Resources.ru.xlf index fdb2b4f9bb..a946b4772d 100644 --- a/src/Analyzers/MSTest.Analyzers/xlf/Resources.ru.xlf +++ b/src/Analyzers/MSTest.Analyzers/xlf/Resources.ru.xlf @@ -1003,17 +1003,17 @@ The type declaring these methods should also respect the following rules: Do not use asserts in catch blocks - Do not use asserts in catch blocks + Не используйте утверждения в блоках catch Do not use asserts in catch blocks because they may not fail the test if no exception is thrown - Do not use asserts in catch blocks because they may not fail the test if no exception is thrown + Не используйте утверждения в блоках catch, так как с ними тест может не завершаться сбоем, если не возникает исключение Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. - Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. + Использование утверждений в блоках catch является проблематичным, так как тест будет пройден, даже если не возникает исключение, а блок catch не выполняется. Используйте "Assert.Throws", "Assert.ThrowsExactly", "Assert.ThrowsAsync" или "Assert.ThrowsExactlyAsync" для проверки возникновения исключения, а затем выполните дополнительные утверждения перехваченного исключения без применения блока try-catch. diff --git a/src/Analyzers/MSTest.Analyzers/xlf/Resources.tr.xlf b/src/Analyzers/MSTest.Analyzers/xlf/Resources.tr.xlf index 8b5b8691a7..1042c81aea 100644 --- a/src/Analyzers/MSTest.Analyzers/xlf/Resources.tr.xlf +++ b/src/Analyzers/MSTest.Analyzers/xlf/Resources.tr.xlf @@ -993,17 +993,17 @@ Bu yöntemleri bildiren tipin ayrıca aşağıdaki kurallara uyması gerekir: Do not use asserts in catch blocks - Do not use asserts in catch blocks + Catch bloklarında assert kullanmayın Do not use asserts in catch blocks because they may not fail the test if no exception is thrown - Do not use asserts in catch blocks because they may not fail the test if no exception is thrown + Catch bloklarında assert kullanmayın, çünkü özel durum atılmadığında test başarısız olmayabilir Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. - Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. + Catch bloklarında assert kullanmak sorunludur, çünkü özel durum atılmasa ve catch bloğu hiç çalıştırılmasa bile test geçecektir. Bir özel durumun atıldığını doğrulamak için ‘Assert.Throws’, ‘Assert.ThrowsExactly’, ‘Assert.ThrowsAsync’ veya ‘Assert.ThrowsExactlyAsync’ kullanın ve ardından try-catch bloğu kullanmadan yakalanan özel durum üzerinde ek doğrulamalar yapın. diff --git a/src/Analyzers/MSTest.Analyzers/xlf/Resources.zh-Hans.xlf b/src/Analyzers/MSTest.Analyzers/xlf/Resources.zh-Hans.xlf index 2bea1eda8d..07a93414ca 100644 --- a/src/Analyzers/MSTest.Analyzers/xlf/Resources.zh-Hans.xlf +++ b/src/Analyzers/MSTest.Analyzers/xlf/Resources.zh-Hans.xlf @@ -991,17 +991,17 @@ The type declaring these methods should also respect the following rules: Do not use asserts in catch blocks - Do not use asserts in catch blocks + 不要在 catch 块中使用断言 Do not use asserts in catch blocks because they may not fail the test if no exception is thrown - Do not use asserts in catch blocks because they may not fail the test if no exception is thrown + 不要在 catch 块中使用断言,因为如果没有引发异常,断言可能不会导致测试失败 Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. - Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. + 在 catch 块中使用断言是有问题的,因为即使没有引发异常且 catch 块从未执行,测试也会通过。请使用 "Assert.Throws"、"Assert.ThrowsExactly"、"Assert.ThrowsAsync" 或 "Assert.ThrowsExactlyAsync" 来验证是否引发了异常,然后对捕获的异常进行额外断言,而无需使用 try-catch 块。 diff --git a/src/Analyzers/MSTest.Analyzers/xlf/Resources.zh-Hant.xlf b/src/Analyzers/MSTest.Analyzers/xlf/Resources.zh-Hant.xlf index 088053f50b..82434bb956 100644 --- a/src/Analyzers/MSTest.Analyzers/xlf/Resources.zh-Hant.xlf +++ b/src/Analyzers/MSTest.Analyzers/xlf/Resources.zh-Hant.xlf @@ -991,17 +991,17 @@ The type declaring these methods should also respect the following rules: Do not use asserts in catch blocks - Do not use asserts in catch blocks + 不要在 Catch 區塊中使用判斷提示 Do not use asserts in catch blocks because they may not fail the test if no exception is thrown - Do not use asserts in catch blocks because they may not fail the test if no exception is thrown + 請勿在 Catch 區塊中使用判斷提示,因為如果沒有拋出例外,判斷提示可能不會測試失敗 Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. - Using asserts in catch blocks is problematic because the test will pass even if no exception is thrown and the catch block is never executed. Use 'Assert.Throws', 'Assert.ThrowsExactly', 'Assert.ThrowsAsync' or 'Assert.ThrowsExactlyAsync' to verify that an exception is thrown, and then make additional assertions on the caught exception without using the try-catch block. + 在 Catch 區塊中使用斷言會有問題,因為即使沒有拋出例外且 Catch 區塊從未執行,測試仍會通過。請使用 'Assert.Throws'、'Assert.ThrowsExactly'、'Assert.ThrowsAsync' 或 'Assert.ThrowsExactlyAsync' 來驗證是否有拋出例外,然後在不使用 try-catch 區塊的情況下,對捕捉到的例外進行進一步判斷提示。 diff --git a/src/Platform/Microsoft.Testing.Extensions.Retry/RetryOrchestrator.cs b/src/Platform/Microsoft.Testing.Extensions.Retry/RetryOrchestrator.cs index a1c54583bb..668f0b4cb7 100644 --- a/src/Platform/Microsoft.Testing.Extensions.Retry/RetryOrchestrator.cs +++ b/src/Platform/Microsoft.Testing.Extensions.Retry/RetryOrchestrator.cs @@ -214,7 +214,7 @@ public async Task OrchestrateTestHostExecutionAsync(CancellationToken cance #if NETCOREAPP await retryFailedTestsPipeServer.WaitForConnectionAsync(linkedToken2.Token).ConfigureAwait(false); #else - // We don't know why but if the cancellation is called quickly in line 171 for netfx we stuck sometime here, like if + // We don't know why but if the cancellation is called quickly in `testHostProcess.Exited`: `processExitedCancellationToken.Cancel();` for netfx we stuck sometime here, like if // the token we pass to the named pipe is not "correctly" verified inside the pipe implementation self. // We fallback with our custom agnostic cancellation mechanism in that case. // We see it happen only in .NET FX and not in .NET Core so for now we don't do it for core. diff --git a/src/Platform/Microsoft.Testing.Platform/IPC/NamedPipeServer.cs b/src/Platform/Microsoft.Testing.Platform/IPC/NamedPipeServer.cs index 3cd3559467..9552011de3 100644 --- a/src/Platform/Microsoft.Testing.Platform/IPC/NamedPipeServer.cs +++ b/src/Platform/Microsoft.Testing.Platform/IPC/NamedPipeServer.cs @@ -309,7 +309,7 @@ public void Dispose() // This is unexpected and we throw an exception. ApplicationStateGuard.Ensure(_loopTask is not null); - // To close gracefully we need to ensure that the client closed the stream line 103. + // To close gracefully we need to ensure that the client closed the stream in the InternalLoopAsync method (there is comment `// The client has disconnected`). if (!_loopTask.Wait(TimeoutHelper.DefaultHangTimeSpanTimeout)) { throw new InvalidOperationException(string.Format( @@ -340,7 +340,7 @@ public async ValueTask DisposeAsync() try { - // To close gracefully we need to ensure that the client closed the stream line 103. + // To close gracefully we need to ensure that the client closed the stream in the InternalLoopAsync method (there is comment `// The client has disconnected`). await _loopTask.WaitAsync(TimeoutHelper.DefaultHangTimeSpanTimeout, _cancellationToken).ConfigureAwait(false); } catch (TimeoutException) diff --git a/src/Platform/Microsoft.Testing.Platform/Messages/AsyncConsumerDataProcessor.net.cs b/src/Platform/Microsoft.Testing.Platform/Messages/AsyncConsumerDataProcessor.net.cs index 400bc14336..d071679abb 100644 --- a/src/Platform/Microsoft.Testing.Platform/Messages/AsyncConsumerDataProcessor.net.cs +++ b/src/Platform/Microsoft.Testing.Platform/Messages/AsyncConsumerDataProcessor.net.cs @@ -77,7 +77,7 @@ private async Task ConsumeAsync() catch (Exception ex) when (ex is not OperationCanceledException) { // If we're draining before to increment the _totalPayloadProcessed we need to signal that we should throw because - // it's possible we have a race condition where the payload check at line 106 return false and the current task is not yet in a + // it's possible we have a race condition where the payload counting in DrainDataAsync returns false and the current task is not yet in a // "faulted state". _consumerState.SetException(ex); diff --git a/src/Platform/Microsoft.Testing.Platform/Messages/BlockingCollectionConsumerDataProcessor.netstandard.cs b/src/Platform/Microsoft.Testing.Platform/Messages/BlockingCollectionConsumerDataProcessor.netstandard.cs index 8b3940227e..598b538039 100644 --- a/src/Platform/Microsoft.Testing.Platform/Messages/BlockingCollectionConsumerDataProcessor.netstandard.cs +++ b/src/Platform/Microsoft.Testing.Platform/Messages/BlockingCollectionConsumerDataProcessor.netstandard.cs @@ -67,7 +67,7 @@ private async Task ConsumeAsync() catch (Exception ex) when (ex is not OperationCanceledException) { // If we're draining before to increment the _totalPayloadProcessed we need to signal that we should throw because - // it's possible we have a race condition where the payload check at line 106 return false and the current task is not yet in a + // it's possible we have a race condition where the payload counting in DrainDataAsync returns false and the current task is not yet in a // "faulted state". _consumerState.SetException(ex); diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.cs.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.cs.xlf index 00fda09881..adf5071666 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.cs.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.cs.xlf @@ -254,12 +254,12 @@ Skutečnost: {2} Value '{0}' is not within the expected range [{1}..{2}]. {3} - Value '{0}' is not within the expected range [{1}..{2}]. {3} + Hodnota {0} není v očekávaném rozsahu [{1}..{2}]. {3} The maximum value must be greater than the minimum value. - The maximum value must be greater than the minimum value. + Maximální hodnota musí být větší než minimální hodnota. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.de.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.de.xlf index 7396caec35..6a225664b9 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.de.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.de.xlf @@ -254,12 +254,12 @@ Tatsächlich: {2} Value '{0}' is not within the expected range [{1}..{2}]. {3} - Value '{0}' is not within the expected range [{1}..{2}]. {3} + Der Wert „{0}“ liegt nicht im erwarteten Bereich [{1}..{2}]. {3} The maximum value must be greater than the minimum value. - The maximum value must be greater than the minimum value. + Der Höchstwert muss größer als der Mindestwert sein. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.es.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.es.xlf index 9a8979cae4..125e04007a 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.es.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.es.xlf @@ -254,12 +254,12 @@ Real: {2} Value '{0}' is not within the expected range [{1}..{2}]. {3} - Value '{0}' is not within the expected range [{1}..{2}]. {3} + El valor "{0}" no está dentro del rango esperado [{1}..{2}]. {3} The maximum value must be greater than the minimum value. - The maximum value must be greater than the minimum value. + El valor máximo debe ser mayor que el valor mínimo. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.fr.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.fr.xlf index c4a437b28c..74589b59b4 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.fr.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.fr.xlf @@ -254,12 +254,12 @@ Réel : {2} Value '{0}' is not within the expected range [{1}..{2}]. {3} - Value '{0}' is not within the expected range [{1}..{2}]. {3} + La valeur « {0} » n'est pas dans la plage attendue [{1}..{2}]. {3} The maximum value must be greater than the minimum value. - The maximum value must be greater than the minimum value. + La valeur maximale doit être supérieure à la valeur minimale. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.it.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.it.xlf index 25b59ee39f..816c5090e3 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.it.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.it.xlf @@ -254,12 +254,12 @@ Effettivo: {2} Value '{0}' is not within the expected range [{1}..{2}]. {3} - Value '{0}' is not within the expected range [{1}..{2}]. {3} + Il valore '{0}' non è compreso nell'intervallo previsto [{1}, {2}]. {3} The maximum value must be greater than the minimum value. - The maximum value must be greater than the minimum value. + Il valore massimo deve essere superiore a quello minimo. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ja.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ja.xlf index f21d716e12..c0434cbe8a 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ja.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ja.xlf @@ -254,12 +254,12 @@ Actual: {2} Value '{0}' is not within the expected range [{1}..{2}]. {3} - Value '{0}' is not within the expected range [{1}..{2}]. {3} + 値 '{0}' は予期される範囲 [{1}..{2}] 内にありません。{3} The maximum value must be greater than the minimum value. - The maximum value must be greater than the minimum value. + 最大値は、最小値より大きくする必要があります。 diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ko.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ko.xlf index 1a2547fd48..ae66824880 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ko.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ko.xlf @@ -254,12 +254,12 @@ Actual: {2} Value '{0}' is not within the expected range [{1}..{2}]. {3} - Value '{0}' is not within the expected range [{1}..{2}]. {3} + '{0}' 값이 예상 범위 [{1}..{2}] 내에 있지 않습니다. {3} The maximum value must be greater than the minimum value. - The maximum value must be greater than the minimum value. + 최댓값은 최솟값보다 커야 합니다. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pl.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pl.xlf index 7bec7e8034..eda93267c7 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pl.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pl.xlf @@ -254,12 +254,12 @@ Rzeczywiste: {2} Value '{0}' is not within the expected range [{1}..{2}]. {3} - Value '{0}' is not within the expected range [{1}..{2}]. {3} + Wartość „{0}” nie mieści się w oczekiwanym zakresie [{1}..{2}]. {3} The maximum value must be greater than the minimum value. - The maximum value must be greater than the minimum value. + Wartość maksymalna musi być większa niż wartość minimalna. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pt-BR.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pt-BR.xlf index 15cbde298b..daf7574c1a 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pt-BR.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.pt-BR.xlf @@ -254,12 +254,12 @@ Real: {2} Value '{0}' is not within the expected range [{1}..{2}]. {3} - Value '{0}' is not within the expected range [{1}..{2}]. {3} + O valor '{0}' não está dentro do intervalo esperado [{1}.. {2}]. {3} The maximum value must be greater than the minimum value. - The maximum value must be greater than the minimum value. + O valor máximo deve ser maior que o valor mínimo. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ru.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ru.xlf index ec0327c91a..dcaa24e48d 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ru.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.ru.xlf @@ -254,12 +254,12 @@ Actual: {2} Value '{0}' is not within the expected range [{1}..{2}]. {3} - Value '{0}' is not within the expected range [{1}..{2}]. {3} + Значение "{0}" не находится в пределах ожидаемого диапазона [{1}..{2}]. {3} The maximum value must be greater than the minimum value. - The maximum value must be greater than the minimum value. + Максимальное значение должно быть больше минимального значения. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.tr.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.tr.xlf index 2aeaeb6d11..f225e01eb7 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.tr.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.tr.xlf @@ -254,12 +254,12 @@ Gerçekte olan: {2} Value '{0}' is not within the expected range [{1}..{2}]. {3} - Value '{0}' is not within the expected range [{1}..{2}]. {3} + Değer '{0}' beklenen aralık [{1}..{2}] içinde değil. {3} The maximum value must be greater than the minimum value. - The maximum value must be greater than the minimum value. + En yüksek değer, en düşük değerden büyük olmalıdır. diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hans.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hans.xlf index 0e3a939d7d..b9e8438e79 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hans.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hans.xlf @@ -254,12 +254,12 @@ Actual: {2} Value '{0}' is not within the expected range [{1}..{2}]. {3} - Value '{0}' is not within the expected range [{1}..{2}]. {3} + 值 "{0}" 不在预期范围 [{1}..{2}] 内。{3} The maximum value must be greater than the minimum value. - The maximum value must be greater than the minimum value. + 最大值必须大于最小值。 diff --git a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hant.xlf b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hant.xlf index 490f2a618e..3d7f6f461d 100644 --- a/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hant.xlf +++ b/src/TestFramework/TestFramework/Resources/xlf/FrameworkMessages.zh-Hant.xlf @@ -254,12 +254,12 @@ Actual: {2} Value '{0}' is not within the expected range [{1}..{2}]. {3} - Value '{0}' is not within the expected range [{1}..{2}]. {3} + 值 '{0}' 不在預期的範圍 [{1}, {2}] 內。{3} The maximum value must be greater than the minimum value. - The maximum value must be greater than the minimum value. + 最大值必須大於最小值。 diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AppDomainTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AppDomainTests.cs index 14ed18e665..cac5b3ed9d 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AppDomainTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AppDomainTests.cs @@ -1,8 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using Microsoft.MSTestV2.CLIAutomation; using Microsoft.Testing.Platform.Acceptance.IntegrationTests; using Microsoft.Testing.Platform.Acceptance.IntegrationTests.Helpers; +using Microsoft.Testing.TestInfrastructure; namespace MSTest.Acceptance.IntegrationTests; @@ -90,7 +92,7 @@ public async Task RunTests_With_VSTest(bool? disableAppDomain) string disableAppDomainCommand = disableAppDomain switch { true => " -- RunConfiguration.DisableAppDomain=true", - false => " -- RunConfiguration.EnableAppDomain=false", + false => " -- RunConfiguration.DisableAppDomain=false", null => string.Empty, }; @@ -115,7 +117,7 @@ public async Task DiscoverTests_With_VSTest(bool? disableAppDomain) string disableAppDomainCommand = disableAppDomain switch { true => " -- RunConfiguration.DisableAppDomain=true", - false => " -- RunConfiguration.EnableAppDomain=false", + false => " -- RunConfiguration.DisableAppDomain=false", null => string.Empty, }; @@ -123,5 +125,89 @@ public async Task DiscoverTests_With_VSTest(bool? disableAppDomain) Assert.AreEqual(0, compilationResult.ExitCode); } + [TestMethod] + [DataRow(true)] + [DataRow(false)] + [DataRow(null)] + public async Task RunTests_With_VSTestConsole_Directly(bool? disableAppDomain) + { + using TestAsset testAsset = await TestAsset.GenerateAssetAsync( + AssetName, + SingleTestSourceCode + .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion) + .PatchCodeWithReplace("$TargetFramework$", TargetFrameworks.NetFramework[0])); + + // Build the test project + DotnetMuxerResult buildResult = await DotnetCli.RunAsync( + $"build {testAsset.TargetAssetPath} -c Debug", + AcceptanceFixture.NuGetGlobalPackagesFolder.Path, + workingDirectory: testAsset.TargetAssetPath, + cancellationToken: TestContext.CancellationToken); + Assert.AreEqual(0, buildResult.ExitCode, $"Build failed: {buildResult.StandardOutput}"); + + // Get the DLL path + string dllPath = GetTestDllPath(testAsset.TargetAssetPath, TargetFrameworks.NetFramework[0]); + Assert.IsTrue(File.Exists(dllPath), $"Test DLL not found at {dllPath}"); + + // Run tests using vstest.console.exe directly + string vstestConsolePath = VSTestConsoleLocator.GetConsoleRunnerPath(); + string disableAppDomainCommand = disableAppDomain switch + { + true => " -- RunConfiguration.DisableAppDomain=true", + false => " -- RunConfiguration.DisableAppDomain=false", + null => string.Empty, + }; + + string arguments = $"\"{dllPath}\"{disableAppDomainCommand}"; + + using var commandLine = new CommandLine(); + await commandLine.RunAsync( + $"\"{vstestConsolePath}\" {arguments}", + cancellationToken: TestContext.CancellationToken); + } + + [TestMethod] + [DataRow(true)] + [DataRow(false)] + [DataRow(null)] + public async Task DiscoverTests_With_VSTestConsole_Directly(bool? disableAppDomain) + { + using TestAsset testAsset = await TestAsset.GenerateAssetAsync( + AssetName, + SingleTestSourceCode + .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion) + .PatchCodeWithReplace("$TargetFramework$", TargetFrameworks.NetFramework[0])); + + // Build the test project + DotnetMuxerResult buildResult = await DotnetCli.RunAsync( + $"build {testAsset.TargetAssetPath} -c Debug", + AcceptanceFixture.NuGetGlobalPackagesFolder.Path, + workingDirectory: testAsset.TargetAssetPath, + cancellationToken: TestContext.CancellationToken); + Assert.AreEqual(0, buildResult.ExitCode, $"Build failed: {buildResult.StandardOutput}"); + + // Get the DLL path + string dllPath = GetTestDllPath(testAsset.TargetAssetPath, TargetFrameworks.NetFramework[0]); + Assert.IsTrue(File.Exists(dllPath), $"Test DLL not found at {dllPath}"); + + // Run discovery using vstest.console.exe directly + string vstestConsolePath = VSTestConsoleLocator.GetConsoleRunnerPath(); + string disableAppDomainCommand = disableAppDomain switch + { + true => " -- RunConfiguration.DisableAppDomain=true", + false => " -- RunConfiguration.DisableAppDomain=false", + null => string.Empty, + }; + string arguments = $"\"{dllPath}\" /ListTests{disableAppDomainCommand}"; + + using var commandLine = new CommandLine(); + await commandLine.RunAsync( + $"\"{vstestConsolePath}\" {arguments}", + cancellationToken: TestContext.CancellationToken); + } + + private static string GetTestDllPath(string assetPath, string targetFramework) => + Path.Combine(assetPath, "bin", "Debug", targetFramework, $"{AssetName}.dll"); + public TestContext TestContext { get; set; } } diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/MSTest.Acceptance.IntegrationTests.csproj b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/MSTest.Acceptance.IntegrationTests.csproj index 7fb66b0acc..c086fd8b9b 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/MSTest.Acceptance.IntegrationTests.csproj +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/MSTest.Acceptance.IntegrationTests.csproj @@ -13,13 +13,15 @@ + + - + diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests.csproj b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests.csproj index 8da7dd00bb..b6ba49f6aa 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests.csproj +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests.csproj @@ -13,6 +13,10 @@ + + + + diff --git a/test/Performance/MSTest.Performance.Runner/MSTest.Performance.Runner.csproj b/test/Performance/MSTest.Performance.Runner/MSTest.Performance.Runner.csproj index eb2306c412..686b71999d 100644 --- a/test/Performance/MSTest.Performance.Runner/MSTest.Performance.Runner.csproj +++ b/test/Performance/MSTest.Performance.Runner/MSTest.Performance.Runner.csproj @@ -15,4 +15,8 @@ + + + + diff --git a/test/UnitTests/MSTest.Analyzers.UnitTests/MSTest.Analyzers.UnitTests.csproj b/test/UnitTests/MSTest.Analyzers.UnitTests/MSTest.Analyzers.UnitTests.csproj index 069388fa30..4b32407f1f 100644 --- a/test/UnitTests/MSTest.Analyzers.UnitTests/MSTest.Analyzers.UnitTests.csproj +++ b/test/UnitTests/MSTest.Analyzers.UnitTests/MSTest.Analyzers.UnitTests.csproj @@ -44,4 +44,8 @@ + + + + diff --git a/test/UnitTests/MSTest.SourceGeneration.UnitTests/MSTest.SourceGeneration.UnitTests.csproj b/test/UnitTests/MSTest.SourceGeneration.UnitTests/MSTest.SourceGeneration.UnitTests.csproj index fcdc1a7ebe..014e756668 100644 --- a/test/UnitTests/MSTest.SourceGeneration.UnitTests/MSTest.SourceGeneration.UnitTests.csproj +++ b/test/UnitTests/MSTest.SourceGeneration.UnitTests/MSTest.SourceGeneration.UnitTests.csproj @@ -14,6 +14,10 @@ + + + + PreserveNewest diff --git a/test/UnitTests/TestFramework.UnitTests/Assertions/AssertTests.That.cs b/test/UnitTests/TestFramework.UnitTests/Assertions/AssertTests.That.cs index 00377cbfda..180aa357c3 100644 --- a/test/UnitTests/TestFramework.UnitTests/Assertions/AssertTests.That.cs +++ b/test/UnitTests/TestFramework.UnitTests/Assertions/AssertTests.That.cs @@ -667,7 +667,7 @@ public void That_NonGenericCollection_FormatsCorrectly() public void That_NonGenericCollectionInComparison_FormatsCorrectly() { - // Arrange - Using ArrayList in a comparison to trigger FormatValue on line 421 + // Arrange - Using ArrayList in a comparison to trigger FormatValue that formats enumerables var arrayList = new ArrayList { 1, 2, 3 }; int[] expectedItems = [1, 2, 3, 4]; diff --git a/test/Utilities/Automation.CLI/Automation.CLI.csproj b/test/Utilities/Automation.CLI/Automation.CLI.csproj index 6b62895628..cbb4fe349f 100644 --- a/test/Utilities/Automation.CLI/Automation.CLI.csproj +++ b/test/Utilities/Automation.CLI/Automation.CLI.csproj @@ -14,4 +14,8 @@ + + + + diff --git a/test/Utilities/Automation.CLI/CLITestBase.common.cs b/test/Utilities/Automation.CLI/CLITestBase.common.cs index 8a59fa515c..9b6fccddb4 100644 --- a/test/Utilities/Automation.CLI/CLITestBase.common.cs +++ b/test/Utilities/Automation.CLI/CLITestBase.common.cs @@ -30,14 +30,6 @@ protected static XmlDocument ReadCPMFile() return versionPropsXml; } - protected static string GetTestPlatformVersion() - { - XmlDocument cpmXml = ReadCPMFile(); - XmlNode testSdkVersion = cpmXml.DocumentElement.SelectSingleNode("PropertyGroup/MicrosoftNETTestSdkVersion"); - - return testSdkVersion.InnerText; - } - protected static string GetArtifactsBinFolderPath() { string assemblyLocation = Assembly.GetExecutingAssembly().Location; diff --git a/test/Utilities/Automation.CLI/CLITestBase.e2e.cs b/test/Utilities/Automation.CLI/CLITestBase.e2e.cs index 76d01fb92b..8e3725549c 100644 --- a/test/Utilities/Automation.CLI/CLITestBase.e2e.cs +++ b/test/Utilities/Automation.CLI/CLITestBase.e2e.cs @@ -15,7 +15,7 @@ public abstract partial class CLITestBase protected CLITestBase() { s_vsTestConsoleWrapper = new( - GetConsoleRunnerPath(), + VSTestConsoleLocator.GetConsoleRunnerPath(), new() { EnvironmentVariables = new() @@ -65,52 +65,6 @@ public void InvokeVsTestForExecution(string[] sources, string runSettings = "", } } - public static string GetNugetPackageFolder() - { - string nugetPackagesFolderPath = Environment.GetEnvironmentVariable("NUGET_PACKAGES"); - if (!string.IsNullOrEmpty(nugetPackagesFolderPath)) - { - Assert.IsTrue(Directory.Exists(nugetPackagesFolderPath), $"Found environment variable 'NUGET_PACKAGES' and NuGet package folder '{nugetPackagesFolderPath}' should exist"); - - return nugetPackagesFolderPath; - } - - string userProfile = Environment.GetEnvironmentVariable("USERPROFILE"); - nugetPackagesFolderPath = Path.Combine(userProfile, ".nuget", "packages"); - Assert.IsTrue(Directory.Exists(nugetPackagesFolderPath), $"NuGet package folder '{nugetPackagesFolderPath}' should exist"); - - return nugetPackagesFolderPath; - } - - /// - /// Gets the path to vstest.console.exe. - /// - /// Full path to vstest.console.exe. - public static string GetConsoleRunnerPath() - { - string testPlatformNuGetPackageFolder = Path.Combine( - GetNugetPackageFolder(), - TestPlatformCLIPackageName, - GetTestPlatformVersion()); - if (!Directory.Exists(testPlatformNuGetPackageFolder)) - { - throw new DirectoryNotFoundException($"Test platform NuGet package folder '{testPlatformNuGetPackageFolder}' does not exist"); - } - - string vstestConsolePath = Path.Combine( - testPlatformNuGetPackageFolder, - "tools", - "net462", - "Common7", - "IDE", - "Extensions", - "TestPlatform", - "vstest.console.exe"); - return !File.Exists(vstestConsolePath) - ? throw new InvalidOperationException($"Could not find vstest.console.exe in {vstestConsolePath}") - : vstestConsolePath; - } - /// /// Validate if the discovered tests list contains provided tests. /// diff --git a/test/Utilities/Automation.CLI/VSTestConsoleLocator.cs b/test/Utilities/Automation.CLI/VSTestConsoleLocator.cs new file mode 100644 index 0000000000..3966fa7f8e --- /dev/null +++ b/test/Utilities/Automation.CLI/VSTestConsoleLocator.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using Microsoft.Testing.TestInfrastructure; + +using Assert = Microsoft.VisualStudio.TestTools.UnitTesting.Assert; + +namespace Microsoft.MSTestV2.CLIAutomation; + +/// +/// Helper class to locate vstest.console.exe. +/// +public static class VSTestConsoleLocator +{ + private const string TestPlatformPackageName = "Microsoft.TestPlatform"; + + /// + /// Gets the path to vstest.console.exe. + /// + /// Full path to vstest.console.exe. + public static string GetConsoleRunnerPath() + { + string testPlatformNuGetPackageFolder = Path.Combine( + GetNugetPackageFolder(), + TestPlatformPackageName, + GetTestPlatformVersion()); + if (!Directory.Exists(testPlatformNuGetPackageFolder)) + { + throw new DirectoryNotFoundException($"Test platform NuGet package folder '{testPlatformNuGetPackageFolder}' does not exist"); + } + + string vstestConsolePath = Path.Combine( + testPlatformNuGetPackageFolder, + "tools", + "net462", + "Common7", + "IDE", + "Extensions", + "TestPlatform", + "vstest.console.exe"); + return !File.Exists(vstestConsolePath) + ? throw GetExceptionForVSTestConsoleNotFound(vstestConsolePath) + : vstestConsolePath; + + InvalidOperationException GetExceptionForVSTestConsoleNotFound(string expectedPath) + { + string[] files = Directory.GetFiles(testPlatformNuGetPackageFolder, "vstest.console.exe", SearchOption.AllDirectories); + return files.Length == 0 + ? new InvalidOperationException($"Could not find vstest.console.exe in {vstestConsolePath}") + : new InvalidOperationException($"Could not find vstest.console.exe in {vstestConsolePath}. Found in:{Environment.NewLine}{string.Join(Environment.NewLine, files)}"); + } + } + + private static string GetNugetPackageFolder() + { + string? nugetPackagesFolderPath = Environment.GetEnvironmentVariable("NUGET_PACKAGES"); + if (!string.IsNullOrEmpty(nugetPackagesFolderPath)) + { + Assert.IsTrue(Directory.Exists(nugetPackagesFolderPath), $"Found environment variable 'NUGET_PACKAGES' and NuGet package folder '{nugetPackagesFolderPath}' should exist"); + + return nugetPackagesFolderPath; + } + + string? userProfile = Environment.GetEnvironmentVariable("USERPROFILE"); + if (string.IsNullOrEmpty(userProfile)) + { + throw new InvalidOperationException("USERPROFILE environment variable is not set"); + } + + nugetPackagesFolderPath = Path.Combine(userProfile, ".nuget", "packages"); + Assert.IsTrue(Directory.Exists(nugetPackagesFolderPath), $"NuGet package folder '{nugetPackagesFolderPath}' should exist"); + + return nugetPackagesFolderPath; + } + + private static string GetTestPlatformVersion() + { + string cpmFilePath = Path.Combine(RootFinder.Find(), "Directory.Packages.props"); + using FileStream fileStream = File.OpenRead(cpmFilePath); +#pragma warning disable CA3075 // Insecure DTD processing in XML + using var xmlTextReader = new XmlTextReader(fileStream) { Namespaces = false }; +#pragma warning restore CA3075 // Insecure DTD processing in XML + var cpmXml = new XmlDocument(); + cpmXml.Load(xmlTextReader); + + return cpmXml.DocumentElement?.SelectSingleNode("PropertyGroup/MicrosoftNETTestSdkVersion")?.InnerText + ?? throw new InvalidOperationException($"Could not find MicrosoftNETTestSdkVersion in {cpmFilePath}"); + } +} diff --git a/test/Utilities/Microsoft.Testing.TestInfrastructure/Microsoft.Testing.TestInfrastructure.csproj b/test/Utilities/Microsoft.Testing.TestInfrastructure/Microsoft.Testing.TestInfrastructure.csproj index 6a8963eaa5..97bb9f850f 100644 --- a/test/Utilities/Microsoft.Testing.TestInfrastructure/Microsoft.Testing.TestInfrastructure.csproj +++ b/test/Utilities/Microsoft.Testing.TestInfrastructure/Microsoft.Testing.TestInfrastructure.csproj @@ -4,7 +4,6 @@ $(SupportedNetFrameworks);netstandard2.0 enable $(DefineConstants);SKIP_INTERMEDIATE_TARGET_FRAMEWORKS - $(DefineConstants);ROOT_FINDER_PUBLIC diff --git a/test/Utilities/Microsoft.Testing.TestInfrastructure/RootFinder.cs b/test/Utilities/Microsoft.Testing.TestInfrastructure/RootFinder.cs index 404f930f6a..53d2ac7be5 100644 --- a/test/Utilities/Microsoft.Testing.TestInfrastructure/RootFinder.cs +++ b/test/Utilities/Microsoft.Testing.TestInfrastructure/RootFinder.cs @@ -9,12 +9,7 @@ namespace Microsoft.Testing.TestInfrastructure; /// The class is used to find the root directory of a Git repository by /// searching for a ".git" directory or file starting from the application's base directory and moving up the directory /// hierarchy. This is useful for applications that need to determine the root of a project or repository. -#if ROOT_FINDER_PUBLIC -public -#else -internal -#endif - static class RootFinder +internal static class RootFinder { private static string? s_root;