Open-source platform extensions and tooling (#3133)

Co-authored-by: Jakub Jareš <me@jakubjares.com>
This commit is contained in:
Amaury Levé 2024-06-21 11:08:22 +02:00 коммит произвёл GitHub
Родитель 656592efea
Коммит 04cfbbc046
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
396 изменённых файлов: 22615 добавлений и 753 удалений

Просмотреть файл

@ -1,72 +0,0 @@
<!--
This file contains .Local. in the name and it's imported conditionally in the default directory one because this repo is used
as submodule in other repos and we don't want to import this file in those repos.
-->
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<Import Project="$(RepositoryEngineeringDir)Analyzers.props" />
<PropertyGroup>
<IsSourceProject Condition="$([MSBuild]::MakeRelative($(RepoRoot), $(MSBuildProjectFullPath)).StartsWith('src/')) OR $([MSBuild]::MakeRelative($(RepoRoot), $(MSBuildProjectFullPath)).StartsWith('src\'))">true</IsSourceProject>
</PropertyGroup>
<!-- Language configuration -->
<PropertyGroup>
<!-- default to allowing all language features -->
<LangVersion>preview</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<!--
Make sure any documentation comments which are included in code get checked for syntax during the build, but do
not report warnings for missing comments.
CS1573: Parameter 'parameter' has no matching param tag in the XML comment for 'parameter' (but other parameters do)
CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member'
-->
<NoWarn>$(NoWarn),1573,1591</NoWarn>
</PropertyGroup>
<!-- The TFMs to build and test against. -->
<PropertyGroup>
<NetFrameworkMinimum>net462</NetFrameworkMinimum>
<UwpMinimum>uap10.0.16299</UwpMinimum>
<WinUiMinimum>net6.0-windows10.0.18362.0</WinUiMinimum>
<NetCurrent>net8.0</NetCurrent>
<SupportedNetFrameworks>netcoreapp3.1;net6.0;net7.0;net8.0</SupportedNetFrameworks>
<MicrosoftTestingTargetFrameworks>net6.0;net7.0;net8.0</MicrosoftTestingTargetFrameworks>
</PropertyGroup>
<!-- Build config -->
<PropertyGroup>
<!-- Prevent warning about deprecated target frameworks -->
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<!-- PDB -->
<DebugSymbols>true</DebugSymbols>
<DebugType>embedded</DebugType>
<!-- Workaround for AD0001 in analyzers with .NET 9. See https://github.com/dotnet/arcade/issues/14311 -->
<BuildWithNetFrameworkHostedCompiler>true</BuildWithNetFrameworkHostedCompiler>
</PropertyGroup>
<!-- Pack config -->
<PropertyGroup>
<Copyright>$(CopyrightMicrosoft)</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<DoNotShipTestingPlatformPackage>true</DoNotShipTestingPlatformPackage>
</PropertyGroup>
<!-- Sign config -->
<PropertyGroup>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
</PropertyGroup>
<!-- Test config -->
<PropertyGroup>
<TestRunnerName>TestingPlatformRunner</TestRunnerName>
<!-- By default we run tests with VSTest runner and custom test framework. Platform projects will use a different runner and framework -->
<UseVSTestRunner Condition=" '$(UseVSTestRunner)' == '' " >true</UseVSTestRunner>
<MoqPublicKey>0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7</MoqPublicKey>
</PropertyGroup>
</Project>

Просмотреть файл

@ -1,29 +0,0 @@
<!--
This file contains .Local. in the name and it's imported conditionally in the default directory one because this repo is used
as submodule in other repos and we don't want to import this file in those repos.
-->
<Project>
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<PropertyGroup Condition=" '$(UseAssemblyVersion14)' == 'true' ">
<!--
It appears that AssemblyVersion should always be set to 14.0.0.0 for some backward compatibility cases,
but we don't have any information about these cases.
-->
<AssemblyVersion>14.0.0.0</AssemblyVersion>
<AssemblyFileVersion>14.0.0.0</AssemblyFileVersion>
</PropertyGroup>
<!-- Code coverage-->
<PropertyGroup Condition=" $(UseVSTestRunner) == 'false' ">
<EnableCodeCoverage Condition=" '$(EnableCodeCoverage)' == '' ">true</EnableCodeCoverage>
<DefineConstants Condition=" '$(EnableCodeCoverage)' == 'true' " >$(DefineConstants);ENABLE_CODECOVERAGE</DefineConstants>
<Architecture Condition=" '$(Architecture)' == '' ">$(PlatformTarget)</Architecture>
<Architecture Condition="'$(PlatformTarget)' == '' or '$(PlatformTarget)' == 'AnyCpu'">x64</Architecture>
<ModuleName>$(MSBuildProjectName)_$(TargetFramework)_$(Configuration)_$(Architecture)</ModuleName>
<!-- Arcade runner settings -->
<TestRunnerAdditionalArguments Condition=" '$(EnableCodeCoverage)' == 'true' ">$(TestRunnerAdditionalArguments) --coverage --coverage-settings $(RepoRoot)eng/coverage.config --coverage-output $(ModuleName).coverage</TestRunnerAdditionalArguments>
</PropertyGroup>
</Project>

Просмотреть файл

@ -1,10 +1,67 @@
<Project>
<Import Condition=" Exists('$(MSBuildThisFileDirectory)\..\Directory.Build.props') " Project="$(MSBuildThisFileDirectory)\..\Directory.Build.props" />
<Import Condition=" !Exists('$(MSBuildThisFileDirectory)\..\Directory.Build.props') " Project="$(MSBuildThisFileDirectory)\Directory.Build.Local.props" />
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<Import Project="$(RepositoryEngineeringDir)Analyzers.props" />
<PropertyGroup Condition=" Exists('$(MSBuildThisFileDirectory)\..\Directory.Build.props') ">
<PackageLicenseExpressionInternal></PackageLicenseExpressionInternal>
<PropertyGroup>
<IsSourceProject Condition="$([MSBuild]::MakeRelative($(RepoRoot), $(MSBuildProjectFullPath)).StartsWith('src/')) OR $([MSBuild]::MakeRelative($(RepoRoot), $(MSBuildProjectFullPath)).StartsWith('src\'))">true</IsSourceProject>
</PropertyGroup>
<!-- Language configuration -->
<PropertyGroup>
<!-- default to allowing all language features -->
<LangVersion>preview</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<!--
Make sure any documentation comments which are included in code get checked for syntax during the build, but do
not report warnings for missing comments.
CS1573: Parameter 'parameter' has no matching param tag in the XML comment for 'parameter' (but other parameters do)
CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member'
-->
<NoWarn>$(NoWarn),1573,1591</NoWarn>
</PropertyGroup>
<!-- The TFMs to build and test against. -->
<PropertyGroup>
<NetFrameworkMinimum>net462</NetFrameworkMinimum>
<UwpMinimum>uap10.0.16299</UwpMinimum>
<WinUiMinimum>net6.0-windows10.0.18362.0</WinUiMinimum>
<NetCurrent>net8.0</NetCurrent>
<SupportedNetFrameworks>netcoreapp3.1;net6.0;net7.0;net8.0</SupportedNetFrameworks>
<MicrosoftTestingTargetFrameworks>net6.0;net7.0;net8.0</MicrosoftTestingTargetFrameworks>
</PropertyGroup>
<!-- Build config -->
<PropertyGroup>
<!-- Prevent warning about deprecated target frameworks -->
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<!-- PDB -->
<DebugSymbols>true</DebugSymbols>
<DebugType>embedded</DebugType>
<!-- Workaround for AD0001 in analyzers with .NET 9. See https://github.com/dotnet/arcade/issues/14311 -->
<BuildWithNetFrameworkHostedCompiler>true</BuildWithNetFrameworkHostedCompiler>
</PropertyGroup>
<!-- Pack config -->
<PropertyGroup>
<Copyright>$(CopyrightMicrosoft)</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup>
<!-- Sign config -->
<PropertyGroup>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
</PropertyGroup>
<!-- Test config -->
<PropertyGroup>
<TestRunnerName>TestingPlatformRunner</TestRunnerName>
<!-- By default we run tests with VSTest runner and custom test framework. Platform projects will use a different runner and framework -->
<UseVSTestRunner Condition=" '$(UseVSTestRunner)' == '' " >true</UseVSTestRunner>
<MoqPublicKey>0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7</MoqPublicKey>
</PropertyGroup>
</Project>

Просмотреть файл

@ -1,6 +1,14 @@
<Project>
<Import Condition="Exists('$(MSBuildThisFileDirectory)\..\Directory.Build.targets')" Project="$(MSBuildThisFileDirectory)\..\Directory.Build.targets" />
<Import Condition="!Exists('$(MSBuildThisFileDirectory)\..\Directory.Build.targets')" Project="$(MSBuildThisFileDirectory)\Directory.Build.Local.targets" />
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<PropertyGroup Condition=" '$(UseAssemblyVersion14)' == 'true' ">
<!--
It appears that AssemblyVersion should always be set to 14.0.0.0 for some backward compatibility cases,
but we don't have any information about these cases.
-->
<AssemblyVersion>14.0.0.0</AssemblyVersion>
<AssemblyFileVersion>14.0.0.0</AssemblyFileVersion>
</PropertyGroup>
</Project>

Просмотреть файл

@ -6,24 +6,28 @@
</PropertyGroup>
<PropertyGroup Label="Product dependencies">
<AspireHostingTestingVersion>8.0.1</AspireHostingTestingVersion>
<!-- Test Platform, .NET Test SDK and Object Model -->
<MicrosoftNETTestSdkVersion>17.10.0</MicrosoftNETTestSdkVersion>
<!-- UWP and WinUI dependencies -->
<MicrosoftNETCoreUniversalWindowsPlatformVersion>6.2.14</MicrosoftNETCoreUniversalWindowsPlatformVersion>
<!-- / UWP and WinUI dependencies -->
<!-- CVE-2017-0247 -->
<SystemNetWebSocketsClientVersion>4.3.1</SystemNetWebSocketsClientVersion>
<SystemTextRegularExpressionsVersion>4.3.1</SystemTextRegularExpressionsVersion>
<MicrosoftBuildVersion>17.10.0-preview-24127-03</MicrosoftBuildVersion>
<MicrosoftCodeAnalysisAnalyzersVersion>3.11.0-beta1.24223.1</MicrosoftCodeAnalysisAnalyzersVersion>
<MicrosoftCodeAnalysisVersion>3.11.0</MicrosoftCodeAnalysisVersion>
<MicrosoftCodeAnalysisPublicApiAnalyzersVersion>$(MicrosoftCodeAnalysisAnalyzersVersion)</MicrosoftCodeAnalysisPublicApiAnalyzersVersion>
<MicrosoftCodeAnalysisBannedApiAnalyzersVersion>$(MicrosoftCodeAnalysisPublicApiAnalyzersVersion)</MicrosoftCodeAnalysisBannedApiAnalyzersVersion>
<!-- UWP and WinUI dependencies -->
<MicrosoftNETCoreUniversalWindowsPlatformVersion>6.2.14</MicrosoftNETCoreUniversalWindowsPlatformVersion>
<!-- Test Platform, .NET Test SDK and Object Model -->
<MicrosoftNETTestSdkVersion>17.10.0</MicrosoftNETTestSdkVersion>
<MicrosoftPlaywrightVersion>1.44.0</MicrosoftPlaywrightVersion>
<!-- CVE-2017-0247 -->
<SystemNetWebSocketsClientVersion>4.3.1</SystemNetWebSocketsClientVersion>
<SystemTextRegularExpressionsVersion>4.3.1</SystemTextRegularExpressionsVersion>
</PropertyGroup>
<PropertyGroup Label="Test dependencies">
<MicrosoftCodeAnalysisAnalyzerTestingVersion>1.1.2-beta1.24273.1</MicrosoftCodeAnalysisAnalyzerTestingVersion>
</PropertyGroup>
<ItemGroup Label="Product dependencies">
<PackageVersion Include="Microsoft.ApplicationInsights" Version="2.22.0" />
<PackageVersion Include="Microsoft.Build.Framework" Version="$(MicrosoftBuildVersion)" />
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildVersion)" />
<PackageVersion Include="Microsoft.CodeAnalysis" Version="$(MicrosoftCodeAnalysisVersion)" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="$(MicrosoftCodeAnalysisAnalyzersVersion)" />
<PackageVersion Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="$(MicrosoftCodeAnalysisBannedApiAnalyzersVersion)" />
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="$(MicrosoftCodeAnalysisVersion)" />
@ -32,18 +36,19 @@
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.CodeRefactoring.Testing" Version="$(MicrosoftCodeAnalysisAnalyzerTestingVersion)" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="$(MicrosoftCodeAnalysisVersion)" />
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="$(MicrosoftCodeAnalysisPublicApiAnalyzersVersion)" />
<PackageVersion Include="Microsoft.CodeAnalysis" Version="$(MicrosoftCodeAnalysisVersion)" />
<PackageVersion Include="Microsoft.Diagnostics.NETCore.Client" Version="0.2.510501" />
<PackageVersion Include="Microsoft.Testing.Extensions.CodeCoverage" Version="$(MicrosoftTestingExtensionsCodeCoverageVersion)" />
<PackageVersion Include="Microsoft.Testing.Extensions.CrashDump" Version="$(MicrosoftTestingPlatformVersion)" />
<PackageVersion Include="Microsoft.Testing.Extensions.HangDump" Version="$(MicrosoftTestingPlatformVersion)" />
<PackageVersion Include="Microsoft.Testing.Extensions.Retry" Version="$(MicrosoftTestingPlatformVersion)" />
<PackageVersion Include="Microsoft.Testing.Extensions.TrxReport" Version="$(MicrosoftTestingPlatformVersion)" />
<PackageVersion Include="Microsoft.Testing.Extensions.VSTestBridge" Version="$(MicrosoftTestingPlatformVersion)" />
<PackageVersion Include="Microsoft.Testing.Internal.Framework.SourceGeneration" Version="$(MicrosoftTestingPlatformVersion)" />
<PackageVersion Include="Microsoft.Testing.Internal.Framework" Version="$(MicrosoftTestingPlatformVersion)" />
<PackageVersion Include="Microsoft.Testing.Internal.Framework.SourceGeneration" Version="$(MicrosoftTestingPlatformVersion)" />
<PackageVersion Include="Microsoft.TestPlatform" Version="$(MicrosoftNETTestSdkVersion)" />
<PackageVersion Include="Microsoft.TestPlatform.AdapterUtilities" Version="$(MicrosoftNETTestSdkVersion)" />
<PackageVersion Include="Microsoft.TestPlatform.ObjectModel" Version="$(MicrosoftNETTestSdkVersion)" />
<PackageVersion Include="Microsoft.TestPlatform.TranslationLayer" Version="$(MicrosoftNETTestSdkVersion)" />
<PackageVersion Include="Microsoft.TestPlatform" Version="$(MicrosoftNETTestSdkVersion)" />
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.10.48" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.0.0" />
<PackageVersion Include="Polyfill" Version="5.3.0" />

Просмотреть файл

@ -22,6 +22,8 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{A9596292-7E67-4566-9096-143DDAA4E8D8}"
ProjectSection(SolutionItems) = preProject
test\.editorconfig = test\.editorconfig
test\Directory.Build.props = test\Directory.Build.props
test\Directory.Build.targets = test\Directory.Build.targets
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestFramework.Extensions", "src\TestFramework\TestFramework.Extensions\TestFramework.Extensions.csproj", "{DF131865-84EE-4540-8112-E88ACEBDEA09}"
@ -46,8 +48,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.gitignore = .gitignore
Directory.Build.Local.props = Directory.Build.Local.props
Directory.Build.Local.targets = Directory.Build.Local.targets
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
Directory.Packages.props = Directory.Packages.props
@ -67,6 +67,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "eng", "eng", "{FE0DF239-0D8
ProjectSection(SolutionItems) = preProject
eng\AfterSolutionBuild.targets = eng\AfterSolutionBuild.targets
eng\Analyzers.props = eng\Analyzers.props
eng\Build.props = eng\Build.props
eng\coverage.config = eng\coverage.config
eng\install-windows-sdk.ps1 = eng\install-windows-sdk.ps1
eng\stylecop.json = eng\stylecop.json
@ -169,7 +170,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestingPlatformRunner", "Te
eng\TestingPlatformRunner\TestingPlatformRunner.targets = eng\TestingPlatformRunner\TestingPlatformRunner.targets
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "1 - Runner", "1 - Runner", "{6AEE1440-FDF0-4729-8196-B24D0E333550}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "1 - Platform & Extensions", "1 - Platform & Extensions", "{6AEE1440-FDF0-4729-8196-B24D0E333550}"
ProjectSection(SolutionItems) = preProject
src\Platform\Directory.Build.props = src\Platform\Directory.Build.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Testing.Platform", "src\Platform\Microsoft.Testing.Platform\Microsoft.Testing.Platform.csproj", "{48FAB979-8DA5-492E-8B3F-5DBBE82F659A}"
EndProject
@ -203,6 +207,26 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MSTest.Acceptance.Integrati
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FixturesTestProject", "test\IntegrationTests\TestAssets\FixturesTestProject\FixturesTestProject.csproj", "{A7D0995D-0516-4975-ABBD-EB93E1B79292}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Testing.Extensions.TrxReport.Abstractions", "src\Platform\Microsoft.Testing.Extensions.TrxReport.Abstractions\Microsoft.Testing.Extensions.TrxReport.Abstractions.csproj", "{9164E0BA-0846-4839-BA0F-C25F5FBE056C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Testing.Extensions.TrxReport", "src\Platform\Microsoft.Testing.Extensions.TrxReport\Microsoft.Testing.Extensions.TrxReport.csproj", "{29B9F157-3733-471E-A11E-A5FF3C6D1348}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Testing.Extensions.VSTestBridge", "src\Platform\Microsoft.Testing.Extensions.VSTestBridge\Microsoft.Testing.Extensions.VSTestBridge.csproj", "{60763BAA-C963-4858-8DA1-78DB92428865}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Testing.Platform.MSBuild", "src\Platform\Microsoft.Testing.Platform.MSBuild\Microsoft.Testing.Platform.MSBuild.csproj", "{1B30B69C-A4E3-4660-9CA8-140D0C34B4A5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Testing.Extensions.Telemetry", "src\Platform\Microsoft.Testing.Extensions.Telemetry\Microsoft.Testing.Extensions.Telemetry.csproj", "{BCA498E6-22C7-4E3F-8862-A7FAA06652D1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Testing.Extensions.CrashDump", "src\Platform\Microsoft.Testing.Extensions.CrashDump\Microsoft.Testing.Extensions.CrashDump.csproj", "{DFC9B46A-BFA7-407D-B872-7104C78A0787}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Testing.Extensions.HangDump", "src\Platform\Microsoft.Testing.Extensions.HangDump\Microsoft.Testing.Extensions.HangDump.csproj", "{8C743361-B796-4A92-BD69-3B5DD734BA6F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Testing.Extensions.UnitTests", "test\UnitTests\Microsoft.Testing.Extensions.UnitTests\Microsoft.Testing.Extensions.UnitTests.csproj", "{16FEFD31-B0D6-4291-B620-F902A16F39DC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Testing.Extensions.VSTestBridge.UnitTests", "test\UnitTests\Microsoft.Testing.Extensions.VSTestBridge.UnitTests\Microsoft.Testing.Extensions.VSTestBridge.UnitTests.csproj", "{573C617F-6BB2-403A-AD87-E00A7FD537F0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Testing.Platform.MSBuild.UnitTests", "test\UnitTests\Microsoft.Testing.Platform.MSBuild.UnitTests\Microsoft.Testing.Platform.MSBuild.UnitTests.csproj", "{F422398C-72CD-43EA-AC8E-E0DBD08E5563}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -433,6 +457,46 @@ Global
{A7D0995D-0516-4975-ABBD-EB93E1B79292}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A7D0995D-0516-4975-ABBD-EB93E1B79292}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A7D0995D-0516-4975-ABBD-EB93E1B79292}.Release|Any CPU.Build.0 = Release|Any CPU
{9164E0BA-0846-4839-BA0F-C25F5FBE056C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9164E0BA-0846-4839-BA0F-C25F5FBE056C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9164E0BA-0846-4839-BA0F-C25F5FBE056C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9164E0BA-0846-4839-BA0F-C25F5FBE056C}.Release|Any CPU.Build.0 = Release|Any CPU
{29B9F157-3733-471E-A11E-A5FF3C6D1348}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{29B9F157-3733-471E-A11E-A5FF3C6D1348}.Debug|Any CPU.Build.0 = Debug|Any CPU
{29B9F157-3733-471E-A11E-A5FF3C6D1348}.Release|Any CPU.ActiveCfg = Release|Any CPU
{29B9F157-3733-471E-A11E-A5FF3C6D1348}.Release|Any CPU.Build.0 = Release|Any CPU
{60763BAA-C963-4858-8DA1-78DB92428865}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{60763BAA-C963-4858-8DA1-78DB92428865}.Debug|Any CPU.Build.0 = Debug|Any CPU
{60763BAA-C963-4858-8DA1-78DB92428865}.Release|Any CPU.ActiveCfg = Release|Any CPU
{60763BAA-C963-4858-8DA1-78DB92428865}.Release|Any CPU.Build.0 = Release|Any CPU
{1B30B69C-A4E3-4660-9CA8-140D0C34B4A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1B30B69C-A4E3-4660-9CA8-140D0C34B4A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1B30B69C-A4E3-4660-9CA8-140D0C34B4A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1B30B69C-A4E3-4660-9CA8-140D0C34B4A5}.Release|Any CPU.Build.0 = Release|Any CPU
{BCA498E6-22C7-4E3F-8862-A7FAA06652D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BCA498E6-22C7-4E3F-8862-A7FAA06652D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BCA498E6-22C7-4E3F-8862-A7FAA06652D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BCA498E6-22C7-4E3F-8862-A7FAA06652D1}.Release|Any CPU.Build.0 = Release|Any CPU
{DFC9B46A-BFA7-407D-B872-7104C78A0787}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DFC9B46A-BFA7-407D-B872-7104C78A0787}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DFC9B46A-BFA7-407D-B872-7104C78A0787}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DFC9B46A-BFA7-407D-B872-7104C78A0787}.Release|Any CPU.Build.0 = Release|Any CPU
{8C743361-B796-4A92-BD69-3B5DD734BA6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8C743361-B796-4A92-BD69-3B5DD734BA6F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8C743361-B796-4A92-BD69-3B5DD734BA6F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8C743361-B796-4A92-BD69-3B5DD734BA6F}.Release|Any CPU.Build.0 = Release|Any CPU
{16FEFD31-B0D6-4291-B620-F902A16F39DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{16FEFD31-B0D6-4291-B620-F902A16F39DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{16FEFD31-B0D6-4291-B620-F902A16F39DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{16FEFD31-B0D6-4291-B620-F902A16F39DC}.Release|Any CPU.Build.0 = Release|Any CPU
{573C617F-6BB2-403A-AD87-E00A7FD537F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{573C617F-6BB2-403A-AD87-E00A7FD537F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{573C617F-6BB2-403A-AD87-E00A7FD537F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{573C617F-6BB2-403A-AD87-E00A7FD537F0}.Release|Any CPU.Build.0 = Release|Any CPU
{F422398C-72CD-43EA-AC8E-E0DBD08E5563}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F422398C-72CD-43EA-AC8E-E0DBD08E5563}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F422398C-72CD-43EA-AC8E-E0DBD08E5563}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F422398C-72CD-43EA-AC8E-E0DBD08E5563}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -510,6 +574,16 @@ Global
{8A41B37E-0732-4F28-B214-A44233B447FE} = {92F8E9A2-903E-4025-99BC-7DC478D5466D}
{BCB42780-C559-40B6-8C4A-85EBC464AAA8} = {FF69998C-C661-4EF0-804B-845675B3602E}
{A7D0995D-0516-4975-ABBD-EB93E1B79292} = {C9F82701-0E0F-4E61-B05B-AE387E7631F6}
{9164E0BA-0846-4839-BA0F-C25F5FBE056C} = {6AEE1440-FDF0-4729-8196-B24D0E333550}
{29B9F157-3733-471E-A11E-A5FF3C6D1348} = {6AEE1440-FDF0-4729-8196-B24D0E333550}
{60763BAA-C963-4858-8DA1-78DB92428865} = {6AEE1440-FDF0-4729-8196-B24D0E333550}
{1B30B69C-A4E3-4660-9CA8-140D0C34B4A5} = {6AEE1440-FDF0-4729-8196-B24D0E333550}
{BCA498E6-22C7-4E3F-8862-A7FAA06652D1} = {6AEE1440-FDF0-4729-8196-B24D0E333550}
{DFC9B46A-BFA7-407D-B872-7104C78A0787} = {6AEE1440-FDF0-4729-8196-B24D0E333550}
{8C743361-B796-4A92-BD69-3B5DD734BA6F} = {6AEE1440-FDF0-4729-8196-B24D0E333550}
{16FEFD31-B0D6-4291-B620-F902A16F39DC} = {BB874DF1-44FE-415A-B634-A6B829107890}
{573C617F-6BB2-403A-AD87-E00A7FD537F0} = {BB874DF1-44FE-415A-B634-A6B829107890}
{F422398C-72CD-43EA-AC8E-E0DBD08E5563} = {BB874DF1-44FE-415A-B634-A6B829107890}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {31E0F4D5-975A-41CC-933E-545B2201FAF9}

Просмотреть файл

@ -12,7 +12,7 @@
<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" PrivateAssets="all" />
<AdditionalFiles Include="$(RepositoryEngineeringDir)stylecop.json" Link="stylecop.json" />
<PackageReference Include="StyleCop.Analyzers" PrivateAsset="all" />
<PackageReference Include="StyleCop.Analyzers" PrivateAssets="all" />
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" PrivateAssets="all" />
</ItemGroup>

Просмотреть файл

@ -7,9 +7,8 @@
<ItemGroup Condition=" '$(OS)' != 'Windows_NT' ">
<ProjectToBuild Include="$(RepoRoot)src/**/*.csproj" />
<ProjectToBuild Include="$(RepoRoot)test/UnitTests/MSTest.Analyzers.UnitTests/MSTest.Analyzers.UnitTests.csproj" />
<ProjectToBuild Include="$(RepoRoot)test/UnitTests/Microsoft.Testing.Platform.UnitTests/Microsoft.Testing.Platform.UnitTests.csproj" />
<ProjectToBuild Include="$(RepoRoot)test/*/Microsoft.Testing.*/Microsoft.Testing.*.csproj" />
<ProjectToBuild Include="$(RepoRoot)test/IntegrationTests/MSTest.Acceptance.IntegrationTests/MSTest.Acceptance.IntegrationTests.csproj" />
<ProjectToBuild Include="$(RepoRoot)test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests.csproj" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,7 +1,9 @@
<Project>
<PropertyGroup Label="Version settings">
<!-- This repo version -->
<!-- MSTest version -->
<VersionPrefix>3.5.0</VersionPrefix>
<!-- Testing Platform version -->
<TestingPlatformVersionPrefix>1.3.0</TestingPlatformVersionPrefix>
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
</PropertyGroup>
<PropertyGroup Label="MSTest prod dependencies - darc updated">

Просмотреть файл

@ -1,4 +1,4 @@
<Project>
<Project>
<!-- SDK top import -->
<Import Project="Sdk.props" Sdk="MSBuild.Sdk.Extras" Condition=" '$(OS)' == 'Windows_NT' " />
@ -44,12 +44,12 @@
<ItemGroup>
<ProjectReference Include="$(RepoRoot)src\Adapter\MSTestAdapter.PlatformServices\MSTestAdapter.PlatformServices.csproj" />
<ProjectReference Include="$(RepoRoot)src\Platform\Microsoft.Testing.Extensions.VSTestBridge\Microsoft.Testing.Extensions.VSTestBridge.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.TestPlatform.AdapterUtilities" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" />
<PackageReference Include="Microsoft.Testing.Extensions.VSTestBridge" />
</ItemGroup>
<ItemGroup>
@ -76,7 +76,7 @@
<NuspecProperty Include="RepoRoot=$(RepoRoot)" />
<NuspecProperty Include="ArtifactsBinDir=$(ArtifactsBinDir)" />
<NuspecProperty Include="Configuration=$(Configuration)" />
<NuspecProperty Include="TestingPlatformVersion=$(MicrosoftTestingPlatformVersion)" />
<NuspecProperty Include="TestingPlatformVersion=$(Version.Replace('$(VersionPrefix)', '$(TestingPlatformVersionPrefix)'))" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -5,4 +5,5 @@
<PropertyGroup>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

Просмотреть файл

@ -35,7 +35,7 @@
</ItemGroup>
<Target Name="GenerateTemplates" AfterTargets="PrepareForBuild">
<PropertyGroup>
<_TemplateProperties>MSTestEngineVersion=$(MSTestEngineVersion);MSTestVersion=$(Version);MicrosoftTestingPlatformVersion=$(MicrosoftTestingPlatformVersion);MicrosoftNETTestSdkVersion=$(MicrosoftNETTestSdkVersion);MicrosoftTestingExtensionsCodeCoverageVersion=$(MicrosoftTestingExtensionsCodeCoverageVersion);MicrosoftPlaywrightVersion=$(MicrosoftPlaywrightVersion);AspireHostingTestingVersion=$(AspireHostingTestingVersion)</_TemplateProperties>
<_TemplateProperties>MSTestEngineVersion=$(MSTestEngineVersion);MSTestVersion=$(Version);MicrosoftTestingPlatformVersion=$(Version.Replace('$(VersionPrefix)', '$(TestingPlatformVersionPrefix)'));MicrosoftTestingExtensionsVersion=$(MicrosoftTestingPlatformVersion);MicrosoftNETTestSdkVersion=$(MicrosoftNETTestSdkVersion);MicrosoftTestingExtensionsCodeCoverageVersion=$(MicrosoftTestingExtensionsCodeCoverageVersion);MicrosoftPlaywrightVersion=$(MicrosoftPlaywrightVersion);AspireHostingTestingVersion=$(AspireHostingTestingVersion)</_TemplateProperties>
</PropertyGroup>
<!--
@ -51,5 +51,5 @@
<Output TaskParameter="ResolvedOutputPath" ItemName="FileWrites" />
</GenerateFileFromTemplate>
</Target>
</Project>

Просмотреть файл

@ -11,11 +11,11 @@
<PropertyGroup>
<!-- Hot Reload -->
<EnableMicrosoftTestingExtensionsHotReload Condition=" '$(EnableMicrosoftTestingExtensionsHotReload)' != 'false' and '$(TestingExtensionsProfile)' == 'AllMicrosoft' " >true</EnableMicrosoftTestingExtensionsHotReload>
<MicrosoftTestingExtensionsHotReloadVersion Condition=" '$(MicrosoftTestingExtensionsHotReloadVersion)' == '' " >$(MicrosoftTestingExtensionsCommonVersion)</MicrosoftTestingExtensionsHotReloadVersion>
<MicrosoftTestingExtensionsHotReloadVersion Condition=" '$(MicrosoftTestingExtensionsHotReloadVersion)' == '' " >$(MicrosoftTestingExtensionsVersion)</MicrosoftTestingExtensionsHotReloadVersion>
<!-- Retry -->
<EnableMicrosoftTestingExtensionsRetry Condition=" '$(EnableMicrosoftTestingExtensionsRetry)' != 'false' and '$(TestingExtensionsProfile)' == 'AllMicrosoft' " >true</EnableMicrosoftTestingExtensionsRetry>
<MicrosoftTestingExtensionsRetryVersion Condition=" '$(MicrosoftTestingExtensionsRetryVersion)' == '' " >$(MicrosoftTestingExtensionsCommonVersion)</MicrosoftTestingExtensionsRetryVersion>
<MicrosoftTestingExtensionsRetryVersion Condition=" '$(MicrosoftTestingExtensionsRetryVersion)' == '' " >$(MicrosoftTestingExtensionsVersion)</MicrosoftTestingExtensionsRetryVersion>
<!-- Crash dump -->
<EnableMicrosoftTestingExtensionsCrashDump Condition=" '$(EnableMicrosoftTestingExtensionsCrashDump)' != 'false' and '$(TestingExtensionsProfile)' == 'AllMicrosoft' " >true</EnableMicrosoftTestingExtensionsCrashDump>
@ -29,9 +29,18 @@
<!-- Core -->
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNETTestSdkVersion)" VersionOverride="$(MicrosoftNETTestSdkVersion)" Sdk="MSTest" />
<!--
Most of the times this dependency is not required but we leave the opportunity to align the version of the platform being used.
At the moment this is mainly used for our acceptance tests because the locally/CI built version ends with -dev or -ci which is
considered by NuGet resolver as older than any -preview version. Using this property we can ensure the local version is being
selected.
-->
<PackageReference Include="Microsoft.Testing.Platform" Version="$(MicrosoftTestingPlatformVersion)" VersionOverride="$(MicrosoftTestingPlatformVersion)" Sdk="MSTest"
Condition=" '$(EnableMicrosoftTestingPlatform)' == 'true' " />
<PackageReference Include="MSTest.TestAdapter" Version="$(MSTestVersion)" VersionOverride="$(MSTestVersion)" Sdk="MSTest" />
<PackageReference Include="MSTest.TestFramework" Version="$(MSTestVersion)" VersionOverride="$(MSTestVersion)" Sdk="MSTest" />
<PackageReference Include="MSTest.Analyzers" Version="$(MSTestVersion)" VersionOverride="$(MSTestVersion)" Condition=" '$(EnableMSTestAnalyzers)' != 'false' " Sdk="MSTest" />
<PackageReference Include="MSTest.Analyzers" Version="$(MSTestVersion)" VersionOverride="$(MSTestVersion)" Sdk="MSTest"
Condition=" '$(EnableMSTestAnalyzers)' != 'false' " />
</ItemGroup>
<!-- Extensions -->

Просмотреть файл

@ -16,6 +16,7 @@
<MicrosoftPlaywrightVersion Condition=" '$(MicrosoftPlaywrightVersion)' == '' ">${MicrosoftPlaywrightVersion}</MicrosoftPlaywrightVersion>
<MicrosoftTestingExtensionsCodeCoverageVersion Condition=" '$(MicrosoftTestingExtensionsCodeCoverageVersion)' == '' " >${MicrosoftTestingExtensionsCodeCoverageVersion}</MicrosoftTestingExtensionsCodeCoverageVersion>
<MicrosoftTestingPlatformVersion Condition=" '$(MicrosoftTestingPlatformVersion)' == '' " >${MicrosoftTestingPlatformVersion}</MicrosoftTestingPlatformVersion>
<MicrosoftTestingExtensionsVersion Condition=" '$(MicrosoftTestingExtensionsVersion)' == '' ">${MicrosoftTestingExtensionsVersion}</MicrosoftTestingExtensionsVersion>
</PropertyGroup>
</Project>

Просмотреть файл

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Import Project="../Directory.Build.props" />
<PropertyGroup>
<!-- Platform and extensions use TestingPlatform version, not MSTest version. -->
<VersionPrefix>$(TestingPlatformVersionPrefix)</VersionPrefix>
</PropertyGroup>
<!-- Build config -->
<PropertyGroup>
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">true</IsTrimmable>
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">true</IsAotCompatible>
<IsPackable>true</IsPackable>
</PropertyGroup>
<!-- Pack config -->
<PropertyGroup>
<CommonPackageTags>Microsoft test testing unittest unittesting unit-testing tdd</CommonPackageTags>
</PropertyGroup>
</Project>

Просмотреть файл

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Import Project="../../Directory.Build.targets" />
<!-- Pack config -->
<PropertyGroup>
<PackageTags Condition=" '$(PackageTags)' == '' ">$(CommonPackageTags)</PackageTags>
<PackageReadmeFile Condition=" '$(PackageReadmeFile)' == '' and Exists('PACKAGE.md') ">PACKAGE.md</PackageReadmeFile>
</PropertyGroup>
<!-- Add a package README file from. -->
<ItemGroup Condition=" '$(PackageReadmeFile)' != '' ">
<None Include="$(PackageReadmeFile)" Pack="true" PackagePath="\" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,10 @@
T:System.ArgumentNullException; Use 'ArgumentGuard' instead
P:System.DateTime.Now; Use 'IClock' instead
P:System.DateTime.UtcNow; Use 'IClock' instead
M:System.Threading.Tasks.Task.Run(System.Action); Use 'ITask' instead
M:System.Threading.Tasks.Task.WhenAll(System.Threading.Tasks.Task[]); Use 'ITask' instead
M:System.Threading.Tasks.Task.WhenAll(System.Collections.Generic.IEnumerable{System.Threading.Tasks.Task}); Use 'ITask' instead
M:System.String.IsNullOrEmpty(System.String); Use 'RoslynString.IsNullOrEmpty' instead
M:System.String.IsNullOrWhiteSpace(System.String); Use 'RoslynString.IsNullOrWhiteSpace' instead
M:System.Diagnostics.Debug.Assert(System.Boolean); Use 'RoslynDebug.Assert' instead
M:System.Diagnostics.Debug.Assert(System.Boolean,System.String); Use 'RoslynDebug.Assert' instead

Просмотреть файл

@ -0,0 +1,15 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#if USE_TRX_NAMESPACE
namespace Microsoft.Testing.Extensions.TrxReport;
#else
namespace Microsoft.Testing.Extensions.Diagnostics;
#endif
internal static class CrashDumpCommandLineOptions
{
public const string CrashDumpOptionName = "crashdump";
public const string CrashDumpFileNameOptionName = "crashdump-filename";
public const string CrashDumpTypeOptionName = "crashdump-type";
}

Просмотреть файл

@ -0,0 +1,51 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Globalization;
using Microsoft.Testing.Extensions.Diagnostics.Resources;
using Microsoft.Testing.Platform.CommandLine;
using Microsoft.Testing.Platform.Extensions;
using Microsoft.Testing.Platform.Extensions.CommandLine;
using Microsoft.Testing.Platform.Helpers;
namespace Microsoft.Testing.Extensions.Diagnostics;
internal sealed class CrashDumpCommandLineProvider : ICommandLineOptionsProvider
{
private static readonly string[] DumpTypeOptions = ["Mini", "Heap", "Triage", "Full"];
public string Uid => nameof(CrashDumpCommandLineProvider);
public string Version => AppVersion.DefaultSemVer;
public string DisplayName => CrashDumpResources.CrashDumpDisplayName;
public string Description => CrashDumpResources.CrashDumpDescription;
public Task<bool> IsEnabledAsync() => Task.FromResult(true);
public IReadOnlyCollection<CommandLineOption> GetCommandLineOptions()
=> new[]
{
new CommandLineOption(CrashDumpCommandLineOptions.CrashDumpOptionName, CrashDumpResources.CrashDumpOptionDescription, ArgumentArity.Zero, false),
new CommandLineOption(CrashDumpCommandLineOptions.CrashDumpFileNameOptionName, CrashDumpResources.CrashDumpFileNameOptionDescription, ArgumentArity.ExactlyOne, false),
new CommandLineOption(CrashDumpCommandLineOptions.CrashDumpTypeOptionName, CrashDumpResources.CrashDumpTypeOptionDescription, ArgumentArity.ExactlyOne, false),
};
public Task<ValidationResult> ValidateOptionArgumentsAsync(CommandLineOption commandOption, string[] arguments)
{
if (commandOption.Name == CrashDumpCommandLineOptions.CrashDumpTypeOptionName)
{
if (!DumpTypeOptions.Contains(arguments[0], StringComparer.OrdinalIgnoreCase))
{
return ValidationResult.InvalidTask(string.Format(CultureInfo.InvariantCulture, CrashDumpResources.CrashDumpTypeOptionInvalidType, arguments[0]));
}
}
return ValidationResult.ValidTask;
}
public Task<ValidationResult> ValidateCommandLineOptionsAsync(ICommandLineOptions commandLineOptions)
=> ValidationResult.ValidTask;
}

Просмотреть файл

@ -0,0 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.Testing.Extensions.Diagnostics;
internal sealed class CrashDumpConfiguration
{
public string? DumpFileNamePattern { get; set; }
public bool Enable { get; set; } = true;
}

Просмотреть файл

@ -0,0 +1,214 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Text;
using Microsoft.Testing.Extensions.Diagnostics.Resources;
using Microsoft.Testing.Platform.CommandLine;
using Microsoft.Testing.Platform.Configurations;
using Microsoft.Testing.Platform.Extensions;
using Microsoft.Testing.Platform.Extensions.TestHostControllers;
using Microsoft.Testing.Platform.Helpers;
using Microsoft.Testing.Platform.Logging;
using Microsoft.Testing.Platform.Messages;
using Microsoft.Testing.Platform.Services;
namespace Microsoft.Testing.Extensions.Diagnostics;
internal sealed class CrashDumpEnvironmentVariableProvider : ITestHostEnvironmentVariableProvider
{
private const string EnableMiniDumpVariable = "DbgEnableMiniDump";
private const string MiniDumpTypeVariable = "DbgMiniDumpType";
private const string MiniDumpNameVariable = "DbgMiniDumpName";
private const string CreateDumpDiagnosticsVariable = "CreateDumpDiagnostics";
private const string CreateDumpVerboseDiagnosticsVariable = "CreateDumpVerboseDiagnostics";
private const string EnableMiniDumpValue = "1";
private readonly string[] _prefixes = new[] { "DOTNET_", "COMPlus_" };
private readonly IConfiguration _configuration;
private readonly IMessageBus _messageBus;
private readonly ICommandLineOptions _commandLineOptions;
private readonly ITestApplicationModuleInfo _testApplicationModuleInfo;
private readonly CrashDumpConfiguration _crashDumpGeneratorConfiguration;
private readonly ILogger<CrashDumpEnvironmentVariableProvider> _logger;
private string? _miniDumpNameValue;
public CrashDumpEnvironmentVariableProvider(
IConfiguration configuration,
IMessageBus messageBus,
ICommandLineOptions commandLineOptions,
ITestApplicationModuleInfo testApplicationModuleInfo,
CrashDumpConfiguration crashDumpGeneratorConfiguration,
ILoggerFactory loggerFactory)
{
_logger = loggerFactory.CreateLogger<CrashDumpEnvironmentVariableProvider>();
_configuration = configuration;
_messageBus = messageBus;
_commandLineOptions = commandLineOptions;
_testApplicationModuleInfo = testApplicationModuleInfo;
_crashDumpGeneratorConfiguration = crashDumpGeneratorConfiguration;
}
/// <inheritdoc />
public string Uid => nameof(CrashDumpEnvironmentVariableProvider);
/// <inheritdoc />
public string Version => AppVersion.DefaultSemVer;
/// <inheritdoc />
public string DisplayName => CrashDumpResources.CrashDumpDisplayName;
/// <inheritdoc />
public string Description => CrashDumpResources.CrashDumpDescription;
/// <inheritdoc />
public Task<bool> IsEnabledAsync()
=> Task.FromResult(_commandLineOptions.IsOptionSet(CrashDumpCommandLineOptions.CrashDumpOptionName) && _crashDumpGeneratorConfiguration.Enable);
public Task UpdateAsync(IEnvironmentVariables environmentVariables)
{
foreach (string prefix in _prefixes)
{
environmentVariables.SetVariable(new($"{prefix}{EnableMiniDumpVariable}", EnableMiniDumpValue, false, true));
environmentVariables.SetVariable(new($"{prefix}{CreateDumpDiagnosticsVariable}", EnableMiniDumpValue, false, true));
environmentVariables.SetVariable(new($"{prefix}{CreateDumpVerboseDiagnosticsVariable}", EnableMiniDumpValue, false, true));
}
string miniDumpTypeValue = "4";
if (_commandLineOptions.TryGetOptionArgumentList(CrashDumpCommandLineOptions.CrashDumpTypeOptionName, out string[]? dumpTypeString))
{
switch (dumpTypeString[0].ToLowerInvariant().Trim())
{
case "mini":
{
miniDumpTypeValue = "1";
break;
}
case "heap":
{
miniDumpTypeValue = "2";
break;
}
case "triage":
{
miniDumpTypeValue = "3";
break;
}
case "full":
{
miniDumpTypeValue = "4";
break;
}
default:
{
miniDumpTypeValue = dumpTypeString[0];
break;
}
}
}
foreach (string prefix in _prefixes)
{
environmentVariables.SetVariable(new($"{prefix}{MiniDumpTypeVariable}", miniDumpTypeValue, false, true));
}
_miniDumpNameValue = _commandLineOptions.TryGetOptionArgumentList(CrashDumpCommandLineOptions.CrashDumpFileNameOptionName, out string[]? dumpFileName)
? Path.Combine(_configuration.GetTestResultDirectory(), dumpFileName[0])
: Path.Combine(_configuration.GetTestResultDirectory(), $"{Path.GetFileName(_testApplicationModuleInfo.GetCurrentTestApplicationFullPath())}_%p_crash.dmp");
_crashDumpGeneratorConfiguration.DumpFileNamePattern = _miniDumpNameValue;
foreach (string prefix in _prefixes)
{
environmentVariables.SetVariable(new($"{prefix}{MiniDumpNameVariable}", _miniDumpNameValue, false, true));
}
if (_logger.IsEnabled(LogLevel.Trace))
{
_logger.LogTrace($"{MiniDumpNameVariable}: {_miniDumpNameValue}");
_logger.LogTrace($"{MiniDumpTypeVariable}: {miniDumpTypeValue}");
}
return Task.CompletedTask;
}
public Task<ValidationResult> ValidateTestHostEnvironmentVariablesAsync(IReadOnlyEnvironmentVariables environmentVariables)
{
StringBuilder errors = new();
#if !NETCOREAPP
return ValidationResult.InvalidTask(CrashDumpResources.CrashDumpNotSupportedInNonNetCoreErrorMessage);
#else
foreach (string prefix in _prefixes)
{
if (!environmentVariables.TryGetVariable($"{prefix}{EnableMiniDumpVariable}", out OwnedEnvironmentVariable? enableMiniDump)
|| enableMiniDump.Value != EnableMiniDumpValue)
{
AddError(errors, $"{prefix}{EnableMiniDumpVariable}", EnableMiniDumpValue, enableMiniDump?.Value);
}
}
foreach (string prefix in _prefixes)
{
if (!environmentVariables.TryGetVariable($"{prefix}{CreateDumpDiagnosticsVariable}", out OwnedEnvironmentVariable? enableMiniDump)
|| enableMiniDump.Value != EnableMiniDumpValue)
{
AddError(errors, $"{prefix}{CreateDumpDiagnosticsVariable}", EnableMiniDumpValue, enableMiniDump?.Value);
}
}
foreach (string prefix in _prefixes)
{
if (!environmentVariables.TryGetVariable($"{prefix}{CreateDumpVerboseDiagnosticsVariable}", out OwnedEnvironmentVariable? enableMiniDump)
|| enableMiniDump.Value != EnableMiniDumpValue)
{
AddError(errors, $"{prefix}{CreateDumpVerboseDiagnosticsVariable}", EnableMiniDumpValue, enableMiniDump?.Value);
}
}
foreach (string prefix in _prefixes)
{
if (!environmentVariables.TryGetVariable($"{prefix}{MiniDumpTypeVariable}", out OwnedEnvironmentVariable? miniDumpType))
{
AddError(errors, $"{prefix}{MiniDumpTypeVariable}", "Valid values are 1, 2, 3, 4", miniDumpType?.Value);
}
else
{
if (miniDumpType is null || miniDumpType.Value is null)
{
throw new InvalidOperationException("Unexpected missing MiniDumpTypeVariable variable");
}
if (!miniDumpType.Value.Equals("1", StringComparison.OrdinalIgnoreCase) &&
!miniDumpType.Value.Equals("2", StringComparison.OrdinalIgnoreCase) &&
!miniDumpType.Value.Equals("3", StringComparison.OrdinalIgnoreCase) &&
!miniDumpType.Value.Equals("4", StringComparison.OrdinalIgnoreCase))
{
AddError(errors, $"{prefix}{MiniDumpTypeVariable}", "Valid values are 1, 2, 3, 4", miniDumpType?.Value);
}
}
}
foreach (string prefix in _prefixes)
{
if (!environmentVariables.TryGetVariable($"{prefix}{MiniDumpNameVariable}", out OwnedEnvironmentVariable? miniDumpName)
|| miniDumpName.Value != _miniDumpNameValue)
{
AddError(errors, $"{prefix}{MiniDumpNameVariable}", _miniDumpNameValue, miniDumpName?.Value);
}
}
return Task.FromResult(errors.Length > 0 ? ValidationResult.Invalid(errors.ToString()) : ValidationResult.Valid());
static void AddError(StringBuilder errors, string variableName, string? expectedValue, string? actualValue)
{
string actualValueString = actualValue ?? "<null>";
errors.AppendLine(string.Format(System.Globalization.CultureInfo.InvariantCulture, CrashDumpResources.CrashDumpInvalidEnvironmentVariableValueErrorMessage, variableName, expectedValue, actualValueString));
}
#endif
}
}

Просмотреть файл

@ -0,0 +1,41 @@
// 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.Extensions.Diagnostics;
using Microsoft.Testing.Platform.Builder;
using Microsoft.Testing.Platform.Services;
namespace Microsoft.Testing.Extensions;
public static class CrashDumpExtensions
{
public static void AddCrashDumpProvider(this ITestApplicationBuilder builder, bool ignoreIfNotSupported = false)
{
CrashDumpConfiguration crashDumpGeneratorConfiguration = new();
if (ignoreIfNotSupported)
{
#if !NETCOREAPP
crashDumpGeneratorConfiguration.Enable = false;
#endif
}
builder.TestHostControllers.AddEnvironmentVariableProvider(serviceProvider
=> new CrashDumpEnvironmentVariableProvider(
serviceProvider.GetConfiguration(),
serviceProvider.GetMessageBus(),
serviceProvider.GetCommandLineOptions(),
serviceProvider.GetTestApplicationModuleInfo(),
crashDumpGeneratorConfiguration,
serviceProvider.GetLoggerFactory()));
builder.TestHostControllers.AddProcessLifetimeHandler(serviceProvider
=> new CrashDumpProcessLifetimeHandler(
serviceProvider.GetCommandLineOptions(),
serviceProvider.GetMessageBus(),
serviceProvider.GetOutputDevice(),
crashDumpGeneratorConfiguration));
builder.CommandLine.AddProvider(() => new CrashDumpCommandLineProvider());
}
}

Просмотреть файл

@ -0,0 +1,84 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Globalization;
using Microsoft.Testing.Extensions.Diagnostics.Resources;
using Microsoft.Testing.Platform.CommandLine;
using Microsoft.Testing.Platform.Extensions.Messages;
using Microsoft.Testing.Platform.Extensions.OutputDevice;
using Microsoft.Testing.Platform.Extensions.TestHostControllers;
using Microsoft.Testing.Platform.Helpers;
using Microsoft.Testing.Platform.Messages;
using Microsoft.Testing.Platform.OutputDevice;
namespace Microsoft.Testing.Extensions.Diagnostics;
internal sealed class CrashDumpProcessLifetimeHandler : ITestHostProcessLifetimeHandler, IDataProducer, IOutputDeviceDataProducer
{
private readonly ICommandLineOptions _commandLineOptions;
private readonly IMessageBus _messageBus;
private readonly IOutputDevice _outputDisplay;
private readonly CrashDumpConfiguration _netCoreCrashDumpGeneratorConfiguration;
public CrashDumpProcessLifetimeHandler(
ICommandLineOptions commandLineOptions,
IMessageBus messageBus,
IOutputDevice outputDisplay,
CrashDumpConfiguration netCoreCrashDumpGeneratorConfiguration)
{
_commandLineOptions = commandLineOptions;
_messageBus = messageBus;
_outputDisplay = outputDisplay;
_netCoreCrashDumpGeneratorConfiguration = netCoreCrashDumpGeneratorConfiguration;
}
/// <inheritdoc />
public string Uid => nameof(CrashDumpProcessLifetimeHandler);
/// <inheritdoc />
public string Version => AppVersion.DefaultSemVer;
/// <inheritdoc />
public string DisplayName => CrashDumpResources.CrashDumpDisplayName;
/// <inheritdoc />
public string Description => CrashDumpResources.CrashDumpDescription;
public Type[] DataTypesProduced => new[] { typeof(FileArtifact) };
public Task<bool> IsEnabledAsync()
=> Task.FromResult(_commandLineOptions.IsOptionSet(CrashDumpCommandLineOptions.CrashDumpOptionName)
&& _netCoreCrashDumpGeneratorConfiguration.Enable);
public Task BeforeTestHostProcessStartAsync(CancellationToken _) => Task.CompletedTask;
public Task OnTestHostProcessStartedAsync(ITestHostProcessInformation testHostProcessInformation, CancellationToken cancellation) => Task.CompletedTask;
public async Task OnTestHostProcessExitedAsync(ITestHostProcessInformation testHostProcessInformation, CancellationToken cancellation)
{
if (cancellation.IsCancellationRequested
|| testHostProcessInformation.HasExitedGracefully
|| (AppDomain.CurrentDomain.GetData("ProcessKilledByHangDump") is string processKilledByHangDump && processKilledByHangDump == "true"))
{
return;
}
ApplicationStateGuard.Ensure(_netCoreCrashDumpGeneratorConfiguration.DumpFileNamePattern is not null);
await _outputDisplay.DisplayAsync(this, FormattedTextOutputDeviceDataBuilder.CreateRedConsoleColorText(string.Format(CultureInfo.InvariantCulture, CrashDumpResources.CrashDumpProcessCrashedDumpFileCreated, testHostProcessInformation.PID)));
string expectedDumpFile = _netCoreCrashDumpGeneratorConfiguration.DumpFileNamePattern.Replace("%p", testHostProcessInformation.PID.ToString(CultureInfo.InvariantCulture));
if (File.Exists(expectedDumpFile))
{
await _messageBus.PublishAsync(this, new FileArtifact(new FileInfo(expectedDumpFile), CrashDumpResources.CrashDumpArtifactDisplayName, CrashDumpResources.CrashDumpArtifactDescription));
}
else
{
await _outputDisplay.DisplayAsync(this, FormattedTextOutputDeviceDataBuilder.CreateRedConsoleColorText(string.Format(CultureInfo.InvariantCulture, CrashDumpResources.CannotFindExpectedCrashDumpFile, expectedDumpFile)));
foreach (string dumpFile in Directory.GetFiles(Path.GetDirectoryName(expectedDumpFile)!, "*.dmp"))
{
await _messageBus.PublishAsync(this, new FileArtifact(new FileInfo(dumpFile), CrashDumpResources.CrashDumpDisplayName, CrashDumpResources.CrashDumpArtifactDescription));
}
}
}
}

Просмотреть файл

@ -0,0 +1,65 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;$(MicrosoftTestingTargetFrameworks)</TargetFrameworks>
<RootNamespace>Microsoft.Testing.Extensions.Diagnostics</RootNamespace>
</PropertyGroup>
<!-- NuGet properties -->
<PropertyGroup>
<PackageDescription>
<![CDATA[Microsoft Testing is a set of platform, framework and protocol intended to make it possible to run any test on any target or device.
This package extends Microsoft Testing Platform to provide a crash dump functionality.]]>
</PackageDescription>
</PropertyGroup>
<!-- NuGet package layout -->
<!-- NuGet folders https://learn.microsoft.com/nuget/create-packages/creating-a-package#from-a-convention-based-working-directory -->
<ItemGroup>
<Content Include="buildMultiTargeting/**">
<Pack>true</Pack>
<PackagePath>buildMultiTargeting</PackagePath>
</Content>
<TfmSpecificPackageFile Include="buildTransitive/**">
<PackagePath>buildTransitive/$(TargetFramework)</PackagePath>
</TfmSpecificPackageFile>
<TfmSpecificPackageFile Include="build/**">
<PackagePath>build/$(TargetFramework)</PackagePath>
</TfmSpecificPackageFile>
</ItemGroup>
<ItemGroup>
<AdditionalFiles Include="BannedSymbols.txt" />
<AdditionalFiles Include="PublicAPI/PublicAPI.Shipped.txt" />
<AdditionalFiles Include="PublicAPI/PublicAPI.Unshipped.txt" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(RepoRoot)src\Platform\Microsoft.Testing.Platform\Microsoft.Testing.Platform.csproj" />
<ProjectReference Include="$(RepoRoot)src\Platform\Microsoft.Testing.Extensions.TrxReport.Abstractions\Microsoft.Testing.Extensions.TrxReport.Abstractions.csproj" />
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo Include="Microsoft.Testing.Extensions.VSTestBridge" Key="$(VsPublicKey)" />
<InternalsVisibleTo Include="Microsoft.Testing.Internal.Framework" Key="$(VsPublicKey)" />
<InternalsVisibleTo Include="Microsoft.Testing.Extensions.HangDump" Key="$(VsPublicKey)" />
<InternalsVisibleTo Include="Microsoft.Testing.Extensions.UnitTests" Key="$(VsPublicKey)" />
</ItemGroup>
<ItemGroup>
<Compile Update="Resources\CrashDumpResources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>CrashDumpResources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Resources\CrashDumpResources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>CrashDumpResources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,9 @@
# Microsoft.Testing
Microsoft Testing is a set of platform, framework and protocol intended to make it possible to run any test on any target or device.
Documentation can be found at <https://aka.ms/testingplatform>.
## About
This package extends Microsoft Testing Platform to provide a crash dump functionality.

Просмотреть файл

@ -0,0 +1,5 @@
#nullable enable
Microsoft.Testing.Extensions.CrashDump.TestingPlatformBuilderHook
Microsoft.Testing.Extensions.CrashDumpExtensions
static Microsoft.Testing.Extensions.CrashDump.TestingPlatformBuilderHook.AddExtensions(Microsoft.Testing.Platform.Builder.ITestApplicationBuilder! testApplicationBuilder, string![]! _) -> void
static Microsoft.Testing.Extensions.CrashDumpExtensions.AddCrashDumpProvider(this Microsoft.Testing.Platform.Builder.ITestApplicationBuilder! builder, bool ignoreIfNotSupported = false) -> void

Просмотреть файл

@ -0,0 +1 @@
#nullable enable

Просмотреть файл

@ -0,0 +1,190 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Microsoft.Testing.Extensions.Diagnostics.Resources {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class CrashDumpResources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal CrashDumpResources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Testing.Extensions.Diagnostics.Resources.CrashDumpResources", typeof(CrashDumpResources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to Expected crash dump file &apos;{0}&apos; could not be found, all files matching the &apos;*.dmp&apos; pattern will be copied to the result folder.
/// </summary>
internal static string CannotFindExpectedCrashDumpFile {
get {
return ResourceManager.GetString("CannotFindExpectedCrashDumpFile", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The testhost process crash dump file.
/// </summary>
internal static string CrashDumpArtifactDescription {
get {
return ResourceManager.GetString("CrashDumpArtifactDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Crash dump file.
/// </summary>
internal static string CrashDumpArtifactDisplayName {
get {
return ResourceManager.GetString("CrashDumpArtifactDisplayName", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to [net6.0+ only] Produce crash dump files when the test execution process crashes unexpectedly.
/// </summary>
internal static string CrashDumpDescription {
get {
return ResourceManager.GetString("CrashDumpDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Crash dump.
/// </summary>
internal static string CrashDumpDisplayName {
get {
return ResourceManager.GetString("CrashDumpDisplayName", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Specify the name of the dump file.
/// </summary>
internal static string CrashDumpFileNameOptionDescription {
get {
return ResourceManager.GetString("CrashDumpFileNameOptionDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Environment variable &apos;{0}&apos; should have been set to &apos;{1}&apos; but value is &apos;{2}&apos;.
/// </summary>
internal static string CrashDumpInvalidEnvironmentVariableValueErrorMessage {
get {
return ResourceManager.GetString("CrashDumpInvalidEnvironmentVariableValueErrorMessage", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Crash dump feature is only available in .NET (Core).
/// </summary>
internal static string CrashDumpNotSupportedInNonNetCoreErrorMessage {
get {
return ResourceManager.GetString("CrashDumpNotSupportedInNonNetCoreErrorMessage", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to [net6.0+ only] Generate a dump file if the test process crashes.
/// </summary>
internal static string CrashDumpOptionDescription {
get {
return ResourceManager.GetString("CrashDumpOptionDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Test host process with PID &apos;{0}&apos; crashed, a dump file was generated.
/// </summary>
internal static string CrashDumpProcessCrashedDumpFileCreated {
get {
return ResourceManager.GetString("CrashDumpProcessCrashedDumpFileCreated", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Specify the type of the dump. Valid values are &apos;Mini&apos;, &apos;Heap&apos;, &apos;Triage&apos; or &apos;Full&apos;. Default type is &apos;Full&apos;.
///For more information visit https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps.
/// </summary>
internal static string CrashDumpTypeOptionDescription {
get {
return ResourceManager.GetString("CrashDumpTypeOptionDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &apos;{0}&apos; is not a valid dump type. Valid options are &apos;Mini&apos;, &apos;Heap&apos;, &apos;Triage&apos; and &apos;Full&apos;.
/// </summary>
internal static string CrashDumpTypeOptionInvalidType {
get {
return ResourceManager.GetString("CrashDumpTypeOptionInvalidType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &apos;--crashdump-type&apos; expects a single dump type as argument (e.g. &apos;--crashdump-type Heap&apos;).
/// </summary>
internal static string CrashDumpTypeOptionTooManyArguments {
get {
return ResourceManager.GetString("CrashDumpTypeOptionTooManyArguments", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Requests of type &apos;{0}&apos; is not supported.
/// </summary>
internal static string UnsupportedRequestTypeErrorMessage {
get {
return ResourceManager.GetString("UnsupportedRequestTypeErrorMessage", resourceCulture);
}
}
}
}

Просмотреть файл

@ -0,0 +1,163 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="CannotFindExpectedCrashDumpFile" xml:space="preserve">
<value>Expected crash dump file '{0}' could not be found, all files matching the '*.dmp' pattern will be copied to the result folder</value>
</data>
<data name="CrashDumpArtifactDescription" xml:space="preserve">
<value>The testhost process crash dump file</value>
</data>
<data name="CrashDumpArtifactDisplayName" xml:space="preserve">
<value>Crash dump file</value>
</data>
<data name="CrashDumpDescription" xml:space="preserve">
<value>[net6.0+ only] Produce crash dump files when the test execution process crashes unexpectedly</value>
</data>
<data name="CrashDumpDisplayName" xml:space="preserve">
<value>Crash dump</value>
</data>
<data name="CrashDumpFileNameOptionDescription" xml:space="preserve">
<value>Specify the name of the dump file</value>
</data>
<data name="CrashDumpInvalidEnvironmentVariableValueErrorMessage" xml:space="preserve">
<value>Environment variable '{0}' should have been set to '{1}' but value is '{2}'</value>
</data>
<data name="CrashDumpNotSupportedInNonNetCoreErrorMessage" xml:space="preserve">
<value>Crash dump feature is only available in .NET (Core)</value>
</data>
<data name="CrashDumpOptionDescription" xml:space="preserve">
<value>[net6.0+ only] Generate a dump file if the test process crashes</value>
</data>
<data name="CrashDumpProcessCrashedDumpFileCreated" xml:space="preserve">
<value>Test host process with PID '{0}' crashed, a dump file was generated</value>
</data>
<data name="CrashDumpTypeOptionDescription" xml:space="preserve">
<value>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' or 'Full'. Default type is 'Full'.
For more information visit https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps</value>
</data>
<data name="CrashDumpTypeOptionInvalidType" xml:space="preserve">
<value>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' and 'Full'</value>
</data>
<data name="CrashDumpTypeOptionTooManyArguments" xml:space="preserve">
<value>'--crashdump-type' expects a single dump type as argument (e.g. '--crashdump-type Heap')</value>
</data>
<data name="UnsupportedRequestTypeErrorMessage" xml:space="preserve">
<value>Requests of type '{0}' is not supported</value>
</data>
</root>

Просмотреть файл

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="cs" original="../CrashDumpResources.resx">
<body>
<trans-unit id="CannotFindExpectedCrashDumpFile">
<source>Expected crash dump file '{0}' could not be found, all files matching the '*.dmp' pattern will be copied to the result folder</source>
<target state="translated">Nebyl nalezen očekávaný soubor výpisu stavu systému {0}. Všechny soubory odpovídající vzoru *.dmp budou zkopírovány do složky výsledků.</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpArtifactDescription">
<source>The testhost process crash dump file</source>
<target state="translated">Soubor výpisu stavu systému procesu testhost</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpArtifactDisplayName">
<source>Crash dump file</source>
<target state="translated">Soubor výpisu stavu systému</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpDescription">
<source>[net6.0+ only] Produce crash dump files when the test execution process crashes unexpectedly</source>
<target state="translated">[Pouze net6.0+ ] Vytvořit soubory výpisu stavu systému při neočekávaném chybovém ukončení procesu provádění testu</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpDisplayName">
<source>Crash dump</source>
<target state="translated">Výpis stavu systému</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpFileNameOptionDescription">
<source>Specify the name of the dump file</source>
<target state="translated">Zadejte název souboru výpisu paměti.</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpInvalidEnvironmentVariableValueErrorMessage">
<source>Environment variable '{0}' should have been set to '{1}' but value is '{2}'</source>
<target state="translated">Proměnná prostředí {0} by měla být nastavená na {1}, ale hodnota je {2}.</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpNotSupportedInNonNetCoreErrorMessage">
<source>Crash dump feature is only available in .NET (Core)</source>
<target state="translated">Funkce výpisu stavu systému je k dispozici pouze v rozhraní .NET (Core).</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpOptionDescription">
<source>[net6.0+ only] Generate a dump file if the test process crashes</source>
<target state="translated">[Pouze net6.0+ ] Vygenerovat soubor výpisu paměti v případě chybového ukončení procesu testu</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpProcessCrashedDumpFileCreated">
<source>Test host process with PID '{0}' crashed, a dump file was generated</source>
<target state="translated">Hostitelský proces testu s identifikátorem PID {0} byl chybově ukončen. Byl vygenerován soubor výpisu paměti.</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionDescription">
<source>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' or 'Full'. Default type is 'Full'.
For more information visit https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps</source>
<target state="translated">Zadejte typ výpisu paměti. Platné hodnoty jsou Mini, Heap, Triage nebo Full. Výchozí typ je Full.
Další informace najdete na https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionInvalidType">
<source>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' and 'Full'</source>
<target state="translated">{0} není platný typ výpisu paměti. Platné možnosti jsou Mini, Heap, Triage a Full.</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionTooManyArguments">
<source>'--crashdump-type' expects a single dump type as argument (e.g. '--crashdump-type Heap')</source>
<target state="translated">--hangdump-type očekává jako argument jeden typ výpisu paměti (například --hangdump-type Heap).</target>
<note />
</trans-unit>
<trans-unit id="UnsupportedRequestTypeErrorMessage">
<source>Requests of type '{0}' is not supported</source>
<target state="translated">Žádosti typu {0} nejsou podporovány.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Просмотреть файл

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="de" original="../CrashDumpResources.resx">
<body>
<trans-unit id="CannotFindExpectedCrashDumpFile">
<source>Expected crash dump file '{0}' could not be found, all files matching the '*.dmp' pattern will be copied to the result folder</source>
<target state="translated">Die erwartete Absturzabbilddatei "{0}" wurde nicht gefunden. Alle Dateien, die dem Muster "*.dmp" entsprechen, werden in den Ergebnisordner kopiert</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpArtifactDescription">
<source>The testhost process crash dump file</source>
<target state="translated">Die Absturzabbilddatei für den Testhostprozess</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpArtifactDisplayName">
<source>Crash dump file</source>
<target state="translated">Absturzabbilddatei</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpDescription">
<source>[net6.0+ only] Produce crash dump files when the test execution process crashes unexpectedly</source>
<target state="translated">[nur net6.0+] Erstellen von Absturzabbilddateien, wenn der Testausführungsprozess unerwartet abstürzt</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpDisplayName">
<source>Crash dump</source>
<target state="translated">Absturzspeicherabbild</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpFileNameOptionDescription">
<source>Specify the name of the dump file</source>
<target state="translated">Namen der Speicherabbilddatei angeben</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpInvalidEnvironmentVariableValueErrorMessage">
<source>Environment variable '{0}' should have been set to '{1}' but value is '{2}'</source>
<target state="translated">Die Umgebungsvariable "{0}" hätte auf "{1}" festgelegt werden sollen, aber der Wert ist "{2}"</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpNotSupportedInNonNetCoreErrorMessage">
<source>Crash dump feature is only available in .NET (Core)</source>
<target state="translated">Das Absturzabbildfeature ist nur in .NET (Core) verfügbar</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpOptionDescription">
<source>[net6.0+ only] Generate a dump file if the test process crashes</source>
<target state="translated">[nur net6.0+] Speicherabbilddatei generieren, wenn der Testprozess abstürzt</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpProcessCrashedDumpFileCreated">
<source>Test host process with PID '{0}' crashed, a dump file was generated</source>
<target state="translated">Der Testhostprozess mit PID "{0}" ist abgestürzt. Es wurde eine Abbilddatei generiert</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionDescription">
<source>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' or 'Full'. Default type is 'Full'.
For more information visit https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps</source>
<target state="translated">Geben Sie den Typ des Speicherabbilds an. Gültige Werte sind "Mini", "Heap", "Triage" oder "Full". Der Standardtyp ist "Full".
Weitere Informationen finden Sie unter https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionInvalidType">
<source>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' and 'Full'</source>
<target state="translated">"{0}" ist kein gültiger Speicherabbildtyp. Gültige Optionen sind "Mini", "Heap", "Triage" und "Full"</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionTooManyArguments">
<source>'--crashdump-type' expects a single dump type as argument (e.g. '--crashdump-type Heap')</source>
<target state="translated">"--crashdump-type" erwartet einen einzelnen Speicherabbildtyp als Argument (z. B. "--crashdump-type Heap")</target>
<note />
</trans-unit>
<trans-unit id="UnsupportedRequestTypeErrorMessage">
<source>Requests of type '{0}' is not supported</source>
<target state="translated">Anforderungen vom Typ "{0}" werden nicht unterstützt</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Просмотреть файл

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="es" original="../CrashDumpResources.resx">
<body>
<trans-unit id="CannotFindExpectedCrashDumpFile">
<source>Expected crash dump file '{0}' could not be found, all files matching the '*.dmp' pattern will be copied to the result folder</source>
<target state="translated">No se encontró el '{0}' de archivo de volcado esperado. Todos los archivos que coincidan con el patrón "*.dmp" se copiarán en la carpeta de resultados.</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpArtifactDescription">
<source>The testhost process crash dump file</source>
<target state="translated">Archivo de volcado de memoria del proceso del host de pruebas</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpArtifactDisplayName">
<source>Crash dump file</source>
<target state="translated">Archivo de volcado de memoria</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpDescription">
<source>[net6.0+ only] Produce crash dump files when the test execution process crashes unexpectedly</source>
<target state="translated">[solo net6.0+ ] Generar archivos de volcado de memoria cuando el proceso de ejecución de pruebas se bloquea inesperadamente</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpDisplayName">
<source>Crash dump</source>
<target state="translated">Volcado de memoria</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpFileNameOptionDescription">
<source>Specify the name of the dump file</source>
<target state="translated">Especificar el nombre del archivo de volcado</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpInvalidEnvironmentVariableValueErrorMessage">
<source>Environment variable '{0}' should have been set to '{1}' but value is '{2}'</source>
<target state="translated">La variable de entorno '{0}' debe haberse establecido en '{1}' pero el valor es '{2}'</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpNotSupportedInNonNetCoreErrorMessage">
<source>Crash dump feature is only available in .NET (Core)</source>
<target state="translated">La característica de volcado de memoria solo está disponible en .NET (Core)</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpOptionDescription">
<source>[net6.0+ only] Generate a dump file if the test process crashes</source>
<target state="translated">[solo net6.0+ ] Generar un archivo de volcado si el proceso de prueba se bloquea</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpProcessCrashedDumpFileCreated">
<source>Test host process with PID '{0}' crashed, a dump file was generated</source>
<target state="translated">Se bloqueó el proceso de host de prueba con PID '{0}' y se generó un archivo de volcado</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionDescription">
<source>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' or 'Full'. Default type is 'Full'.
For more information visit https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps</source>
<target state="translated">Especifique el tipo de volcado. Los valores válidos son "Mini", "Heap", "Triage" o "Full". El tipo predeterminado es 'Full'.
Para obtener más información, visite https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionInvalidType">
<source>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' and 'Full'</source>
<target state="translated">'{0}' no es un tipo de volcado válido. Las opciones válidas son "Mini", "Montón", "Evaluación de prioridades" y "Completa"</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionTooManyArguments">
<source>'--crashdump-type' expects a single dump type as argument (e.g. '--crashdump-type Heap')</source>
<target state="translated">'--crashdump-type' espera un único tipo de volcado como argumento (por ejemplo, '--crashdump-type Heap')</target>
<note />
</trans-unit>
<trans-unit id="UnsupportedRequestTypeErrorMessage">
<source>Requests of type '{0}' is not supported</source>
<target state="translated">No se admiten solicitudes de tipo '{0}'</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Просмотреть файл

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="fr" original="../CrashDumpResources.resx">
<body>
<trans-unit id="CannotFindExpectedCrashDumpFile">
<source>Expected crash dump file '{0}' could not be found, all files matching the '*.dmp' pattern will be copied to the result folder</source>
<target state="translated">Le fichier de vidage sur incident attendu « {0} » n'a pas été trouvé, tous les fichiers correspondant au modèle « *.dmp » seront copiés dans le dossier de résultats.</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpArtifactDescription">
<source>The testhost process crash dump file</source>
<target state="translated">Le fichier de vidage sur incident du processus testhost</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpArtifactDisplayName">
<source>Crash dump file</source>
<target state="translated">Fichier de vidage sur incident</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpDescription">
<source>[net6.0+ only] Produce crash dump files when the test execution process crashes unexpectedly</source>
<target state="translated">[net6.0+ uniquement] Produire des fichiers de vidage sur incident lorsque le processus dexécution des tests se bloque de manière inattendue</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpDisplayName">
<source>Crash dump</source>
<target state="translated">Vidage sur incident</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpFileNameOptionDescription">
<source>Specify the name of the dump file</source>
<target state="translated">Spécifier le nom du fichier de vidage</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpInvalidEnvironmentVariableValueErrorMessage">
<source>Environment variable '{0}' should have been set to '{1}' but value is '{2}'</source>
<target state="translated">La variable denvironnement «{0}» doit avoir la valeur «{1}», mais la valeur est «{2}»</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpNotSupportedInNonNetCoreErrorMessage">
<source>Crash dump feature is only available in .NET (Core)</source>
<target state="translated">La fonctionnalité de vidage sur incident est disponible uniquement dans .NET (Core)</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpOptionDescription">
<source>[net6.0+ only] Generate a dump file if the test process crashes</source>
<target state="translated">[net6.0+ uniquement] Générer un fichier de vidage si le processus de test se bloque</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpProcessCrashedDumpFileCreated">
<source>Test host process with PID '{0}' crashed, a dump file was generated</source>
<target state="translated">Le processus hôte de test avec le PID «{0}» sest arrêté, un fichier de vidage a été généré</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionDescription">
<source>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' or 'Full'. Default type is 'Full'.
For more information visit https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps</source>
<target state="translated">Spécifiez le type de limage mémoire. Les valeurs valides sont « Mini », « Heap », « Triage » ou « Full ». Le type par défaut est « Full ».
Pour plus d'informations, visitez https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionInvalidType">
<source>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' and 'Full'</source>
<target state="translated">'{0}' nest pas un type de vidage valide. Les options valides sont « Mini », « Heap », « Triage » et « Full »</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionTooManyArguments">
<source>'--crashdump-type' expects a single dump type as argument (e.g. '--crashdump-type Heap')</source>
<target state="translated">'--crashdump-type' attend un seul type de dump comme argument (par exemple '--crashdump-type Heap')</target>
<note />
</trans-unit>
<trans-unit id="UnsupportedRequestTypeErrorMessage">
<source>Requests of type '{0}' is not supported</source>
<target state="translated">Les demandes de type «{0}» ne sont pas prises en charge</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Просмотреть файл

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="it" original="../CrashDumpResources.resx">
<body>
<trans-unit id="CannotFindExpectedCrashDumpFile">
<source>Expected crash dump file '{0}' could not be found, all files matching the '*.dmp' pattern will be copied to the result folder</source>
<target state="translated">Il file di dump di arresto anomalo '{0}' previsto non è stato trovato. Tutti i file corrispondenti al criterio '*.dmp' verranno copiati nella cartella dei risultati.</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpArtifactDescription">
<source>The testhost process crash dump file</source>
<target state="translated">File di dump di arresto anomalo del processo testhost</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpArtifactDisplayName">
<source>Crash dump file</source>
<target state="translated">File di dump di arresto anomalo del sistema</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpDescription">
<source>[net6.0+ only] Produce crash dump files when the test execution process crashes unexpectedly</source>
<target state="translated">[solo net6.0+] Generazione di file di dump di arresto anomalo quando il processo di esecuzione del test si arresta in modo imprevisto</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpDisplayName">
<source>Crash dump</source>
<target state="translated">Dump di arresto anomalo del sistema</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpFileNameOptionDescription">
<source>Specify the name of the dump file</source>
<target state="translated">Specificare il nome del file di dump</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpInvalidEnvironmentVariableValueErrorMessage">
<source>Environment variable '{0}' should have been set to '{1}' but value is '{2}'</source>
<target state="translated">La variabile di ambiente '{0}' avrebbe dovuto essere impostata su '{1}' ma il valore è '{2}'</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpNotSupportedInNonNetCoreErrorMessage">
<source>Crash dump feature is only available in .NET (Core)</source>
<target state="translated">La funzionalità dump di arresto anomalo del sistema è disponibile solo in .NET (Core)</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpOptionDescription">
<source>[net6.0+ only] Generate a dump file if the test process crashes</source>
<target state="translated">[solo net6.0+ ] Generazione di un file di dump in caso di arresto anomalo del processo di test</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpProcessCrashedDumpFileCreated">
<source>Test host process with PID '{0}' crashed, a dump file was generated</source>
<target state="translated">Il processo host di test con PID '{0}' si è arrestato in modo anomalo. È stato generato un file di dump</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionDescription">
<source>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' or 'Full'. Default type is 'Full'.
For more information visit https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps</source>
<target state="translated">Specificare il tipo di dump. I valori validi sono 'Mini', 'Heap', 'Triage' o 'Full'. Il tipo predefinito è 'Full'.
Per altre informazioni, visitare https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionInvalidType">
<source>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' and 'Full'</source>
<target state="translated">'{0}' non è un tipo di dump valido. Le opzioni valide sono 'Mini', 'Heap', 'Triage' e 'Full'</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionTooManyArguments">
<source>'--crashdump-type' expects a single dump type as argument (e.g. '--crashdump-type Heap')</source>
<target state="translated">'--crashdump-type' prevede un singolo tipo di dump come argomento (ad esempio '--crashdump-type Heap')</target>
<note />
</trans-unit>
<trans-unit id="UnsupportedRequestTypeErrorMessage">
<source>Requests of type '{0}' is not supported</source>
<target state="translated">Le richieste di tipo '{0}' non sono supportate</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Просмотреть файл

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ja" original="../CrashDumpResources.resx">
<body>
<trans-unit id="CannotFindExpectedCrashDumpFile">
<source>Expected crash dump file '{0}' could not be found, all files matching the '*.dmp' pattern will be copied to the result folder</source>
<target state="translated">予期されたクラッシュ ダンプ ファイル '{0}' が見つかりませんでした。'*.dmp' パターンに一致するすべてのファイルが結果フォルダーにコピーされます</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpArtifactDescription">
<source>The testhost process crash dump file</source>
<target state="translated">testhost プロセスのクラッシュ ダンプ ファイル</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpArtifactDisplayName">
<source>Crash dump file</source>
<target state="translated">クラッシュ ダンプ ファイル</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpDescription">
<source>[net6.0+ only] Produce crash dump files when the test execution process crashes unexpectedly</source>
<target state="translated">[net6.0+ のみ] テストの実行プロセスが予期せずクラッシュしたときにクラッシュ ダンプ ファイルを生成する</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpDisplayName">
<source>Crash dump</source>
<target state="translated">クラッシュ ダンプ</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpFileNameOptionDescription">
<source>Specify the name of the dump file</source>
<target state="translated">ダンプ ファイルの名前を指定する</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpInvalidEnvironmentVariableValueErrorMessage">
<source>Environment variable '{0}' should have been set to '{1}' but value is '{2}'</source>
<target state="translated">環境変数 '{0}' は '{1}' に設定する必要がありますが、値は '{2}' です</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpNotSupportedInNonNetCoreErrorMessage">
<source>Crash dump feature is only available in .NET (Core)</source>
<target state="translated">クラッシュ ダンプ機能は .NET (Core) でのみ使用できます</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpOptionDescription">
<source>[net6.0+ only] Generate a dump file if the test process crashes</source>
<target state="translated">[net6.0+ のみ] テスト プロセスがクラッシュした場合にダンプ ファイルを生成する</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpProcessCrashedDumpFileCreated">
<source>Test host process with PID '{0}' crashed, a dump file was generated</source>
<target state="translated">PID '{0}' のテスト ホスト プロセスがクラッシュしました。ダンプ ファイルが生成されました</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionDescription">
<source>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' or 'Full'. Default type is 'Full'.
For more information visit https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps</source>
<target state="translated">ダンプの型を指定します。有効な値は、'Mini'、'Heap'、'Triage'、または 'Full' です。既定の型は 'Full' です。
詳細については、https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps を参照してください</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionInvalidType">
<source>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' and 'Full'</source>
<target state="translated">'{0}' は有効なダンプの種類ではありません。有効なオプションは、'Mini'、'Heap'、'Triage'、'Full' です</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionTooManyArguments">
<source>'--crashdump-type' expects a single dump type as argument (e.g. '--crashdump-type Heap')</source>
<target state="translated">'--crashdump-type' には、引数として 1 つのダンプの型が必要です (例: '--crashdump-type Heap')</target>
<note />
</trans-unit>
<trans-unit id="UnsupportedRequestTypeErrorMessage">
<source>Requests of type '{0}' is not supported</source>
<target state="translated">型 '{0}' の要求はサポートされていません</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Просмотреть файл

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ko" original="../CrashDumpResources.resx">
<body>
<trans-unit id="CannotFindExpectedCrashDumpFile">
<source>Expected crash dump file '{0}' could not be found, all files matching the '*.dmp' pattern will be copied to the result folder</source>
<target state="translated">필요한 크래시 덤프 파일 '{0}'을(를) 찾을 수 없습니다. '*.dmp' 패턴과 일치하는 모든 파일이 결과 폴더에 복사됩니다.</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpArtifactDescription">
<source>The testhost process crash dump file</source>
<target state="translated">testhost 프로세스 크래시 덤프 파일</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpArtifactDisplayName">
<source>Crash dump file</source>
<target state="translated">크래시 덤프 파일</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpDescription">
<source>[net6.0+ only] Produce crash dump files when the test execution process crashes unexpectedly</source>
<target state="translated">[net6.0 이상만] 테스트 실행 프로세스가 예기치 않게 충돌할 때 크래시 덤프 파일 생성</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpDisplayName">
<source>Crash dump</source>
<target state="translated">크래시 덤프</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpFileNameOptionDescription">
<source>Specify the name of the dump file</source>
<target state="translated">덤프 파일의 이름 지정</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpInvalidEnvironmentVariableValueErrorMessage">
<source>Environment variable '{0}' should have been set to '{1}' but value is '{2}'</source>
<target state="translated">환경 변수 '{0}'은(는) '{1}'로 설정해야 하지만 값이 '{2}'입니다.</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpNotSupportedInNonNetCoreErrorMessage">
<source>Crash dump feature is only available in .NET (Core)</source>
<target state="translated">크래시 덤프 기능은 .NET(Core)에서만 사용할 수 있습니다.</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpOptionDescription">
<source>[net6.0+ only] Generate a dump file if the test process crashes</source>
<target state="translated">[net6.0 이상만] 테스트 프로세스가 충돌하는 경우 덤프 파일 생성</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpProcessCrashedDumpFileCreated">
<source>Test host process with PID '{0}' crashed, a dump file was generated</source>
<target state="translated">PID가 '{0}'인 테스트 호스트 프로세스가 충돌했습니다. 덤프 파일이 생성되었습니다.</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionDescription">
<source>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' or 'Full'. Default type is 'Full'.
For more information visit https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps</source>
<target state="translated">덤프 유형을 지정하십시오. 유효한 값은 'Mini', 'Heap', 'Triage' 또는 'Full'입니다. 기본 유형은 'Full'입니다.
자세한 내용은 https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps를 방문하세요.</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionInvalidType">
<source>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' and 'Full'</source>
<target state="translated">'{0}'은(는) 올바른 덤프 유형이 아닙니다. 유효한 옵션은 'Mini', 'Heap', 'Triage' 및 'Full'입니다.</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionTooManyArguments">
<source>'--crashdump-type' expects a single dump type as argument (e.g. '--crashdump-type Heap')</source>
<target state="translated">'--crashdump-type'에는 단일 덤프 유형이 인수로 필요합니다(예: '--crashdump-type Heap').</target>
<note />
</trans-unit>
<trans-unit id="UnsupportedRequestTypeErrorMessage">
<source>Requests of type '{0}' is not supported</source>
<target state="translated">'{0}' 유형의 요청은 지원되지 않습니다.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Просмотреть файл

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="pl" original="../CrashDumpResources.resx">
<body>
<trans-unit id="CannotFindExpectedCrashDumpFile">
<source>Expected crash dump file '{0}' could not be found, all files matching the '*.dmp' pattern will be copied to the result folder</source>
<target state="translated">Nie można odnaleźć oczekiwanego pliku zrzutu awaryjnego „{0}”. Wszystkie pliki zgodne ze wzorcem „*.dmp” zostaną skopiowane do folderu wyników</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpArtifactDescription">
<source>The testhost process crash dump file</source>
<target state="translated">Plik zrzutu awaryjnego procesu testhost</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpArtifactDisplayName">
<source>Crash dump file</source>
<target state="translated">Plik zrzutu awaryjnego</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpDescription">
<source>[net6.0+ only] Produce crash dump files when the test execution process crashes unexpectedly</source>
<target state="translated">[tylko net6.0+ ] Tworzenie plików zrzutu awaryjnego w przypadku nieoczekiwanej awarii procesu wykonywania testu</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpDisplayName">
<source>Crash dump</source>
<target state="translated">Zrzut awaryjny</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpFileNameOptionDescription">
<source>Specify the name of the dump file</source>
<target state="translated">Określ nazwę pliku zrzutu</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpInvalidEnvironmentVariableValueErrorMessage">
<source>Environment variable '{0}' should have been set to '{1}' but value is '{2}'</source>
<target state="translated">Zmienna środowiskowa „{0}” powinna być ustawiona na „{1}”, ale wartość to „{2}”</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpNotSupportedInNonNetCoreErrorMessage">
<source>Crash dump feature is only available in .NET (Core)</source>
<target state="translated">Funkcja zrzutu awaryjnego jest dostępna tylko na platformie .NET (Core)</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpOptionDescription">
<source>[net6.0+ only] Generate a dump file if the test process crashes</source>
<target state="translated">[tylko net6.0+ ] Wygeneruj plik zrzutu w przypadku awarii procesu testowego</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpProcessCrashedDumpFileCreated">
<source>Test host process with PID '{0}' crashed, a dump file was generated</source>
<target state="translated">Proces hosta testowego o identyfikatorze PID „{0}{0}” uległ awarii, wygenerowano plik zrzutu</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionDescription">
<source>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' or 'Full'. Default type is 'Full'.
For more information visit https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps</source>
<target state="translated">Określ typ zrzutu. Prawidłowe wartości to „Mini”, „Sterta”, „Klasyfikacja” i „Pełne” Typ domyślny to „Full”.
Aby uzyskać więcej informacji, odwiedź stronę https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionInvalidType">
<source>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' and 'Full'</source>
<target state="translated">Typ „{0}” nie jest prawidłowym typem zrzutu. Prawidłowe opcje to „Mini”, „Sterta”, „Klasyfikacja” i „Pełne”</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionTooManyArguments">
<source>'--crashdump-type' expects a single dump type as argument (e.g. '--crashdump-type Heap')</source>
<target state="translated">Element „--crashdump-type” oczekuje pojedynczego typu zrzutu jako argumentu (np. „--crashdump-type Heap”)</target>
<note />
</trans-unit>
<trans-unit id="UnsupportedRequestTypeErrorMessage">
<source>Requests of type '{0}' is not supported</source>
<target state="translated">Żądania typu „{0}” nie są obsługiwane</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Просмотреть файл

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="pt-BR" original="../CrashDumpResources.resx">
<body>
<trans-unit id="CannotFindExpectedCrashDumpFile">
<source>Expected crash dump file '{0}' could not be found, all files matching the '*.dmp' pattern will be copied to the result folder</source>
<target state="translated">O arquivo de despejo de memória ''{0}'' não pôde ser encontrado. Todos os arquivos correspondentes ao padrão ''*.dmp'' serão copiados para a pasta de resultados</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpArtifactDescription">
<source>The testhost process crash dump file</source>
<target state="translated">O arquivo de despejo de memória do processo testhost</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpArtifactDisplayName">
<source>Crash dump file</source>
<target state="translated">Arquivo de despejo de memória</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpDescription">
<source>[net6.0+ only] Produce crash dump files when the test execution process crashes unexpectedly</source>
<target state="translated">[somente net6.0+] Produzir arquivos de despejo de memória quando o processo de execução de teste falhar inesperadamente</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpDisplayName">
<source>Crash dump</source>
<target state="translated">Despejo de memória</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpFileNameOptionDescription">
<source>Specify the name of the dump file</source>
<target state="translated">Especifique o nome do arquivo de despejo</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpInvalidEnvironmentVariableValueErrorMessage">
<source>Environment variable '{0}' should have been set to '{1}' but value is '{2}'</source>
<target state="translated">A variável de ambiente ''{0}'' deveria ter sido definida como ''{1}'', mas o valor é ''{2}''</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpNotSupportedInNonNetCoreErrorMessage">
<source>Crash dump feature is only available in .NET (Core)</source>
<target state="translated">O recurso de despejo de memória só está disponível no .NET (Core)</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpOptionDescription">
<source>[net6.0+ only] Generate a dump file if the test process crashes</source>
<target state="translated">[somente net6.0+] Gerar um arquivo de despejo se o processo de teste falhar</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpProcessCrashedDumpFileCreated">
<source>Test host process with PID '{0}' crashed, a dump file was generated</source>
<target state="translated">O processo de host de teste com PID ''{0}'' falhou e um arquivo de despejo foi gerado</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionDescription">
<source>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' or 'Full'. Default type is 'Full'.
For more information visit https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps</source>
<target state="translated">Especifique o tipo de despejo. Os valores válidos são ''Mini'', ''Heap'', ''Triage'' ou ''Full''. O tipo padrão é ''Full''.
Para obter mais informações, visite https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionInvalidType">
<source>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' and 'Full'</source>
<target state="translated">''{0}'' não é um tipo de despejo válido. As opções válidas são ''Mini'', ''Heap'', ''Triage'' e ''Full''</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionTooManyArguments">
<source>'--crashdump-type' expects a single dump type as argument (e.g. '--crashdump-type Heap')</source>
<target state="translated">''--crashdump-type'' espera um único tipo de despejo como argumento (por exemplo, ''--crashdump-type Heap'')</target>
<note />
</trans-unit>
<trans-unit id="UnsupportedRequestTypeErrorMessage">
<source>Requests of type '{0}' is not supported</source>
<target state="translated">Não há suporte para solicitações de tipo ''{0}''</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Просмотреть файл

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ru" original="../CrashDumpResources.resx">
<body>
<trans-unit id="CannotFindExpectedCrashDumpFile">
<source>Expected crash dump file '{0}' could not be found, all files matching the '*.dmp' pattern will be copied to the result folder</source>
<target state="translated">Не удалось найти ожидаемый файл аварийного дампа "{0}". Все файлы, соответствующие шаблону "*.dmp", будут скопированы в папку результатов.</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpArtifactDescription">
<source>The testhost process crash dump file</source>
<target state="translated">Файл аварийного дампа тестового хост-процесса</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpArtifactDisplayName">
<source>Crash dump file</source>
<target state="translated">Файл аварийного дампа</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpDescription">
<source>[net6.0+ only] Produce crash dump files when the test execution process crashes unexpectedly</source>
<target state="translated">[только net6.0 и выше] Создавать файлы аварийного дампа при неожиданном сбое процесса выполнения теста</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpDisplayName">
<source>Crash dump</source>
<target state="translated">Аварийный дамп</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpFileNameOptionDescription">
<source>Specify the name of the dump file</source>
<target state="translated">Укажите имя файла дампа зависания</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpInvalidEnvironmentVariableValueErrorMessage">
<source>Environment variable '{0}' should have been set to '{1}' but value is '{2}'</source>
<target state="translated">Для переменной среды "{0}" должно быть задано значение "{1}", но задано значение "{2}"</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpNotSupportedInNonNetCoreErrorMessage">
<source>Crash dump feature is only available in .NET (Core)</source>
<target state="translated">Функция аварийного дампа доступна только в .NET (Core)</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpOptionDescription">
<source>[net6.0+ only] Generate a dump file if the test process crashes</source>
<target state="translated">[только net6.0 и выше] Создавать файл дампа в случае сбоя тестового процесса</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpProcessCrashedDumpFileCreated">
<source>Test host process with PID '{0}' crashed, a dump file was generated</source>
<target state="translated">Произошло аварийное завершение тестового хост-процесса с идентификатором процесса "{0}". Создан файл дампа</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionDescription">
<source>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' or 'Full'. Default type is 'Full'.
For more information visit https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps</source>
<target state="translated">Укажите тип дампа. Допустимые значения: "Mini", "Heap", "Triage" или "Full". Тип по умолчанию — "Full".
Дополнительные сведения см. по ссылке: https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionInvalidType">
<source>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' and 'Full'</source>
<target state="translated">"{0}" не является допустимым типом дампа. Допустимые параметры: "Mini", "Heap", "Triage" и "Full"</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionTooManyArguments">
<source>'--crashdump-type' expects a single dump type as argument (e.g. '--crashdump-type Heap')</source>
<target state="translated">"--hangdump-type" ожидает в качестве аргумента один тип дампа (например, "--crashdump-type Heap")</target>
<note />
</trans-unit>
<trans-unit id="UnsupportedRequestTypeErrorMessage">
<source>Requests of type '{0}' is not supported</source>
<target state="translated">Запросы типа "{0}" не поддерживаются</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Просмотреть файл

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="tr" original="../CrashDumpResources.resx">
<body>
<trans-unit id="CannotFindExpectedCrashDumpFile">
<source>Expected crash dump file '{0}' could not be found, all files matching the '*.dmp' pattern will be copied to the result folder</source>
<target state="translated">Beklenen kilitlenme dökümü dosyası '{0}' bulunamadı, '*.dmp' düzeniyle eşleşen tüm dosyalar sonuç klasörüne kopyalanacak</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpArtifactDescription">
<source>The testhost process crash dump file</source>
<target state="translated">Test ana bilgisayarı işlemi kilitlenme bilgi dökümü dosyası</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpArtifactDisplayName">
<source>Crash dump file</source>
<target state="translated">Kilitlenme bilgi dökümü dosyası</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpDescription">
<source>[net6.0+ only] Produce crash dump files when the test execution process crashes unexpectedly</source>
<target state="translated">[yalnızca net6.0+] Test yürütme işlemi beklenmedik bir şekilde çöktüğünde kilitlenme dökümü dosyaları oluştur</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpDisplayName">
<source>Crash dump</source>
<target state="translated">Kilitlenme bilgi dökümü</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpFileNameOptionDescription">
<source>Specify the name of the dump file</source>
<target state="translated">Döküm dosyasının adını belirtin</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpInvalidEnvironmentVariableValueErrorMessage">
<source>Environment variable '{0}' should have been set to '{1}' but value is '{2}'</source>
<target state="translated">Ortam değişkeni '{0}', '{1}' olarak ayarlanmalıydı ancak değer '{2}'</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpNotSupportedInNonNetCoreErrorMessage">
<source>Crash dump feature is only available in .NET (Core)</source>
<target state="translated">Kilitlenme dökümü özelliği yalnızca .NET'te (Core) mevcuttur</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpOptionDescription">
<source>[net6.0+ only] Generate a dump file if the test process crashes</source>
<target state="translated">[yalnızca net6.0+] Test işlemi çökerse bir döküm dosyası oluşturun</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpProcessCrashedDumpFileCreated">
<source>Test host process with PID '{0}' crashed, a dump file was generated</source>
<target state="translated">PID'li test ana işlemi {0}' kilitlendi, bir döküm dosyası oluşturuldu</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionDescription">
<source>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' or 'Full'. Default type is 'Full'.
For more information visit https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps</source>
<target state="translated">Dökümün türünü belirtin. Geçerli değerler: 'Mini', 'Heap', 'Triage' veya 'Full'dur. Varsayılan tür 'Tam'dır.
Daha fazla bilgi için https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps adresini ziyaret edin</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionInvalidType">
<source>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' and 'Full'</source>
<target state="translated">'{0}' geçerli bir döküm türü değil. Geçerli seçenekler 'Mini', 'Heap', 'Triage' ve 'Fulldur</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionTooManyArguments">
<source>'--crashdump-type' expects a single dump type as argument (e.g. '--crashdump-type Heap')</source>
<target state="translated">'--crashdump-type' argüman olarak tek bir döküm tipini bekler (örneğin, '--crashdump-type Heap')</target>
<note />
</trans-unit>
<trans-unit id="UnsupportedRequestTypeErrorMessage">
<source>Requests of type '{0}' is not supported</source>
<target state="translated">'{0}' türündeki istek desteklenmiyor</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Просмотреть файл

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="zh-Hans" original="../CrashDumpResources.resx">
<body>
<trans-unit id="CannotFindExpectedCrashDumpFile">
<source>Expected crash dump file '{0}' could not be found, all files matching the '*.dmp' pattern will be copied to the result folder</source>
<target state="translated">找不到预期的故障转储文件“{0}”,与“*.dmp”模式匹配的所有文件都将复制到结果文件夹</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpArtifactDescription">
<source>The testhost process crash dump file</source>
<target state="translated">testhost 进程故障转储文件</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpArtifactDisplayName">
<source>Crash dump file</source>
<target state="translated">故障转储文件</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpDescription">
<source>[net6.0+ only] Produce crash dump files when the test execution process crashes unexpectedly</source>
<target state="translated">[仅限 net6.0+]在测试执行进程意外崩溃时生成故障转储文件</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpDisplayName">
<source>Crash dump</source>
<target state="translated">故障转储</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpFileNameOptionDescription">
<source>Specify the name of the dump file</source>
<target state="translated">指定转储文件的名称</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpInvalidEnvironmentVariableValueErrorMessage">
<source>Environment variable '{0}' should have been set to '{1}' but value is '{2}'</source>
<target state="translated">环境变量“{0}”应设置为“{1}”,但值为“{2}”</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpNotSupportedInNonNetCoreErrorMessage">
<source>Crash dump feature is only available in .NET (Core)</source>
<target state="translated">故障转储功能仅在 .NET (Core) 中可用</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpOptionDescription">
<source>[net6.0+ only] Generate a dump file if the test process crashes</source>
<target state="translated">[仅限 net6.0+]如果测试进程崩溃,则生成转储文件</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpProcessCrashedDumpFileCreated">
<source>Test host process with PID '{0}' crashed, a dump file was generated</source>
<target state="translated">PID 为“{0}”的测试主机进程崩溃,生成了转储文件</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionDescription">
<source>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' or 'Full'. Default type is 'Full'.
For more information visit https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps</source>
<target state="translated">指定转储的类型。有效值为“Mini”、“Heap”、“Triage”或“Full”。默认类型为“Full”。
有关详细信息,请访问 https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionInvalidType">
<source>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' and 'Full'</source>
<target state="translated">“{0}”不是有效的转储类型。有效选项为“Mini”、“Heap”、“Triage”和“Full”</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionTooManyArguments">
<source>'--crashdump-type' expects a single dump type as argument (e.g. '--crashdump-type Heap')</source>
<target state="translated">“--crashdump-type”需要将单一转储类型作为参数(例如“--crashdump-type Heap”)</target>
<note />
</trans-unit>
<trans-unit id="UnsupportedRequestTypeErrorMessage">
<source>Requests of type '{0}' is not supported</source>
<target state="translated">不支持类型为“{0}”的请求</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Просмотреть файл

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="zh-Hant" original="../CrashDumpResources.resx">
<body>
<trans-unit id="CannotFindExpectedCrashDumpFile">
<source>Expected crash dump file '{0}' could not be found, all files matching the '*.dmp' pattern will be copied to the result folder</source>
<target state="translated">找不到預期的損毀傾印檔案 '{0}',符合 '*.dmp' 模式的所有檔案都將複製到結果資料夾</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpArtifactDescription">
<source>The testhost process crash dump file</source>
<target state="translated">testhost 處理常式損毀傾印檔案</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpArtifactDisplayName">
<source>Crash dump file</source>
<target state="translated">損毀傾印檔案</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpDescription">
<source>[net6.0+ only] Produce crash dump files when the test execution process crashes unexpectedly</source>
<target state="translated">[net6.0+ only] 測試執行流程意外損毀時會產生損毀傾印檔案</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpDisplayName">
<source>Crash dump</source>
<target state="translated">損毀傾印</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpFileNameOptionDescription">
<source>Specify the name of the dump file</source>
<target state="translated">指定傾印檔案的名稱</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpInvalidEnvironmentVariableValueErrorMessage">
<source>Environment variable '{0}' should have been set to '{1}' but value is '{2}'</source>
<target state="translated">環境變數 '{0}' 應該設定為 '{1}' 但值為 '{2}'</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpNotSupportedInNonNetCoreErrorMessage">
<source>Crash dump feature is only available in .NET (Core)</source>
<target state="translated">只有 .NET (Core) 才可使用損毀傾印功能</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpOptionDescription">
<source>[net6.0+ only] Generate a dump file if the test process crashes</source>
<target state="translated">[net6.0+ only] 如果測試流程損毀,則產生傾印檔案</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpProcessCrashedDumpFileCreated">
<source>Test host process with PID '{0}' crashed, a dump file was generated</source>
<target state="translated">PID '{0}' 損毀的測試主機處理常式,已產生傾印檔案</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionDescription">
<source>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' or 'Full'. Default type is 'Full'.
For more information visit https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps</source>
<target state="translated">指定傾印的類型。有效值為 'Mini'、'Heap'、'Triage' 或 'Full'。預設類型為 'Full'。
有關詳細資訊,請瀏覽 https://learn.microsoft.com/dotnet/core/diagnostics/collect-dumps-crash#types-of-mini-dumps</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionInvalidType">
<source>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' and 'Full'</source>
<target state="translated">'{0}' 不是有效的傾印類型。有效的選項為 'Mini'、'Heap'、'Triage' 和 'Full'</target>
<note />
</trans-unit>
<trans-unit id="CrashDumpTypeOptionTooManyArguments">
<source>'--crashdump-type' expects a single dump type as argument (e.g. '--crashdump-type Heap')</source>
<target state="translated">'--crashdump-type' 需要單一傾印類型做為引數 (例如 '--crashdump-type Heap')</target>
<note />
</trans-unit>
<trans-unit id="UnsupportedRequestTypeErrorMessage">
<source>Requests of type '{0}' is not supported</source>
<target state="translated">不支援類型 '{0}' 的要求</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Просмотреть файл

@ -0,0 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Microsoft.Testing.Platform.Builder;
namespace Microsoft.Testing.Extensions.CrashDump;
public static class TestingPlatformBuilderHook
{
public static void AddExtensions(ITestApplicationBuilder testApplicationBuilder, string[] _)
=> testApplicationBuilder.AddCrashDumpProvider(ignoreIfNotSupported: true);
}

Просмотреть файл

@ -0,0 +1,3 @@
<Project>
<Import Project="$(MSBuildThisFileDirectory)..\..\buildMultiTargeting\Microsoft.Testing.Extensions.CrashDump.props" />
</Project>

Просмотреть файл

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<Project>
<ItemGroup>
<!--
!!! IMPORTANT !!!
DO NOT CHANGE THE GUID, IT'S A WELL KNOWN EXTENSION POINT AND THIS EXTENSION NEEDS TO BE REGISTERED AT THE END
WE HAVE CODE INSIDE THE TASK 'TestingPlatformEntryPoint' TO ENSURE THE ORDER OF THE REGISTRATION BASED ON THIS GUID
-->
<TestingPlatformBuilderHook Include="EC3971EE-91B7-4C77-B4E1-DF606F118FAB" Condition=" '$(GenerateTestingPlatformEntryPoint)' == 'True' " >
<DisplayName>Microsoft.Testing.Extensions.CrashDump</DisplayName>
<TypeFullName>Microsoft.Testing.Extensions.CrashDump.TestingPlatformBuilderHook</TypeFullName>
</TestingPlatformBuilderHook>
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,3 @@
<Project>
<Import Project="$(MSBuildThisFileDirectory)..\..\buildMultiTargeting\Microsoft.Testing.Extensions.CrashDump.props" />
</Project>

Просмотреть файл

@ -0,0 +1,10 @@
T:System.ArgumentNullException; Use 'ArgumentGuard' instead
P:System.DateTime.Now; Use 'IClock' instead
P:System.DateTime.UtcNow; Use 'IClock' instead
M:System.Threading.Tasks.Task.Run(System.Action); Use 'ITask' instead
M:System.Threading.Tasks.Task.WhenAll(System.Threading.Tasks.Task[]); Use 'ITask' instead
M:System.Threading.Tasks.Task.WhenAll(System.Collections.Generic.IEnumerable{System.Threading.Tasks.Task}); Use 'ITask' instead
M:System.String.IsNullOrEmpty(System.String); Use 'RoslynString.IsNullOrEmpty' instead
M:System.String.IsNullOrWhiteSpace(System.String); Use 'RoslynString.IsNullOrWhiteSpace' instead
M:System.Diagnostics.Debug.Assert(System.Boolean); Use 'RoslynDebug.Assert' instead
M:System.Diagnostics.Debug.Assert(System.Boolean,System.String); Use 'RoslynDebug.Assert' instead

Просмотреть файл

@ -0,0 +1,301 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Collections.Concurrent;
using System.Globalization;
using Microsoft.Testing.Extensions.Diagnostics.Resources;
using Microsoft.Testing.Extensions.HangDump.Serializers;
using Microsoft.Testing.Platform.CommandLine;
using Microsoft.Testing.Platform.Extensions.Messages;
using Microsoft.Testing.Platform.Extensions.TestHost;
using Microsoft.Testing.Platform.Helpers;
using Microsoft.Testing.Platform.IPC;
using Microsoft.Testing.Platform.IPC.Models;
using Microsoft.Testing.Platform.IPC.Serializers;
using Microsoft.Testing.Platform.Logging;
using Microsoft.Testing.Platform.Services;
using Microsoft.Testing.Platform.TestHost;
namespace Microsoft.Testing.Extensions.Diagnostics;
internal sealed class HangDumpActivityIndicator : IDataConsumer, ITestSessionLifetimeHandler,
#if NETCOREAPP
IAsyncDisposable
#else
IDisposable
#endif
{
private readonly ICommandLineOptions _commandLineOptions;
private readonly IEnvironment _environment;
private readonly ITask _task;
private readonly IClock _clock;
private readonly ILogger<HangDumpActivityIndicator> _logger;
private readonly NamedPipeClient? _namedPipeClient;
private readonly ManualResetEventSlim _signalActivity = new(false);
private readonly ManualResetEventSlim _mutexCreated = new(false);
private readonly bool _traceLevelEnabled;
private readonly ConcurrentDictionary<string, (Type, DateTimeOffset)> _testsCurrentExecutionState = new();
private Task? _signalActivityIndicatorTask;
private Mutex? _activityIndicatorMutex;
private string? _mutexName;
private bool _exitSignalActivityIndicatorAsync;
private NamedPipeServer? _singleConnectionNamedPipeServer;
private PipeNameDescription? _pipeNameDescription;
private bool _sessionEndCalled;
public HangDumpActivityIndicator(
ICommandLineOptions commandLineOptions,
IEnvironment environment,
ITask task,
ITestApplicationModuleInfo testApplicationModuleInfo,
ILoggerFactory loggerFactory,
IClock clock)
{
_logger = loggerFactory.CreateLogger<HangDumpActivityIndicator>();
_traceLevelEnabled = _logger.IsEnabled(LogLevel.Trace);
_commandLineOptions = commandLineOptions;
_environment = environment;
_task = task;
_clock = clock;
if (_commandLineOptions.IsOptionSet(HangDumpCommandLineProvider.HangDumpOptionName) &&
!_commandLineOptions.IsOptionSet(PlatformCommandLineProvider.ServerOptionKey))
{
string namedPipeSuffix = _environment.GetEnvironmentVariable(HangDumpConfiguration.MutexNameSuffix) ?? throw new InvalidOperationException($"Expected {HangDumpConfiguration.MutexNameSuffix} environment variable set.");
string pipeNameEnvironmentVariable = $"{HangDumpConfiguration.PipeName}_{FNV_1aHashHelper.ComputeStringHash(testApplicationModuleInfo.GetCurrentTestApplicationFullPath())}_{namedPipeSuffix}";
string namedPipeName = _environment.GetEnvironmentVariable(pipeNameEnvironmentVariable) ?? throw new InvalidOperationException($"Expected {pipeNameEnvironmentVariable} environment variable set.");
_namedPipeClient = new NamedPipeClient(namedPipeName);
_namedPipeClient.RegisterSerializer(new ActivityIndicatorMutexNameRequestSerializer(), typeof(ActivityIndicatorMutexNameRequest));
_namedPipeClient.RegisterSerializer(new VoidResponseSerializer(), typeof(VoidResponse));
_namedPipeClient.RegisterSerializer(new SessionEndSerializerRequestSerializer(), typeof(SessionEndSerializerRequest));
_namedPipeClient.RegisterSerializer(new ConsumerPipeNameRequestSerializer(), typeof(ConsumerPipeNameRequest));
}
}
public Type[] DataTypesConsumed => new[] { typeof(TestNodeUpdateMessage) };
public string Uid => nameof(HangDumpActivityIndicator);
public string Version => AppVersion.DefaultSemVer;
public string DisplayName => ExtensionResources.HangDumpExtensionDisplayName;
public string Description => ExtensionResources.HangDumpExtensionDescription;
public Task<bool> IsEnabledAsync() => Task.FromResult(_commandLineOptions.IsOptionSet(HangDumpCommandLineProvider.HangDumpOptionName) &&
!_commandLineOptions.IsOptionSet(PlatformCommandLineProvider.ServerOptionKey));
public async Task OnTestSessionStartingAsync(SessionUid sessionUid, CancellationToken cancellationToken)
{
ApplicationStateGuard.Ensure(_namedPipeClient is not null);
if (!await IsEnabledAsync() || cancellationToken.IsCancellationRequested)
{
return;
}
try
{
// Connect to the named pipe server
await _logger.LogTraceAsync($"Connecting to the process lifetime handler {_namedPipeClient.PipeName}");
await _namedPipeClient.ConnectAsync(cancellationToken).TimeoutAfterAsync(TimeoutHelper.DefaultHangTimeSpanTimeout);
await _logger.LogTraceAsync("Connected to the process lifetime handler");
_activityIndicatorMutex = new Mutex(true);
_mutexName = $"{HangDumpConfiguration.MutexName}_{Guid.NewGuid():N}";
// Keep the custom thread to avoid to waste one from thread pool.
_signalActivityIndicatorTask = _task.RunLongRunning(SignalActivityIndicatorAsync, "[HangDump] SignalActivityIndicatorAsync", cancellationToken);
await _logger.LogTraceAsync($"Wait for mutex '{_mutexName}' creation");
_mutexCreated.Wait(cancellationToken);
await _logger.LogTraceAsync($"Mutex '{_mutexName}' created");
await _namedPipeClient.RequestReplyAsync<ActivityIndicatorMutexNameRequest, VoidResponse>(new ActivityIndicatorMutexNameRequest(_mutexName), cancellationToken)
.TimeoutAfterAsync(TimeoutHelper.DefaultHangTimeSpanTimeout);
await _logger.LogTraceAsync($"Mutex '{_mutexName}' sent to the process lifetime handler");
// Setup the server channel with the testhost controller
_pipeNameDescription = NamedPipeServer.GetPipeName($"HangDumpActivityIndicator_{Guid.NewGuid():N}");
_singleConnectionNamedPipeServer = new(_pipeNameDescription, CallbackAsync, _environment, _logger, _task, cancellationToken);
_singleConnectionNamedPipeServer.RegisterSerializer(new GetInProgressTestsResponseSerializer(), typeof(GetInProgressTestsResponse));
_singleConnectionNamedPipeServer.RegisterSerializer(new GetInProgressTestsRequestSerializer(), typeof(GetInProgressTestsRequest));
_singleConnectionNamedPipeServer.RegisterSerializer(new ExitSignalActivityIndicatorTaskRequestSerializer(), typeof(ExitSignalActivityIndicatorTaskRequest));
_singleConnectionNamedPipeServer.RegisterSerializer(new VoidResponseSerializer(), typeof(VoidResponse));
await _logger.LogTraceAsync($"Send consumer pipe name to the test controller '{_pipeNameDescription.Name}'");
await _namedPipeClient.RequestReplyAsync<ConsumerPipeNameRequest, VoidResponse>(new ConsumerPipeNameRequest(_pipeNameDescription.Name), cancellationToken)
.TimeoutAfterAsync(TimeoutHelper.DefaultHangTimeSpanTimeout);
// Wait the connection from the testhost controller
await _singleConnectionNamedPipeServer.WaitConnectionAsync(cancellationToken).TimeoutAfterAsync(TimeoutHelper.DefaultHangTimeSpanTimeout);
await _logger.LogTraceAsync($"Test host controller connected");
}
catch (OperationCanceledException ex) when (ex.CancellationToken == cancellationToken)
{
// Do nothing, we're stopping
}
}
private async Task<IResponse> CallbackAsync(IRequest request)
{
if (request is GetInProgressTestsRequest)
{
await _logger.LogDebugAsync($"Received '{nameof(GetInProgressTestsRequest)}'");
return new GetInProgressTestsResponse(_testsCurrentExecutionState.Select(x => (x.Key, (int)_clock.UtcNow.Subtract(x.Value.Item2).TotalSeconds)).ToArray());
}
else if (request is ExitSignalActivityIndicatorTaskRequest)
{
await _logger.LogDebugAsync($"Received '{nameof(ExitSignalActivityIndicatorTaskRequest)}'");
await ExitSignalActivityIndicatorTaskAsync();
return VoidResponse.CachedInstance;
}
else
{
throw new ArgumentOutOfRangeException(string.Format(CultureInfo.InvariantCulture, ExtensionResources.HangDumpUnsupportedRequestTypeErrorMessage, request.GetType().FullName));
}
}
public async Task ConsumeAsync(IDataProducer dataProducer, IData value, CancellationToken cancellationToken)
{
if (cancellationToken.IsCancellationRequested
|| value is not TestNodeUpdateMessage nodeChangedMessage)
{
return;
}
TestNodeStateProperty? state = nodeChangedMessage.TestNode.Properties.SingleOrDefault<TestNodeStateProperty>();
if (state is InProgressTestNodeStateProperty)
{
if (_traceLevelEnabled)
{
await _logger.LogTraceAsync($"New in-progress test '{nodeChangedMessage.TestNode.DisplayName}'");
}
_testsCurrentExecutionState.TryAdd(nodeChangedMessage.TestNode.DisplayName, (typeof(InProgressTestNodeStateProperty), _clock.UtcNow));
}
else if (state is PassedTestNodeStateProperty or ErrorTestNodeStateProperty or CancelledTestNodeStateProperty
or FailedTestNodeStateProperty or TimeoutTestNodeStateProperty or SkippedTestNodeStateProperty
&& _testsCurrentExecutionState.TryRemove(nodeChangedMessage.TestNode.DisplayName, out (Type, DateTimeOffset) record)
&& _traceLevelEnabled)
{
await _logger.LogTraceAsync($"Test removed from in-progress list '{nodeChangedMessage.TestNode.DisplayName}' after '{_clock.UtcNow.Subtract(record.Item2)}', total in-progress '{_testsCurrentExecutionState.Count}'");
}
// Optimization, we're interested in test progression and eventually in the discovery progression
if (state is not InProgressTestNodeStateProperty)
{
if (_traceLevelEnabled)
{
await _logger.LogTraceAsync($"Signal for action node {nodeChangedMessage.TestNode.DisplayName} - '{state}'");
}
// Signal the activity if it's not set
if (!_signalActivity.IsSet)
{
_signalActivity.Set();
}
}
}
private Task SignalActivityIndicatorAsync()
{
_activityIndicatorMutex = new Mutex(true, _mutexName);
_mutexCreated.Set();
while (!_exitSignalActivityIndicatorAsync)
{
// Wait for the signal
// We don't add the timeout here because depends on the user value specified with the --hangdump-timeout option
_signalActivity.Wait();
if (_traceLevelEnabled)
{
_logger.LogTrace($"Signal process lifetime handler, exitSignalActivityIndicatorAsync {_exitSignalActivityIndicatorAsync}");
}
_activityIndicatorMutex.ReleaseMutex();
_activityIndicatorMutex.WaitOne(TimeoutHelper.DefaultHangTimeSpanTimeout);
if (_traceLevelEnabled)
{
_logger.LogTrace($"Signaled by process lifetime handler, exitSignalActivityIndicatorAsync {_exitSignalActivityIndicatorAsync}");
}
// Reset the signal
_signalActivity.Reset();
}
_logger.LogDebug($"Exit 'SignalActivityIndicatorAsync'");
return Task.CompletedTask;
}
public async Task OnTestSessionFinishingAsync(SessionUid sessionUid, CancellationToken cancellationToken)
{
ApplicationStateGuard.Ensure(_namedPipeClient is not null);
ApplicationStateGuard.Ensure(_activityIndicatorMutex is not null);
if (!await IsEnabledAsync())
{
return;
}
await _namedPipeClient.RequestReplyAsync<SessionEndSerializerRequest, VoidResponse>(new SessionEndSerializerRequest(), cancellationToken)
.TimeoutAfterAsync(TimeoutHelper.DefaultHangTimeSpanTimeout);
await _logger.LogDebugAsync($"Signal for test session end'");
await ExitSignalActivityIndicatorTaskAsync();
await _logger.LogTraceAsync($"Signaled by process for it's exit");
_sessionEndCalled = true;
}
private async Task ExitSignalActivityIndicatorTaskAsync()
{
if (_exitSignalActivityIndicatorAsync)
{
return;
}
ApplicationStateGuard.Ensure(_signalActivityIndicatorTask is not null);
_exitSignalActivityIndicatorAsync = true;
_signalActivity.Set();
await _signalActivityIndicatorTask.TimeoutAfterAsync(TimeoutHelper.DefaultHangTimeSpanTimeout);
}
#if NETCOREAPP
public async ValueTask DisposeAsync()
{
await DisposeHelper.DisposeAsync(_namedPipeClient);
// If the OnTestSessionFinishingAsync is not called means that something unhandled happened
// and we didn't correctly coordinate the shutdown with the HangDumpProcessLifetimeHandler.
// If we go do wait for the server we will hang.
if (_sessionEndCalled)
{
await DisposeHelper.DisposeAsync(_singleConnectionNamedPipeServer);
}
_pipeNameDescription?.Dispose();
_mutexCreated.Dispose();
_signalActivity.Dispose();
_activityIndicatorMutex?.Dispose();
}
#else
public void Dispose()
{
_namedPipeClient?.Dispose();
// If the OnTestSessionFinishingAsync is not called means that something unhandled happened
// and we didn't correctly coordinate the shutdown with the HangDumpProcessLifetimeHandler.
// If we go do wait for the server we will hang.
if (_sessionEndCalled)
{
_singleConnectionNamedPipeServer?.Dispose();
}
_pipeNameDescription?.Dispose();
_mutexCreated.Dispose();
_signalActivity.Dispose();
_activityIndicatorMutex?.Dispose();
}
#endif
}

Просмотреть файл

@ -0,0 +1,76 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Globalization;
using Microsoft.Testing.Extensions.Diagnostics.Resources;
using Microsoft.Testing.Platform.CommandLine;
using Microsoft.Testing.Platform.Extensions;
using Microsoft.Testing.Platform.Extensions.CommandLine;
using Microsoft.Testing.Platform.Helpers;
namespace Microsoft.Testing.Extensions.Diagnostics;
internal sealed class HangDumpCommandLineProvider : ICommandLineOptionsProvider
{
public const string HangDumpOptionName = "hangdump";
public const string HangDumpFileNameOptionName = "hangdump-filename";
public const string HangDumpTimeoutOptionName = "hangdump-timeout";
public const string HangDumpTypeOptionName = "hangdump-type";
#if NETCOREAPP
private static readonly string[] HangDumpTypeOptions = ["Mini", "Heap", "Full", "Triage"];
#else
private static readonly string[] HangDumpTypeOptions = ["Mini", "Heap", "Full"];
#endif
private static readonly IReadOnlyCollection<CommandLineOption> CachedCommandLineOptions = new CommandLineOption[]
{
new(HangDumpOptionName, ExtensionResources.HangDumpOptionDescription, ArgumentArity.Zero, false),
new(HangDumpTimeoutOptionName, ExtensionResources.HangDumpTimeoutOptionDescription, ArgumentArity.ExactlyOne, false),
new(HangDumpFileNameOptionName, ExtensionResources.HangDumpFileNameOptionDescription, ArgumentArity.ExactlyOne, false),
new(HangDumpTypeOptionName, ExtensionResources.HangDumpTypeOptionDescription, ArgumentArity.ExactlyOne, false),
};
private readonly HangDumpConfiguration _hangDumpConfiguration;
public HangDumpCommandLineProvider(HangDumpConfiguration hangDumpConfiguration) => _hangDumpConfiguration = hangDumpConfiguration;
public string Uid => nameof(HangDumpCommandLineProvider);
public string Version => AppVersion.DefaultSemVer;
public string DisplayName => ExtensionResources.HangDumpExtensionDisplayName;
public string Description => ExtensionResources.HangDumpExtensionDescription;
public Task<bool> IsEnabledAsync() => Task.FromResult(true);
public IReadOnlyCollection<CommandLineOption> GetCommandLineOptions() => CachedCommandLineOptions;
public Task<ValidationResult> ValidateOptionArgumentsAsync(CommandLineOption commandOption, string[] arguments)
{
if (commandOption.Name == HangDumpTimeoutOptionName && !TimeSpanParser.TryParse(arguments[0], out TimeSpan _))
{
return ValidationResult.InvalidTask(ExtensionResources.HangDumpTimeoutOptionInvalidArgument);
}
if (commandOption.Name == HangDumpTypeOptionName)
{
if (!HangDumpTypeOptions.Contains(arguments[0], StringComparer.OrdinalIgnoreCase))
{
return ValidationResult.InvalidTask(string.Format(CultureInfo.InvariantCulture, ExtensionResources.HangDumpTypeOptionInvalidType, arguments[0]));
}
}
return ValidationResult.ValidTask;
}
public Task<ValidationResult> ValidateCommandLineOptionsAsync(ICommandLineOptions commandLineOptions)
=> (commandLineOptions.IsOptionSet(HangDumpTimeoutOptionName) ||
commandLineOptions.IsOptionSet(HangDumpFileNameOptionName) ||
commandLineOptions.IsOptionSet(HangDumpTypeOptionName)) &&
!commandLineOptions.IsOptionSet(HangDumpOptionName)
? ValidationResult.InvalidTask(ExtensionResources.MissingHangDumpMainOption)
: ValidationResult.ValidTask;
}

Просмотреть файл

@ -0,0 +1,28 @@
// 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.Platform.Helpers;
using Microsoft.Testing.Platform.IPC;
using Microsoft.Testing.Platform.Services;
namespace Microsoft.Testing.Extensions.Diagnostics;
internal sealed class HangDumpConfiguration
{
public const string PipeName = "TESTINGPLATFORM_HANGDUMP_PIPENAME";
public const string MutexName = "TESTINGPLATFORM_HANGDUMP_MUTEXNAME";
public const string MutexNameSuffix = "TESTINGPLATFORM_HANGDUMP_MUTEXNAME_SUFFIX";
public HangDumpConfiguration(ITestApplicationModuleInfo testApplicationModuleInfo, PipeNameDescription pipeNameDescription, string mutexSuffix)
{
PipeNameValue = pipeNameDescription.Name;
PipeNameKey = $"{PipeName}_{FNV_1aHashHelper.ComputeStringHash(testApplicationModuleInfo.GetCurrentTestApplicationFullPath())}_{mutexSuffix}";
MutexSuffix = mutexSuffix;
}
public string PipeNameKey { get; private set; }
public string PipeNameValue { get; private set; }
public string MutexSuffix { get; private set; }
}

Просмотреть файл

@ -0,0 +1,78 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Globalization;
using Microsoft.Testing.Extensions.Diagnostics.Resources;
using Microsoft.Testing.Platform.CommandLine;
using Microsoft.Testing.Platform.Extensions;
using Microsoft.Testing.Platform.Extensions.TestHostControllers;
using Microsoft.Testing.Platform.Helpers;
namespace Microsoft.Testing.Extensions.Diagnostics;
internal sealed class HangDumpEnvironmentVariableProvider : ITestHostEnvironmentVariableProvider
{
private readonly ICommandLineOptions _commandLineOptions;
private readonly HangDumpConfiguration _hangDumpConfiguration;
public HangDumpEnvironmentVariableProvider(ICommandLineOptions commandLineOptions, HangDumpConfiguration hangDumpConfiguration)
{
_commandLineOptions = commandLineOptions;
_hangDumpConfiguration = hangDumpConfiguration;
}
public string Uid => nameof(HangDumpEnvironmentVariableProvider);
public string Version => AppVersion.DefaultSemVer;
public string DisplayName => ExtensionResources.HangDumpExtensionDisplayName;
public string Description => ExtensionResources.HangDumpExtensionDescription;
public Task<bool> IsEnabledAsync() => Task.FromResult(_commandLineOptions.IsOptionSet(HangDumpCommandLineProvider.HangDumpOptionName) &&
!_commandLineOptions.IsOptionSet(PlatformCommandLineProvider.ServerOptionKey));
public Task UpdateAsync(IEnvironmentVariables environmentVariables)
{
environmentVariables.SetVariable(
new(_hangDumpConfiguration.PipeNameKey, _hangDumpConfiguration.PipeNameValue, false, true));
environmentVariables.SetVariable(
new(HangDumpConfiguration.MutexNameSuffix, _hangDumpConfiguration.MutexSuffix, false, true));
return Task.CompletedTask;
}
public Task<ValidationResult> ValidateTestHostEnvironmentVariablesAsync(IReadOnlyEnvironmentVariables environmentVariables)
{
if (!environmentVariables.TryGetVariable(_hangDumpConfiguration.PipeNameKey, out OwnedEnvironmentVariable? envVar))
{
return Task.FromResult(
ValidationResult.Invalid(
string.Format(CultureInfo.InvariantCulture, ExtensionResources.HangDumpEnvironmentVariableIsMissingErrorMessage, _hangDumpConfiguration.PipeNameKey)));
}
if (envVar.Value != _hangDumpConfiguration.PipeNameValue)
{
return Task.FromResult(
ValidationResult.Invalid(
string.Format(CultureInfo.InvariantCulture, ExtensionResources.HangDumpEnvironmentVariableInvalidValueErrorMessage, _hangDumpConfiguration.PipeNameKey, envVar.Value, _hangDumpConfiguration.PipeNameKey)));
}
if (!environmentVariables.TryGetVariable(HangDumpConfiguration.MutexNameSuffix, out envVar))
{
return Task.FromResult(
ValidationResult.Invalid(
string.Format(CultureInfo.InvariantCulture, ExtensionResources.HangDumpEnvironmentVariableIsMissingErrorMessage, HangDumpConfiguration.MutexNameSuffix)));
}
if (envVar.Value != _hangDumpConfiguration.MutexSuffix)
{
return Task.FromResult(
ValidationResult.Invalid(
string.Format(CultureInfo.InvariantCulture, ExtensionResources.HangDumpEnvironmentVariableInvalidValueErrorMessage, HangDumpConfiguration.MutexNameSuffix, envVar.Value, _hangDumpConfiguration.MutexSuffix)));
}
// No problem found
return ValidationResult.ValidTask;
}
}

Просмотреть файл

@ -0,0 +1,56 @@
// 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.Extensions.Diagnostics;
using Microsoft.Testing.Platform.Builder;
using Microsoft.Testing.Platform.Extensions;
using Microsoft.Testing.Platform.Helpers;
using Microsoft.Testing.Platform.IPC;
using Microsoft.Testing.Platform.Services;
namespace Microsoft.Testing.Extensions;
public static class HangDumpExtensions
{
public static void AddHangDumpProvider(this ITestApplicationBuilder builder)
{
CurrentTestApplicationModuleInfo testApplicationModuleInfo = new(new SystemEnvironment(), new SystemProcessHandler());
string mutexSuffix = Guid.NewGuid().ToString("N");
PipeNameDescription pipeNameDescription = NamedPipeServer.GetPipeName($"hangdumpgeneratorpipename.{FNV_1aHashHelper.ComputeStringHash(testApplicationModuleInfo.GetCurrentTestApplicationFullPath())}_{mutexSuffix}");
HangDumpConfiguration hangDumpConfiguration = new(testApplicationModuleInfo, pipeNameDescription, mutexSuffix);
builder.TestHostControllers.AddProcessLifetimeHandler(serviceProvider
=> new HangDumpProcessLifetimeHandler(
hangDumpConfiguration,
pipeNameDescription,
serviceProvider.GetMessageBus(),
serviceProvider.GetOutputDevice(),
serviceProvider.GetCommandLineOptions(),
serviceProvider.GetTask(),
serviceProvider.GetEnvironment(),
serviceProvider.GetLoggerFactory(),
serviceProvider.GetTestApplicationModuleInfo(),
serviceProvider.GetConfiguration(),
serviceProvider.GetProcessHandler(),
serviceProvider,
serviceProvider.GetClock()));
builder.TestHostControllers.AddEnvironmentVariableProvider(serviceProvider
=> new HangDumpEnvironmentVariableProvider(serviceProvider.GetCommandLineOptions(), hangDumpConfiguration));
builder.CommandLine.AddProvider(()
=> new HangDumpCommandLineProvider(hangDumpConfiguration));
var hangDumpActivityIndicatorComposite
= new CompositeExtensionFactory<HangDumpActivityIndicator>(serviceProvider => new HangDumpActivityIndicator(
serviceProvider.GetCommandLineOptions(),
serviceProvider.GetEnvironment(),
serviceProvider.GetTask(),
serviceProvider.GetTestApplicationModuleInfo(),
serviceProvider.GetLoggerFactory(),
serviceProvider.GetClock()));
builder.TestHost.AddDataConsumer(hangDumpActivityIndicatorComposite);
builder.TestHost.AddTestSessionLifetimeHandle(hangDumpActivityIndicatorComposite);
}
}

Просмотреть файл

@ -0,0 +1,429 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Globalization;
using Microsoft.Testing.Extensions.Diagnostics.Resources;
using Microsoft.Testing.Extensions.HangDump.Serializers;
using Microsoft.Testing.Platform;
using Microsoft.Testing.Platform.CommandLine;
using Microsoft.Testing.Platform.Configurations;
using Microsoft.Testing.Platform.Extensions.Messages;
using Microsoft.Testing.Platform.Extensions.OutputDevice;
using Microsoft.Testing.Platform.Extensions.TestHostControllers;
using Microsoft.Testing.Platform.Helpers;
using Microsoft.Testing.Platform.IPC;
using Microsoft.Testing.Platform.IPC.Models;
using Microsoft.Testing.Platform.IPC.Serializers;
using Microsoft.Testing.Platform.Logging;
using Microsoft.Testing.Platform.Messages;
using Microsoft.Testing.Platform.OutputDevice;
using Microsoft.Testing.Platform.Services;
#if NETCOREAPP
using Microsoft.Diagnostics.NETCore.Client;
#endif
namespace Microsoft.Testing.Extensions.Diagnostics;
internal sealed class HangDumpProcessLifetimeHandler : ITestHostProcessLifetimeHandler, IOutputDeviceDataProducer, IDataProducer,
#if NETCOREAPP
IAsyncDisposable
#else
IDisposable
#endif
{
private readonly HangDumpConfiguration _hangDumpConfiguration;
private readonly IMessageBus _messageBus;
private readonly IOutputDevice _outputDisplay;
private readonly ICommandLineOptions _commandLineOptions;
private readonly ITask _task;
private readonly IEnvironment _environment;
private readonly IConfiguration _configuration;
private readonly IProcessHandler _processHandler;
private readonly IServiceProvider _serviceProvider;
private readonly IClock _clock;
private readonly ITestApplicationCancellationTokenSource _testApplicationCancellationTokenSource;
private readonly PipeNameDescription _pipeNameDescription;
private readonly bool _traceEnabled;
private readonly ILogger<HangDumpProcessLifetimeHandler> _logger;
private readonly ManualResetEventSlim _mutexNameReceived = new(false);
private readonly ManualResetEventSlim _waitConsumerPipeName = new(false);
private TimeSpan _activityTimerValue = TimeSpan.FromMinutes(30);
private Task? _waitConnectionTask;
private Task? _activityIndicatorTask;
private NamedPipeServer? _singleConnectionNamedPipeServer;
private string? _activityTimerMutexName;
private bool _exitActivityIndicatorTask;
private string _dumpType = "Full";
private string _dumpFileNamePattern;
private Mutex? _activityIndicatorMutex;
private ITestHostProcessInformation? _testHostProcessInformation;
private string _dumpFileTaken = string.Empty;
private NamedPipeClient? _namedPipeClient;
public HangDumpProcessLifetimeHandler(
HangDumpConfiguration hangDumpConfiguration,
PipeNameDescription pipeNameDescription,
IMessageBus messageBus,
IOutputDevice outputDisplay,
ICommandLineOptions commandLineOptions,
ITask task,
IEnvironment environment,
ILoggerFactory loggerFactory,
ITestApplicationModuleInfo testApplicationModuleInfo,
IConfiguration configuration,
IProcessHandler processHandler,
IServiceProvider serviceProvider,
IClock clock)
{
_logger = loggerFactory.CreateLogger<HangDumpProcessLifetimeHandler>();
_traceEnabled = _logger.IsEnabled(LogLevel.Trace);
_hangDumpConfiguration = hangDumpConfiguration;
_pipeNameDescription = pipeNameDescription;
_messageBus = messageBus;
_outputDisplay = outputDisplay;
_commandLineOptions = commandLineOptions;
_task = task;
_environment = environment;
_configuration = configuration;
_processHandler = processHandler;
_serviceProvider = serviceProvider;
_clock = clock;
_testApplicationCancellationTokenSource = serviceProvider.GetTestApplicationCancellationTokenSource();
_dumpFileNamePattern = $"{Path.GetFileNameWithoutExtension(testApplicationModuleInfo.GetCurrentTestApplicationFullPath())}_%p_hang.dmp";
}
public string Uid => nameof(HangDumpProcessLifetimeHandler);
public string Version => AppVersion.DefaultSemVer;
public string DisplayName => ExtensionResources.HangDumpExtensionDisplayName;
public string Description => ExtensionResources.HangDumpExtensionDescription;
public Type[] DataTypesProduced => new[] { typeof(FileArtifact) };
public Task<bool> IsEnabledAsync() => Task.FromResult(_commandLineOptions.IsOptionSet(HangDumpCommandLineProvider.HangDumpOptionName) &&
!_commandLineOptions.IsOptionSet(PlatformCommandLineProvider.ServerOptionKey));
public async Task BeforeTestHostProcessStartAsync(CancellationToken cancellationToken)
{
if (_commandLineOptions.TryGetOptionArgumentList(HangDumpCommandLineProvider.HangDumpTimeoutOptionName, out string[]? timeout))
{
_activityTimerValue = TimeSpanParser.Parse(timeout[0]);
}
if (_commandLineOptions.TryGetOptionArgumentList(HangDumpCommandLineProvider.HangDumpTypeOptionName, out string[]? dumpType))
{
_dumpType = dumpType[0];
}
if (_commandLineOptions.TryGetOptionArgumentList(HangDumpCommandLineProvider.HangDumpFileNameOptionName, out string[]? fileName))
{
_dumpFileNamePattern = fileName[0];
}
await _logger.LogInformationAsync($"Hang dump timeout setup {_activityTimerValue}.");
_waitConnectionTask = _task.Run(
async () =>
{
_singleConnectionNamedPipeServer = new(_pipeNameDescription, CallbackAsync, _environment, _logger, _task, cancellationToken);
_singleConnectionNamedPipeServer.RegisterSerializer(new ActivityIndicatorMutexNameRequestSerializer(), typeof(ActivityIndicatorMutexNameRequest));
_singleConnectionNamedPipeServer.RegisterSerializer(new VoidResponseSerializer(), typeof(VoidResponse));
_singleConnectionNamedPipeServer.RegisterSerializer(new SessionEndSerializerRequestSerializer(), typeof(SessionEndSerializerRequest));
_singleConnectionNamedPipeServer.RegisterSerializer(new ConsumerPipeNameRequestSerializer(), typeof(ConsumerPipeNameRequest));
await _logger.LogDebugAsync($"Waiting for connection to {_singleConnectionNamedPipeServer.PipeName.Name}");
await _singleConnectionNamedPipeServer.WaitConnectionAsync(cancellationToken).TimeoutAfterAsync(TimeoutHelper.DefaultHangTimeSpanTimeout);
}, cancellationToken);
}
private async Task<IResponse> CallbackAsync(IRequest request)
{
if (request is ActivityIndicatorMutexNameRequest activityIndicatorMutexNameRequest)
{
await _logger.LogDebugAsync($"Mutex name received by the test host, '{activityIndicatorMutexNameRequest.MutexName}'");
_activityTimerMutexName = activityIndicatorMutexNameRequest.MutexName;
_mutexNameReceived.Set();
return VoidResponse.CachedInstance;
}
else if (request is SessionEndSerializerRequest)
{
await _logger.LogDebugAsync($"Session end received by the test host");
_exitActivityIndicatorTask = true;
#if NET
if (_namedPipeClient is not null)
{
await _namedPipeClient.DisposeAsync();
}
#else
_namedPipeClient?.Dispose();
#endif
return VoidResponse.CachedInstance;
}
else if (request is ConsumerPipeNameRequest consumerPipeNameRequest)
{
await _logger.LogDebugAsync($"Consumer pipe name received '{consumerPipeNameRequest.PipeName}'");
_namedPipeClient = new NamedPipeClient(consumerPipeNameRequest.PipeName);
_namedPipeClient.RegisterSerializer(new GetInProgressTestsResponseSerializer(), typeof(GetInProgressTestsResponse));
_namedPipeClient.RegisterSerializer(new GetInProgressTestsRequestSerializer(), typeof(GetInProgressTestsRequest));
_namedPipeClient.RegisterSerializer(new ExitSignalActivityIndicatorTaskRequestSerializer(), typeof(ExitSignalActivityIndicatorTaskRequest));
_namedPipeClient.RegisterSerializer(new VoidResponseSerializer(), typeof(VoidResponse));
_waitConsumerPipeName.Set();
return VoidResponse.CachedInstance;
}
else
{
throw new ArgumentOutOfRangeException(string.Format(CultureInfo.InvariantCulture, ExtensionResources.HangDumpUnsupportedRequestTypeErrorMessage, request));
}
}
public async Task OnTestHostProcessStartedAsync(ITestHostProcessInformation testHostProcessInformation, CancellationToken cancellation)
{
ApplicationStateGuard.Ensure(_waitConnectionTask is not null);
ApplicationStateGuard.Ensure(_singleConnectionNamedPipeServer is not null);
try
{
_testHostProcessInformation = testHostProcessInformation;
await _logger.LogDebugAsync($"Wait for test host connection to the server pipe '{_singleConnectionNamedPipeServer.PipeName.Name}'");
await _waitConnectionTask.TimeoutAfterAsync(TimeoutHelper.DefaultHangTimeSpanTimeout);
using CancellationTokenSource timeout = new(TimeoutHelper.DefaultHangTimeSpanTimeout);
using var linkedCancellationToken = CancellationTokenSource.CreateLinkedTokenSource(cancellation, timeout.Token);
_waitConsumerPipeName.Wait(linkedCancellationToken.Token);
ApplicationStateGuard.Ensure(_namedPipeClient is not null);
await _namedPipeClient.ConnectAsync(cancellation).TimeoutAfterAsync(TimeoutHelper.DefaultHangTimeSpanTimeout);
await _logger.LogDebugAsync($"Connected to the test host server pipe '{_namedPipeClient.PipeName}'");
// Keep the custom thread to avoid to waste one from thread pool.
_activityIndicatorTask = _task.RunLongRunning(ActivityTimerAsync, "[HangDump] ActivityTimerAsync", cancellation);
}
catch (OperationCanceledException) when (cancellation.IsCancellationRequested)
{
return;
}
}
public async Task OnTestHostProcessExitedAsync(ITestHostProcessInformation testHostProcessInformation, CancellationToken cancellation)
{
if (cancellation.IsCancellationRequested)
{
return;
}
if (!testHostProcessInformation.HasExitedGracefully)
{
_logger.LogDebug($"Testhost didn't exit gracefully '{testHostProcessInformation.ExitCode}', disposing _activityIndicatorMutex(is null: '{_activityIndicatorMutex is null}')");
_activityIndicatorMutex?.Dispose();
}
if (!RoslynString.IsNullOrEmpty(_dumpFileTaken))
{
await _messageBus.PublishAsync(this, new FileArtifact(new FileInfo(_dumpFileTaken), ExtensionResources.HangDumpArtifactDisplayName, ExtensionResources.HangDumpArtifactDescription));
}
}
private async Task ActivityTimerAsync()
{
_logger.LogDebug($"Wait for mutex name from the test host");
if (!_mutexNameReceived.Wait(TimeoutHelper.DefaultHangTimeSpanTimeout))
{
throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, ExtensionResources.MutexNameReceptionTimeoutErrorMessage, TimeoutHelper.DefaultHangTimeoutSeconds));
}
ApplicationStateGuard.Ensure(_activityTimerMutexName is not null);
_logger.LogDebug($"Open activity mutex '{_activityTimerMutexName}'");
if (!Mutex.TryOpenExisting(_activityTimerMutexName, out _activityIndicatorMutex))
{
throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, ExtensionResources.MutexDoesNotExistErrorMessage, _activityTimerMutexName));
}
bool timeoutFired = false;
try
{
// Don't wait in async in the while, we need thread affinity for the mutex
while (true)
{
if (_traceEnabled)
{
_logger.LogTrace($"Wait for activity signal");
}
if (!_activityIndicatorMutex.WaitOne(_activityTimerValue))
{
timeoutFired = true;
break;
}
if (_traceEnabled)
{
_logger.LogTrace($"Activity signal received by the test host '{_clock.UtcNow}'");
}
// We don't release in case of exit because we will release after the timeout check to unblock the client and exit the task
if (_exitActivityIndicatorTask)
{
break;
}
else
{
_activityIndicatorMutex.ReleaseMutex();
}
}
if (_traceEnabled)
{
_logger.LogTrace($"Exit 'ActivityTimerAsync'");
}
}
catch (AbandonedMutexException)
{
// If the mutex is abandoned from the test host crash we will get an exception
_logger.LogDebug($"Mutex '{_activityTimerMutexName}' is abandoned");
}
catch (ObjectDisposedException)
{
// If test host exit in a non gracefully way on process exit we dispose the mutex to unlock the activity timer.
// In this way we release also the dispose.
_logger.LogDebug($"Mutex '{_activityTimerMutexName}' is disposed");
}
if (!timeoutFired)
{
try
{
_logger.LogDebug($"Timeout is not fired release activity mutex handle to allow test host to close");
_activityIndicatorMutex.ReleaseMutex();
}
catch (AbandonedMutexException)
{
// If the mutex is abandoned from the test host crash we will get an exception
_logger.LogDebug($"Mutex '{_activityTimerMutexName}' is abandoned, during last release");
}
catch (ObjectDisposedException)
{
// If test host exit in a non gracefully way on process exit we dispose the mutex to unlock the activity timer.
_logger.LogDebug($"Mutex '{_activityTimerMutexName}' is disposed, during last release");
}
}
_activityIndicatorMutex.Dispose();
_logger.LogDebug($"Activity indicator disposed");
if (timeoutFired)
{
await TakeDumpAsync();
}
}
private async Task TakeDumpAsync()
{
ApplicationStateGuard.Ensure(_testHostProcessInformation is not null);
ApplicationStateGuard.Ensure(_dumpType is not null);
await _logger.LogInformationAsync($"Hang dump timeout({_activityTimerValue}) expired.");
await _outputDisplay.DisplayAsync(this, FormattedTextOutputDeviceDataBuilder.CreateRedConsoleColorText(string.Format(CultureInfo.InvariantCulture, ExtensionResources.HangDumpTimeoutExpired, _activityTimerValue)));
string finalDumpFileName = _dumpFileNamePattern.Replace("%p", _testHostProcessInformation.PID.ToString(CultureInfo.InvariantCulture));
finalDumpFileName = Path.Combine(_configuration.GetTestResultDirectory(), finalDumpFileName);
ApplicationStateGuard.Ensure(_namedPipeClient is not null);
GetInProgressTestsResponse tests = await _namedPipeClient.RequestReplyAsync<GetInProgressTestsRequest, GetInProgressTestsResponse>(new GetInProgressTestsRequest(), _testApplicationCancellationTokenSource.CancellationToken);
await _namedPipeClient.RequestReplyAsync<ExitSignalActivityIndicatorTaskRequest, VoidResponse>(new ExitSignalActivityIndicatorTaskRequest(), _testApplicationCancellationTokenSource.CancellationToken);
if (tests.Tests.Length > 0)
{
string hangTestsFileName = Path.Combine(_configuration.GetTestResultDirectory(), Path.ChangeExtension(Path.GetFileName(finalDumpFileName), ".log"));
using (FileStream fs = File.OpenWrite(hangTestsFileName))
using (StreamWriter sw = new(fs))
{
await _outputDisplay.DisplayAsync(this, FormattedTextOutputDeviceDataBuilder.CreateRedConsoleColorText(ExtensionResources.RunningTestsWhileDumping));
foreach ((string testName, int seconds) in tests.Tests)
{
await sw.WriteLineAsync($"[{TimeSpan.FromSeconds(seconds)}] {testName}");
await _outputDisplay.DisplayAsync(this, FormattedTextOutputDeviceDataBuilder.CreateRedConsoleColorText($"[{TimeSpan.FromSeconds(seconds)}] {testName}"));
}
}
await _messageBus.PublishAsync(this, new FileArtifact(new FileInfo(hangTestsFileName), ExtensionResources.HangTestListArtifactDisplayName, ExtensionResources.HangTestListArtifactDescription));
}
await _logger.LogInformationAsync($"Creating dump filename {finalDumpFileName}");
await _outputDisplay.DisplayAsync(this, FormattedTextOutputDeviceDataBuilder.CreateRedConsoleColorText(string.Format(CultureInfo.InvariantCulture, ExtensionResources.CreatingDumpFile, finalDumpFileName)));
#if NETCOREAPP
DiagnosticsClient diagnosticsClient = new(_testHostProcessInformation.PID);
DumpType dumpType = _dumpType.ToLowerInvariant().Trim() switch
{
"mini" => DumpType.Normal,
"heap" => DumpType.WithHeap,
"triage" => DumpType.Triage,
"full" => DumpType.Full,
_ => throw ApplicationStateGuard.Unreachable(),
};
diagnosticsClient.WriteDump(dumpType, finalDumpFileName, true);
NotifyCrashDumpServiceIfEnabled();
IProcess process = _processHandler.GetProcessById(_testHostProcessInformation.PID);
process.Kill();
await process.WaitForExitAsync();
#else
MiniDumpWriteDump.MiniDumpTypeOption miniDumpTypeOption = _dumpType.ToLowerInvariant().Trim() switch
{
"mini" => MiniDumpWriteDump.MiniDumpTypeOption.Mini,
"heap" => MiniDumpWriteDump.MiniDumpTypeOption.Heap,
"full" => MiniDumpWriteDump.MiniDumpTypeOption.Full,
_ => throw ApplicationStateGuard.Unreachable(),
};
MiniDumpWriteDump.CollectDumpUsingMiniDumpWriteDump(_testHostProcessInformation.PID, finalDumpFileName, miniDumpTypeOption);
NotifyCrashDumpServiceIfEnabled();
IProcess process = _processHandler.GetProcessById(_testHostProcessInformation.PID);
process.Kill();
process.WaitForExit();
#endif
_dumpFileTaken = finalDumpFileName;
}
private static void NotifyCrashDumpServiceIfEnabled()
=> AppDomain.CurrentDomain.SetData("ProcessKilledByHangDump", "true");
public void Dispose()
{
if (_activityIndicatorTask is not null)
{
if (!_activityIndicatorTask.Wait(TimeoutHelper.DefaultHangTimeSpanTimeout))
{
throw new InvalidOperationException($"_activityIndicatorTask didn't exit in {TimeoutHelper.DefaultHangTimeSpanTimeout} seconds");
}
}
_namedPipeClient?.Dispose();
_waitConsumerPipeName.Dispose();
_mutexNameReceived.Dispose();
_singleConnectionNamedPipeServer?.Dispose();
_pipeNameDescription.Dispose();
}
#if NETCOREAPP
public async ValueTask DisposeAsync()
{
if (_activityIndicatorTask is not null)
{
await _activityIndicatorTask.TimeoutAfterAsync(TimeoutHelper.DefaultHangTimeSpanTimeout);
}
_namedPipeClient?.Dispose();
_waitConsumerPipeName.Dispose();
_mutexNameReceived.Dispose();
_singleConnectionNamedPipeServer?.Dispose();
_pipeNameDescription.Dispose();
}
#endif
}

Просмотреть файл

@ -0,0 +1,31 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Diagnostics.CodeAnalysis;
namespace Microsoft.Testing.Platform.Helpers;
[ExcludeFromCodeCoverage]
internal static class FNV_1aHashHelper
{
/// <summary>
/// Computes a hash of the string using the FNV-1a algorithm.
/// Used by Roslyn.
/// </summary>
public static uint ComputeStringHash(string s)
{
uint num = default;
if (s != null)
{
num = 2166136261u;
int num2 = 0;
while (num2 < s.Length)
{
num = (s[num2] ^ num) * 16777619;
num2++;
}
}
return num;
}
}

Просмотреть файл

@ -0,0 +1,70 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;$(MicrosoftTestingTargetFrameworks)</TargetFrameworks>
<RootNamespace>Microsoft.Testing.Extensions.Diagnostics</RootNamespace>
</PropertyGroup>
<!-- NuGet properties -->
<PropertyGroup>
<PackageDescription>
<![CDATA[Microsoft Testing is a set of platform, framework and protocol intended to make it possible to run any test on any target or device.
This package extends Microsoft Testing Platform to provide an implementation of the Hang Dump using Windows mini dump.]]>
</PackageDescription>
</PropertyGroup>
<ItemGroup>
<AdditionalFiles Include="BannedSymbols.txt" />
<AdditionalFiles Include="PublicAPI\PublicAPI.Shipped.txt" />
<AdditionalFiles Include="PublicAPI\PublicAPI.Unshipped.txt" />
</ItemGroup>
<!-- NuGet package layout -->
<!-- NuGet folders https://learn.microsoft.com/nuget/create-packages/creating-a-package#from-a-convention-based-working-directory -->
<ItemGroup>
<Content Include="buildMultiTargeting/**">
<Pack>true</Pack>
<PackagePath>buildMultiTargeting</PackagePath>
</Content>
<TfmSpecificPackageFile Include="buildTransitive/**">
<PackagePath>buildTransitive/$(TargetFramework)</PackagePath>
</TfmSpecificPackageFile>
<TfmSpecificPackageFile Include="build/**">
<PackagePath>build/$(TargetFramework)</PackagePath>
</TfmSpecificPackageFile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(RepoRoot)src\Platform\Microsoft.Testing.Platform\Microsoft.Testing.Platform.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Diagnostics.NETCore.Client" />
</ItemGroup>
<ItemGroup>
<Compile Update="Resources\ExtensionResources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>ExtensionResources.resx</DependentUpon>
</Compile>
<Compile Update="Resources\ExtensionResources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>ExtensionResources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo Include="Microsoft.Testing.Extensions.UnitTests" Key="$(VsPublicKey)" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Resources\ExtensionResources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>ExtensionResources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,9 @@
# Microsoft.Testing
Microsoft Testing is a set of platform, framework and protocol intended to make it possible to run any test on any target or device.
Documentation can be found at <https://aka.ms/testingplatform>.
## About
This package provides Windows Hang dump extensions to Microsoft Testing Platform.

Просмотреть файл

@ -0,0 +1,5 @@
#nullable enable
Microsoft.Testing.Extensions.HangDumpExtensions
Microsoft.Testing.Extensions.HangDump.TestingPlatformBuilderHook
static Microsoft.Testing.Extensions.HangDump.TestingPlatformBuilderHook.AddExtensions(Microsoft.Testing.Platform.Builder.ITestApplicationBuilder! testApplicationBuilder, string![]! _) -> void
static Microsoft.Testing.Extensions.HangDumpExtensions.AddHangDumpProvider(this Microsoft.Testing.Platform.Builder.ITestApplicationBuilder! builder) -> void

Просмотреть файл

@ -0,0 +1 @@
#nullable enable

Просмотреть файл

@ -0,0 +1,252 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Microsoft.Testing.Extensions.Diagnostics.Resources {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class ExtensionResources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal ExtensionResources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Testing.Extensions.Diagnostics.Resources.ExtensionResources", typeof(ExtensionResources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to Creating dump file &apos;{0}&apos;.
/// </summary>
internal static string CreatingDumpFile {
get {
return ResourceManager.GetString("CreatingDumpFile", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The hang dump file.
/// </summary>
internal static string HangDumpArtifactDescription {
get {
return ResourceManager.GetString("HangDumpArtifactDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Hang dump file.
/// </summary>
internal static string HangDumpArtifactDisplayName {
get {
return ResourceManager.GetString("HangDumpArtifactDisplayName", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Environment variable &apos;{0}&apos; is set to &apos;{1}&apos; instead of &apos;{2}&apos;.
/// </summary>
internal static string HangDumpEnvironmentVariableInvalidValueErrorMessage {
get {
return ResourceManager.GetString("HangDumpEnvironmentVariableInvalidValueErrorMessage", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Environment variable &apos;{0}&apos; is not set.
/// </summary>
internal static string HangDumpEnvironmentVariableIsMissingErrorMessage {
get {
return ResourceManager.GetString("HangDumpEnvironmentVariableIsMissingErrorMessage", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Produce hang dump files when a test execution exceed a given time..
/// </summary>
internal static string HangDumpExtensionDescription {
get {
return ResourceManager.GetString("HangDumpExtensionDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Hang dump.
/// </summary>
internal static string HangDumpExtensionDisplayName {
get {
return ResourceManager.GetString("HangDumpExtensionDisplayName", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Specify the name of the dump file.
/// </summary>
internal static string HangDumpFileNameOptionDescription {
get {
return ResourceManager.GetString("HangDumpFileNameOptionDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Generate a dump file if the test process hangs.
/// </summary>
internal static string HangDumpOptionDescription {
get {
return ResourceManager.GetString("HangDumpOptionDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Hang dump timeout of &apos;{0}&apos; expired.
/// </summary>
internal static string HangDumpTimeoutExpired {
get {
return ResourceManager.GetString("HangDumpTimeoutExpired", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Specify the timeout after which the dump will be generated. The timeout value is specified in one of the following formats: 1.5h, 1.5hour, 1.5hours, 90m, 90min, 90minute, 90minutes 5400s, 5400sec, 5400second, 5400seconds. Default is 30m..
/// </summary>
internal static string HangDumpTimeoutOptionDescription {
get {
return ResourceManager.GetString("HangDumpTimeoutOptionDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &apos;--hangdump-timeout&apos; expects a single timeout argument.
/// </summary>
internal static string HangDumpTimeoutOptionInvalidArgument {
get {
return ResourceManager.GetString("HangDumpTimeoutOptionInvalidArgument", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Specify the type of the dump. Valid values are &apos;Mini&apos;, &apos;Heap&apos;, &apos;Triage&apos; (only available in .NET 6+) or &apos;Full&apos;. Default type is &apos;Full&apos;.
/// </summary>
internal static string HangDumpTypeOptionDescription {
get {
return ResourceManager.GetString("HangDumpTypeOptionDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &apos;{0}&apos; is not a valid dump type. Valid options are &apos;Mini&apos;, &apos;Heap&apos;, &apos;Triage&apos; (only available in .NET 6+) and &apos;Full&apos;.
/// </summary>
internal static string HangDumpTypeOptionInvalidType {
get {
return ResourceManager.GetString("HangDumpTypeOptionInvalidType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Request of type &apos;{0}&apos; is not supported.
/// </summary>
internal static string HangDumpUnsupportedRequestTypeErrorMessage {
get {
return ResourceManager.GetString("HangDumpUnsupportedRequestTypeErrorMessage", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The list of tests that were running at the time of the hang.
/// </summary>
internal static string HangTestListArtifactDescription {
get {
return ResourceManager.GetString("HangTestListArtifactDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Hang test list.
/// </summary>
internal static string HangTestListArtifactDisplayName {
get {
return ResourceManager.GetString("HangTestListArtifactDisplayName", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to You specified one or more hang dump parameters but did not enable it, add --hangdump to the command line.
/// </summary>
internal static string MissingHangDumpMainOption {
get {
return ResourceManager.GetString("MissingHangDumpMainOption", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Cannot find mutex &apos;{0}&apos;.
/// </summary>
internal static string MutexDoesNotExistErrorMessage {
get {
return ResourceManager.GetString("MutexDoesNotExistErrorMessage", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Mutex name wasn&apos;t received after &apos;{0}&apos; seconds.
/// </summary>
internal static string MutexNameReceptionTimeoutErrorMessage {
get {
return ResourceManager.GetString("MutexNameReceptionTimeoutErrorMessage", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The following tests were still running when dump was taken (format: [&lt;time-elapsed-since-start&gt;] &lt;name&gt;):.
/// </summary>
internal static string RunningTestsWhileDumping {
get {
return ResourceManager.GetString("RunningTestsWhileDumping", resourceCulture);
}
}
}
}

Просмотреть файл

@ -0,0 +1,183 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="CreatingDumpFile" xml:space="preserve">
<value>Creating dump file '{0}'</value>
</data>
<data name="HangDumpArtifactDescription" xml:space="preserve">
<value>The hang dump file</value>
</data>
<data name="HangDumpArtifactDisplayName" xml:space="preserve">
<value>Hang dump file</value>
</data>
<data name="HangDumpEnvironmentVariableInvalidValueErrorMessage" xml:space="preserve">
<value>Environment variable '{0}' is set to '{1}' instead of '{2}'</value>
</data>
<data name="HangDumpEnvironmentVariableIsMissingErrorMessage" xml:space="preserve">
<value>Environment variable '{0}' is not set</value>
</data>
<data name="HangDumpExtensionDescription" xml:space="preserve">
<value>Produce hang dump files when a test execution exceed a given time.</value>
</data>
<data name="HangDumpExtensionDisplayName" xml:space="preserve">
<value>Hang dump</value>
</data>
<data name="HangDumpFileNameOptionDescription" xml:space="preserve">
<value>Specify the name of the dump file</value>
</data>
<data name="HangDumpOptionDescription" xml:space="preserve">
<value>Generate a dump file if the test process hangs</value>
</data>
<data name="HangDumpTimeoutExpired" xml:space="preserve">
<value>Hang dump timeout of '{0}' expired</value>
</data>
<data name="HangDumpTimeoutOptionDescription" xml:space="preserve">
<value>Specify the timeout after which the dump will be generated. The timeout value is specified in one of the following formats: 1.5h, 1.5hour, 1.5hours, 90m, 90min, 90minute, 90minutes 5400s, 5400sec, 5400second, 5400seconds. Default is 30m.</value>
</data>
<data name="HangDumpTimeoutOptionInvalidArgument" xml:space="preserve">
<value>'--hangdump-timeout' expects a single timeout argument</value>
</data>
<data name="HangDumpTypeOptionDescription" xml:space="preserve">
<value>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) or 'Full'. Default type is 'Full'</value>
</data>
<data name="HangDumpTypeOptionInvalidType" xml:space="preserve">
<value>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) and 'Full'</value>
</data>
<data name="HangDumpUnsupportedRequestTypeErrorMessage" xml:space="preserve">
<value>Request of type '{0}' is not supported</value>
</data>
<data name="HangTestListArtifactDescription" xml:space="preserve">
<value>The list of tests that were running at the time of the hang</value>
</data>
<data name="HangTestListArtifactDisplayName" xml:space="preserve">
<value>Hang test list</value>
</data>
<data name="MissingHangDumpMainOption" xml:space="preserve">
<value>You specified one or more hang dump parameters but did not enable it, add --hangdump to the command line</value>
</data>
<data name="MutexDoesNotExistErrorMessage" xml:space="preserve">
<value>Cannot find mutex '{0}'</value>
</data>
<data name="MutexNameReceptionTimeoutErrorMessage" xml:space="preserve">
<value>Mutex name wasn't received after '{0}' seconds</value>
</data>
<data name="RunningTestsWhileDumping" xml:space="preserve">
<value>The following tests were still running when dump was taken (format: [&lt;time-elapsed-since-start&gt;] &lt;name&gt;):</value>
</data>
</root>

Просмотреть файл

@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="cs" original="../ExtensionResources.resx">
<body>
<trans-unit id="CreatingDumpFile">
<source>Creating dump file '{0}'</source>
<target state="translated">Vytváří se soubor výpisu paměti {0}.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpArtifactDescription">
<source>The hang dump file</source>
<target state="translated">Soubor výpisu paměti při zablokování</target>
<note />
</trans-unit>
<trans-unit id="HangDumpArtifactDisplayName">
<source>Hang dump file</source>
<target state="translated">Soubor výpisu paměti při zablokování</target>
<note />
</trans-unit>
<trans-unit id="HangDumpEnvironmentVariableInvalidValueErrorMessage">
<source>Environment variable '{0}' is set to '{1}' instead of '{2}'</source>
<target state="translated">Proměnná prostředí {0} je nastavená na {1} místo na {2}.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpEnvironmentVariableIsMissingErrorMessage">
<source>Environment variable '{0}' is not set</source>
<target state="translated">Není nastavená proměnná prostředí {0}.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpExtensionDescription">
<source>Produce hang dump files when a test execution exceed a given time.</source>
<target state="translated">Vytvoří soubory výpisu paměti při zablokování, když provádění testu překročí danou dobu.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpExtensionDisplayName">
<source>Hang dump</source>
<target state="translated">Výpis paměti při zablokování</target>
<note />
</trans-unit>
<trans-unit id="HangDumpFileNameOptionDescription">
<source>Specify the name of the dump file</source>
<target state="translated">Zadejte název souboru výpisu paměti.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpOptionDescription">
<source>Generate a dump file if the test process hangs</source>
<target state="translated">Vygeneruje soubor výpisu paměti, pokud testovací proces přestane reagovat.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutExpired">
<source>Hang dump timeout of '{0}' expired</source>
<target state="translated">Vypršel časový limit {0} pro výpis paměti při zablokování.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutOptionDescription">
<source>Specify the timeout after which the dump will be generated. The timeout value is specified in one of the following formats: 1.5h, 1.5hour, 1.5hours, 90m, 90min, 90minute, 90minutes 5400s, 5400sec, 5400second, 5400seconds. Default is 30m.</source>
<target state="translated">Zadejte časový limit, po kterém bude vygenerován výpis paměti. Hodnota časového limitu se zadává v jednom z následujících formátů: 1.5h, 1.5hour, 1.5hours, 90m, 90min, 90minute, 90minutes 5400s, 5400sec, 5400second, 5400seconds. Výchozí hodnota je 30m.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutOptionInvalidArgument">
<source>'--hangdump-timeout' expects a single timeout argument</source>
<target state="translated">--hangdump-timeout očekává jeden argument časového limitu.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTypeOptionDescription">
<source>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) or 'Full'. Default type is 'Full'</source>
<target state="translated">Zadejte typ výpisu paměti. Platné hodnoty jsou Mini, Heap, Triage (dostupné pouze v .NET 6+) nebo Full. Výchozí typ je Full.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTypeOptionInvalidType">
<source>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) and 'Full'</source>
<target state="translated">{0} není platný typ výpisu paměti. Platné možnosti jsou Mini, Heap, Triage (k dispozici pouze v .NET 6+) a Full.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpUnsupportedRequestTypeErrorMessage">
<source>Request of type '{0}' is not supported</source>
<target state="translated">Žádost typu {0} není podporována.</target>
<note />
</trans-unit>
<trans-unit id="HangTestListArtifactDescription">
<source>The list of tests that were running at the time of the hang</source>
<target state="translated">Seznam testů spuštěných v době zablokování</target>
<note />
</trans-unit>
<trans-unit id="HangTestListArtifactDisplayName">
<source>Hang test list</source>
<target state="translated">Seznam testů při zablokování</target>
<note />
</trans-unit>
<trans-unit id="MissingHangDumpMainOption">
<source>You specified one or more hang dump parameters but did not enable it, add --hangdump to the command line</source>
<target state="translated">Zadali jste jeden nebo více parametrů výpisu stavu systému, ale nepovolili jste ho. Přidejte do příkazového řádku parametr --hangdump</target>
<note />
</trans-unit>
<trans-unit id="MutexDoesNotExistErrorMessage">
<source>Cannot find mutex '{0}'</source>
<target state="translated">Objekt mutex {0} nebyl nalezen.</target>
<note />
</trans-unit>
<trans-unit id="MutexNameReceptionTimeoutErrorMessage">
<source>Mutex name wasn't received after '{0}' seconds</source>
<target state="translated">Název objektu mutex nebyl přijat po {0} s.</target>
<note />
</trans-unit>
<trans-unit id="RunningTestsWhileDumping">
<source>The following tests were still running when dump was taken (format: [&lt;time-elapsed-since-start&gt;] &lt;name&gt;):</source>
<target state="translated">Při pořízení výpisu paměti stále běžely následující testy (formát: [&lt;čas-uplynulý-od-spuštění&gt;] &lt;název&gt;):</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Просмотреть файл

@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="de" original="../ExtensionResources.resx">
<body>
<trans-unit id="CreatingDumpFile">
<source>Creating dump file '{0}'</source>
<target state="translated">Speicherabbilddatei "{0}" wird erstellt</target>
<note />
</trans-unit>
<trans-unit id="HangDumpArtifactDescription">
<source>The hang dump file</source>
<target state="translated">Die Absturzspeicherabbilddatei</target>
<note />
</trans-unit>
<trans-unit id="HangDumpArtifactDisplayName">
<source>Hang dump file</source>
<target state="translated">Absturzspeicherabbilddatei</target>
<note />
</trans-unit>
<trans-unit id="HangDumpEnvironmentVariableInvalidValueErrorMessage">
<source>Environment variable '{0}' is set to '{1}' instead of '{2}'</source>
<target state="translated">Umgebungsvariable "{0}" ist auf "{1}" anstatt auf "{2}" festgelegt.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpEnvironmentVariableIsMissingErrorMessage">
<source>Environment variable '{0}' is not set</source>
<target state="translated">Die Umgebungsvariable "{0}" wurde nicht festgelegt</target>
<note />
</trans-unit>
<trans-unit id="HangDumpExtensionDescription">
<source>Produce hang dump files when a test execution exceed a given time.</source>
<target state="translated">Absturzspeicherabbilddateien erstellen, wenn eine Testausführung eine angegebene Zeit überschreitet.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpExtensionDisplayName">
<source>Hang dump</source>
<target state="translated">Absturzspeicherabbild</target>
<note />
</trans-unit>
<trans-unit id="HangDumpFileNameOptionDescription">
<source>Specify the name of the dump file</source>
<target state="translated">Namen der Speicherabbilddatei angeben</target>
<note />
</trans-unit>
<trans-unit id="HangDumpOptionDescription">
<source>Generate a dump file if the test process hangs</source>
<target state="translated">Speicherabbilddatei generieren, wenn der Testprozess abstürzt</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutExpired">
<source>Hang dump timeout of '{0}' expired</source>
<target state="translated">Timeout für Absturzspeicherabbild von "{0}" abgelaufen</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutOptionDescription">
<source>Specify the timeout after which the dump will be generated. The timeout value is specified in one of the following formats: 1.5h, 1.5hour, 1.5hours, 90m, 90min, 90minute, 90minutes 5400s, 5400sec, 5400second, 5400seconds. Default is 30m.</source>
<target state="translated">Geben Sie das Timeout an, nach dem das Speicherabbild generiert wird. Der Timeoutwert wird in einem der folgenden Formate angegeben: 1.5h, 1.5hour, 1.5hours, 90m, 90min, 90minute, 90minutes 5400s, 5400sec, 5400second, 5400seconds. Der Standardwert ist 30m.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutOptionInvalidArgument">
<source>'--hangdump-timeout' expects a single timeout argument</source>
<target state="translated">"--hangdump-timeout" erwartet ein einzelnes Timeoutargument.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTypeOptionDescription">
<source>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) or 'Full'. Default type is 'Full'</source>
<target state="translated">Geben Sie den Typ des Speicherabbilds an. Gültige Werte sind "Mini", "Heap", "Triage" (nur in .NET 6 und höher verfügbar) oder "Full". Der Standardtyp ist "Full".</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTypeOptionInvalidType">
<source>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) and 'Full'</source>
<target state="translated">"{0}" ist kein gültiger Speicherabbildtyp. Gültige Optionen sind "Mini", "Heap", "Triage" (nur in .NET 6 und höher verfügbar) und "Full".</target>
<note />
</trans-unit>
<trans-unit id="HangDumpUnsupportedRequestTypeErrorMessage">
<source>Request of type '{0}' is not supported</source>
<target state="translated">Anforderung vom Typ "{0}" wird nicht unterstützt</target>
<note />
</trans-unit>
<trans-unit id="HangTestListArtifactDescription">
<source>The list of tests that were running at the time of the hang</source>
<target state="translated">Die Liste der Tests, die zum Zeitpunkt des Absturzes ausgeführt wurden.</target>
<note />
</trans-unit>
<trans-unit id="HangTestListArtifactDisplayName">
<source>Hang test list</source>
<target state="translated">Liste der Tests bei Absturz</target>
<note />
</trans-unit>
<trans-unit id="MissingHangDumpMainOption">
<source>You specified one or more hang dump parameters but did not enable it, add --hangdump to the command line</source>
<target state="translated">Sie haben mindestens einen Parameter für das Absturzabbild angegeben, aber nicht aktiviert. Fügen Sie der Befehlszeile „--hangdump“ hinzu.</target>
<note />
</trans-unit>
<trans-unit id="MutexDoesNotExistErrorMessage">
<source>Cannot find mutex '{0}'</source>
<target state="translated">Mutex "{0}" wurde nicht gefunden</target>
<note />
</trans-unit>
<trans-unit id="MutexNameReceptionTimeoutErrorMessage">
<source>Mutex name wasn't received after '{0}' seconds</source>
<target state="translated">Der Mutexname wurde nach "{0}" Sekunden nicht empfangen.</target>
<note />
</trans-unit>
<trans-unit id="RunningTestsWhileDumping">
<source>The following tests were still running when dump was taken (format: [&lt;time-elapsed-since-start&gt;] &lt;name&gt;):</source>
<target state="translated">Die folgenden Tests wurden noch ausgeführt, als das Speicherabbild erstellt wurde (Format: [&lt;time-elapsed-since-start&gt;] &lt;name&gt;):</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Просмотреть файл

@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="es" original="../ExtensionResources.resx">
<body>
<trans-unit id="CreatingDumpFile">
<source>Creating dump file '{0}'</source>
<target state="translated">Creando archivo de volcado '{0}'</target>
<note />
</trans-unit>
<trans-unit id="HangDumpArtifactDescription">
<source>The hang dump file</source>
<target state="translated">El archivo de volcado de memoria</target>
<note />
</trans-unit>
<trans-unit id="HangDumpArtifactDisplayName">
<source>Hang dump file</source>
<target state="translated">Archivo de volcado de bloqueo</target>
<note />
</trans-unit>
<trans-unit id="HangDumpEnvironmentVariableInvalidValueErrorMessage">
<source>Environment variable '{0}' is set to '{1}' instead of '{2}'</source>
<target state="translated">La variable de entorno '{0}' se establece en '{1}' en lugar de '{2}'</target>
<note />
</trans-unit>
<trans-unit id="HangDumpEnvironmentVariableIsMissingErrorMessage">
<source>Environment variable '{0}' is not set</source>
<target state="translated">La variable de entorno '{0}' no está establecida</target>
<note />
</trans-unit>
<trans-unit id="HangDumpExtensionDescription">
<source>Produce hang dump files when a test execution exceed a given time.</source>
<target state="translated">Genere archivos de volcado de memoria cuando una ejecución de prueba supere un tiempo determinado.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpExtensionDisplayName">
<source>Hang dump</source>
<target state="translated">Volcado de memoria</target>
<note />
</trans-unit>
<trans-unit id="HangDumpFileNameOptionDescription">
<source>Specify the name of the dump file</source>
<target state="translated">Especificar el nombre del archivo de volcado</target>
<note />
</trans-unit>
<trans-unit id="HangDumpOptionDescription">
<source>Generate a dump file if the test process hangs</source>
<target state="translated">Generar un archivo de volcado si el proceso de prueba se bloquea</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutExpired">
<source>Hang dump timeout of '{0}' expired</source>
<target state="translated">Tiempo de espera de volcado de bloqueo de '{0}' expirado</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutOptionDescription">
<source>Specify the timeout after which the dump will be generated. The timeout value is specified in one of the following formats: 1.5h, 1.5hour, 1.5hours, 90m, 90min, 90minute, 90minutes 5400s, 5400sec, 5400second, 5400seconds. Default is 30m.</source>
<target state="translated">Especifique el tiempo de espera después del cual se generará el volcado. El valor de tiempo de espera se especifica en uno de los formatos siguientes: 1.5h, 1.5hour, 1.5hours, 90m, 90min, 90minute, 90minutes 5400s, 5400sec, 5400second, 5400seconds. El valor predeterminado es 30 m.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutOptionInvalidArgument">
<source>'--hangdump-timeout' expects a single timeout argument</source>
<target state="translated">'--hangdump-timeout' espera un único argumento de tiempo de espera</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTypeOptionDescription">
<source>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) or 'Full'. Default type is 'Full'</source>
<target state="translated">Especifique el tipo de volcado. Los valores válidos son "Mini", "Heap", "Triage" (solo disponible en .NET 6+) o "Full". El tipo predeterminado es 'Full'</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTypeOptionInvalidType">
<source>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) and 'Full'</source>
<target state="translated">'{0}' no es un tipo de volcado válido. Las opciones válidas son "Mini", "Montón", "Evaluación de prioridades" (solo disponible en .NET 6+) y "Full"</target>
<note />
</trans-unit>
<trans-unit id="HangDumpUnsupportedRequestTypeErrorMessage">
<source>Request of type '{0}' is not supported</source>
<target state="translated">No se admite la solicitud de tipo '{0}'</target>
<note />
</trans-unit>
<trans-unit id="HangTestListArtifactDescription">
<source>The list of tests that were running at the time of the hang</source>
<target state="translated">Lista de pruebas que se estaban ejecutando en el momento del bloqueo</target>
<note />
</trans-unit>
<trans-unit id="HangTestListArtifactDisplayName">
<source>Hang test list</source>
<target state="translated">Lista de pruebas de bloqueo</target>
<note />
</trans-unit>
<trans-unit id="MissingHangDumpMainOption">
<source>You specified one or more hang dump parameters but did not enable it, add --hangdump to the command line</source>
<target state="translated">Ha especificado uno o varios parámetros de volcado de memoria, pero no los ha habilitado. Agregue --hangdump a la línea de comandos.</target>
<note />
</trans-unit>
<trans-unit id="MutexDoesNotExistErrorMessage">
<source>Cannot find mutex '{0}'</source>
<target state="translated">No se encuentra la exclusión mutua '{0}'</target>
<note />
</trans-unit>
<trans-unit id="MutexNameReceptionTimeoutErrorMessage">
<source>Mutex name wasn't received after '{0}' seconds</source>
<target state="translated">No se recibió el nombre de exclusión mutua después de '{0}' segundos</target>
<note />
</trans-unit>
<trans-unit id="RunningTestsWhileDumping">
<source>The following tests were still running when dump was taken (format: [&lt;time-elapsed-since-start&gt;] &lt;name&gt;):</source>
<target state="translated">Las siguientes pruebas aún se estaban ejecutando cuando se realizó el volcado (formato: [&lt;time-elapsed-since-start&gt;] &lt;name&gt;):</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Просмотреть файл

@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="fr" original="../ExtensionResources.resx">
<body>
<trans-unit id="CreatingDumpFile">
<source>Creating dump file '{0}'</source>
<target state="translated">Création du fichier de vidage «{0}»</target>
<note />
</trans-unit>
<trans-unit id="HangDumpArtifactDescription">
<source>The hang dump file</source>
<target state="translated">Fichier de vidage de blocage</target>
<note />
</trans-unit>
<trans-unit id="HangDumpArtifactDisplayName">
<source>Hang dump file</source>
<target state="translated">Bloquer le fichier de vidage</target>
<note />
</trans-unit>
<trans-unit id="HangDumpEnvironmentVariableInvalidValueErrorMessage">
<source>Environment variable '{0}' is set to '{1}' instead of '{2}'</source>
<target state="translated">La variable denvironnement «{0}» a la valeur «{1}» au lieu de «{2}»</target>
<note />
</trans-unit>
<trans-unit id="HangDumpEnvironmentVariableIsMissingErrorMessage">
<source>Environment variable '{0}' is not set</source>
<target state="translated">La variable denvironnement '{0}' nest pas définie</target>
<note />
</trans-unit>
<trans-unit id="HangDumpExtensionDescription">
<source>Produce hang dump files when a test execution exceed a given time.</source>
<target state="translated">Produire des fichiers de vidage de blocage lorsquune exécution de test dépasse un délai donné.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpExtensionDisplayName">
<source>Hang dump</source>
<target state="translated">Blocage de limage mémoire</target>
<note />
</trans-unit>
<trans-unit id="HangDumpFileNameOptionDescription">
<source>Specify the name of the dump file</source>
<target state="translated">Spécifier le nom du fichier de vidage</target>
<note />
</trans-unit>
<trans-unit id="HangDumpOptionDescription">
<source>Generate a dump file if the test process hangs</source>
<target state="translated">Générer un fichier de vidage si le processus de test se bloque</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutExpired">
<source>Hang dump timeout of '{0}' expired</source>
<target state="translated">Expiration du délai dexpiration du vidage du blocage de «{0}»</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutOptionDescription">
<source>Specify the timeout after which the dump will be generated. The timeout value is specified in one of the following formats: 1.5h, 1.5hour, 1.5hours, 90m, 90min, 90minute, 90minutes 5400s, 5400sec, 5400second, 5400seconds. Default is 30m.</source>
<target state="translated">Spécifiez le délai dexpiration après lequel le vidage sera généré. La valeur du délai d'attente est spécifiée dans l'un des formats suivants : 1,5 h, 1,5 heure, 1,5 heure, 90 m, 90 min, 90 minutes, 90 minutes 5 400 s, 5 400 s, 5 400 secondes, 5 400 secondes. La valeur par défaut est 30 m.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutOptionInvalidArgument">
<source>'--hangdump-timeout' expects a single timeout argument</source>
<target state="translated">'--hangdump-timeout' attend un seul argument de délai d'attente</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTypeOptionDescription">
<source>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) or 'Full'. Default type is 'Full'</source>
<target state="translated">Spécifiez le type de limage mémoire. Les valeurs valides sont « Mini », « Heap », « Triage » (uniquement disponible dans .NET 6+) ou « Full ». Le type par défaut est ' Full'</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTypeOptionInvalidType">
<source>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) and 'Full'</source>
<target state="translated">'{0}' nest pas un type de vidage valide. Les options valides sont « Mini », « Heap », « Triage » (uniquement disponible dans .NET 6+) et « Full »</target>
<note />
</trans-unit>
<trans-unit id="HangDumpUnsupportedRequestTypeErrorMessage">
<source>Request of type '{0}' is not supported</source>
<target state="translated">La requête de type '{0}' nest pas prise en charge</target>
<note />
</trans-unit>
<trans-unit id="HangTestListArtifactDescription">
<source>The list of tests that were running at the time of the hang</source>
<target state="translated">Liste des tests en cours dexécution au moment du blocage</target>
<note />
</trans-unit>
<trans-unit id="HangTestListArtifactDisplayName">
<source>Hang test list</source>
<target state="translated">Bloquer la liste de tests</target>
<note />
</trans-unit>
<trans-unit id="MissingHangDumpMainOption">
<source>You specified one or more hang dump parameters but did not enable it, add --hangdump to the command line</source>
<target state="translated">Vous avez spécifié un ou plusieurs paramètres de vidage sur blocage, mais vous ne lavez pas activé. Ajoutez --hangdump à la ligne de commande</target>
<note />
</trans-unit>
<trans-unit id="MutexDoesNotExistErrorMessage">
<source>Cannot find mutex '{0}'</source>
<target state="translated">Impossible de trouver le mutex '{0}'</target>
<note />
</trans-unit>
<trans-unit id="MutexNameReceptionTimeoutErrorMessage">
<source>Mutex name wasn't received after '{0}' seconds</source>
<target state="translated">Le nom du mutex n'a pas été reçu après « {0} » secondes</target>
<note />
</trans-unit>
<trans-unit id="RunningTestsWhileDumping">
<source>The following tests were still running when dump was taken (format: [&lt;time-elapsed-since-start&gt;] &lt;name&gt;):</source>
<target state="translated">Les tests suivants étaient toujours en cours d'exécution au moment du vidage (format : [&lt;time-elapsed-since-start&gt;] &lt;name&gt;) :</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Просмотреть файл

@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="it" original="../ExtensionResources.resx">
<body>
<trans-unit id="CreatingDumpFile">
<source>Creating dump file '{0}'</source>
<target state="translated">Creazione del file di dump '{0}'</target>
<note />
</trans-unit>
<trans-unit id="HangDumpArtifactDescription">
<source>The hang dump file</source>
<target state="translated">Il file di dump di blocco</target>
<note />
</trans-unit>
<trans-unit id="HangDumpArtifactDisplayName">
<source>Hang dump file</source>
<target state="translated">File dump di blocco</target>
<note />
</trans-unit>
<trans-unit id="HangDumpEnvironmentVariableInvalidValueErrorMessage">
<source>Environment variable '{0}' is set to '{1}' instead of '{2}'</source>
<target state="translated">La variabile di ambiente '{0}' è impostata su '{1}' anziché su '{2}'</target>
<note />
</trans-unit>
<trans-unit id="HangDumpEnvironmentVariableIsMissingErrorMessage">
<source>Environment variable '{0}' is not set</source>
<target state="translated">La variabile di ambiente '{0}' non è impostata</target>
<note />
</trans-unit>
<trans-unit id="HangDumpExtensionDescription">
<source>Produce hang dump files when a test execution exceed a given time.</source>
<target state="translated">Genera file di dump di blocco quando l'esecuzione di un test supera un determinato periodo di tempo.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpExtensionDisplayName">
<source>Hang dump</source>
<target state="translated">Dump di blocco</target>
<note />
</trans-unit>
<trans-unit id="HangDumpFileNameOptionDescription">
<source>Specify the name of the dump file</source>
<target state="translated">Specificare il nome del file di dump</target>
<note />
</trans-unit>
<trans-unit id="HangDumpOptionDescription">
<source>Generate a dump file if the test process hangs</source>
<target state="translated">Generare un file di dump se il processo di test si blocca</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutExpired">
<source>Hang dump timeout of '{0}' expired</source>
<target state="translated">Timeout dump di blocco di '{0}' scaduto</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutOptionDescription">
<source>Specify the timeout after which the dump will be generated. The timeout value is specified in one of the following formats: 1.5h, 1.5hour, 1.5hours, 90m, 90min, 90minute, 90minutes 5400s, 5400sec, 5400second, 5400seconds. Default is 30m.</source>
<target state="translated">Specificare il timeout dopo il quale verrà generato il dump. Il valore di timeout è specificato in uno dei seguenti formati: 1.5h, 1.5hour, 1.5hours, 90m, 90min, 90minute, 90minutes 5400s, 5400sec, 5400second, 5400seconds. Il valore predefinito è 30m.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutOptionInvalidArgument">
<source>'--hangdump-timeout' expects a single timeout argument</source>
<target state="translated">'--hangdump-timeout' prevede un singolo argomento di timeout</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTypeOptionDescription">
<source>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) or 'Full'. Default type is 'Full'</source>
<target state="translated">Specificare il tipo di dump. I valori ammessi sono 'Mini', 'Heap', 'Triage' (disponibile solo in .NET 6+) o 'Full'. Il tipo predefinito è 'Full'</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTypeOptionInvalidType">
<source>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) and 'Full'</source>
<target state="translated">'{0}' non è un tipo di dump valido. Le opzioni valide sono 'Mini', 'Heap', 'Triage' (disponibile solo in .NET 6+) e 'Full'.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpUnsupportedRequestTypeErrorMessage">
<source>Request of type '{0}' is not supported</source>
<target state="translated">La richiesta di tipo '{0}' non è supportata</target>
<note />
</trans-unit>
<trans-unit id="HangTestListArtifactDescription">
<source>The list of tests that were running at the time of the hang</source>
<target state="translated">Elenco di test in esecuzione al momento del blocco</target>
<note />
</trans-unit>
<trans-unit id="HangTestListArtifactDisplayName">
<source>Hang test list</source>
<target state="translated">Blocca elenco dei test</target>
<note />
</trans-unit>
<trans-unit id="MissingHangDumpMainOption">
<source>You specified one or more hang dump parameters but did not enable it, add --hangdump to the command line</source>
<target state="translated">Sono stati specificati uno o più parametri del dump di blocco ma non sono stati abilitati. Aggiungere --hangdump alla riga di comando</target>
<note />
</trans-unit>
<trans-unit id="MutexDoesNotExistErrorMessage">
<source>Cannot find mutex '{0}'</source>
<target state="translated">Non è possibile trovare il mutex '{0}'</target>
<note />
</trans-unit>
<trans-unit id="MutexNameReceptionTimeoutErrorMessage">
<source>Mutex name wasn't received after '{0}' seconds</source>
<target state="translated">Il nome del mutex non è stato ricevuto dopo '{0}' secondi</target>
<note />
</trans-unit>
<trans-unit id="RunningTestsWhileDumping">
<source>The following tests were still running when dump was taken (format: [&lt;time-elapsed-since-start&gt;] &lt;name&gt;):</source>
<target state="translated">I seguenti test erano ancora in esecuzione quando è stato eseguito il dump (formato: [&lt;time-elapsed-since-start&gt;] &lt;name&gt;):</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Просмотреть файл

@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ja" original="../ExtensionResources.resx">
<body>
<trans-unit id="CreatingDumpFile">
<source>Creating dump file '{0}'</source>
<target state="translated">ダンプ ファイル '{0}' を作成しています</target>
<note />
</trans-unit>
<trans-unit id="HangDumpArtifactDescription">
<source>The hang dump file</source>
<target state="translated">ハング ダンプ ファイル</target>
<note />
</trans-unit>
<trans-unit id="HangDumpArtifactDisplayName">
<source>Hang dump file</source>
<target state="translated">ハング ダンプ ファイル</target>
<note />
</trans-unit>
<trans-unit id="HangDumpEnvironmentVariableInvalidValueErrorMessage">
<source>Environment variable '{0}' is set to '{1}' instead of '{2}'</source>
<target state="translated">環境変数 '{0}' は '{2}' ではなく '{1}' に設定されています</target>
<note />
</trans-unit>
<trans-unit id="HangDumpEnvironmentVariableIsMissingErrorMessage">
<source>Environment variable '{0}' is not set</source>
<target state="translated">環境変数 '{0}' が設定されていません</target>
<note />
</trans-unit>
<trans-unit id="HangDumpExtensionDescription">
<source>Produce hang dump files when a test execution exceed a given time.</source>
<target state="translated">テストの実行が指定された時間を超えたときにハング ダンプ ファイルを生成します。</target>
<note />
</trans-unit>
<trans-unit id="HangDumpExtensionDisplayName">
<source>Hang dump</source>
<target state="translated">ハング ダンプ</target>
<note />
</trans-unit>
<trans-unit id="HangDumpFileNameOptionDescription">
<source>Specify the name of the dump file</source>
<target state="translated">ダンプ ファイルの名前を指定する</target>
<note />
</trans-unit>
<trans-unit id="HangDumpOptionDescription">
<source>Generate a dump file if the test process hangs</source>
<target state="translated">テスト プロセスがハングした場合にダンプ ファイルを生成する</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutExpired">
<source>Hang dump timeout of '{0}' expired</source>
<target state="translated">'{0}' のハング ダンプ タイムアウトの有効期限が切れました</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutOptionDescription">
<source>Specify the timeout after which the dump will be generated. The timeout value is specified in one of the following formats: 1.5h, 1.5hour, 1.5hours, 90m, 90min, 90minute, 90minutes 5400s, 5400sec, 5400second, 5400seconds. Default is 30m.</source>
<target state="translated">ダンプが生成されるまでのタイムアウトを指定します。タイムアウト値は、次のいずれかの形式で指定されます 1.5h、1.5hour、1.5hours、90m、90min、90minute、90minutes、5400s、5400sec、5400second、5400seconds.。既定値は 30m です。</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutOptionInvalidArgument">
<source>'--hangdump-timeout' expects a single timeout argument</source>
<target state="translated">'--hangdump-timeout' には 1 つのタイムアウト引数が必要です</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTypeOptionDescription">
<source>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) or 'Full'. Default type is 'Full'</source>
<target state="translated">ダンプの型を指定します。有効な値は、'Mini'、'Heap'、'Triage' (.NET 6 以降でのみ利用可能)、または 'Full' です。既定の型は 'Full' です</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTypeOptionInvalidType">
<source>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) and 'Full'</source>
<target state="translated">'{0}' は有効なダンプの種類ではありません。有効なオプションは、'Mini'、'Heap'、'Triage' (.NET 6 以降でのみ利用可能)、'Full' です</target>
<note />
</trans-unit>
<trans-unit id="HangDumpUnsupportedRequestTypeErrorMessage">
<source>Request of type '{0}' is not supported</source>
<target state="translated">型 '{0}' の要求はサポートされていません</target>
<note />
</trans-unit>
<trans-unit id="HangTestListArtifactDescription">
<source>The list of tests that were running at the time of the hang</source>
<target state="translated">ハング時に実行されていたテストの一覧</target>
<note />
</trans-unit>
<trans-unit id="HangTestListArtifactDisplayName">
<source>Hang test list</source>
<target state="translated">ハング テスト リスト</target>
<note />
</trans-unit>
<trans-unit id="MissingHangDumpMainOption">
<source>You specified one or more hang dump parameters but did not enable it, add --hangdump to the command line</source>
<target state="translated">1 つ以上のハング ダンプ パラメーターを指定しましたが、有効にしませんでした。コマンド ラインに --hangdump を追加してください</target>
<note />
</trans-unit>
<trans-unit id="MutexDoesNotExistErrorMessage">
<source>Cannot find mutex '{0}'</source>
<target state="translated">ミューテックス '{0}' が見つかりません</target>
<note />
</trans-unit>
<trans-unit id="MutexNameReceptionTimeoutErrorMessage">
<source>Mutex name wasn't received after '{0}' seconds</source>
<target state="translated">'{0}' 秒後にミューテックス名が受信されませんでした</target>
<note />
</trans-unit>
<trans-unit id="RunningTestsWhileDumping">
<source>The following tests were still running when dump was taken (format: [&lt;time-elapsed-since-start&gt;] &lt;name&gt;):</source>
<target state="translated">ダンプの取得時に次のテストがまだ実行されていました (形式: [&lt;time-elapsed-since-start&gt;] &lt;name&gt;):</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Просмотреть файл

@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ko" original="../ExtensionResources.resx">
<body>
<trans-unit id="CreatingDumpFile">
<source>Creating dump file '{0}'</source>
<target state="translated">덤프 파일 '{0}'을(를) 만드는 중</target>
<note />
</trans-unit>
<trans-unit id="HangDumpArtifactDescription">
<source>The hang dump file</source>
<target state="translated">중단 덤프 파일</target>
<note />
</trans-unit>
<trans-unit id="HangDumpArtifactDisplayName">
<source>Hang dump file</source>
<target state="translated">중단 덤프 파일</target>
<note />
</trans-unit>
<trans-unit id="HangDumpEnvironmentVariableInvalidValueErrorMessage">
<source>Environment variable '{0}' is set to '{1}' instead of '{2}'</source>
<target state="translated">환경 변수 '{0}'이(가) '{2}' 대신 '{1}'로 설정되어 있습니다.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpEnvironmentVariableIsMissingErrorMessage">
<source>Environment variable '{0}' is not set</source>
<target state="translated">환경 변수 {0}’이(가) 설정되지 않았습니다.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpExtensionDescription">
<source>Produce hang dump files when a test execution exceed a given time.</source>
<target state="translated">테스트 실행이 지정된 시간을 초과하면 중단 덤프 파일을 생성합니다.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpExtensionDisplayName">
<source>Hang dump</source>
<target state="translated">덤프 중단</target>
<note />
</trans-unit>
<trans-unit id="HangDumpFileNameOptionDescription">
<source>Specify the name of the dump file</source>
<target state="translated">덤프 파일의 이름 지정</target>
<note />
</trans-unit>
<trans-unit id="HangDumpOptionDescription">
<source>Generate a dump file if the test process hangs</source>
<target state="translated">테스트 프로세스가 중단되면 덤프 파일 생성</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutExpired">
<source>Hang dump timeout of '{0}' expired</source>
<target state="translated">'{0}'의 중단 덤프 시간 제한이 만료되었습니다.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutOptionDescription">
<source>Specify the timeout after which the dump will be generated. The timeout value is specified in one of the following formats: 1.5h, 1.5hour, 1.5hours, 90m, 90min, 90minute, 90minutes 5400s, 5400sec, 5400second, 5400seconds. Default is 30m.</source>
<target state="translated">덤프가 생성되기 전까지의 시간 제한을 지정합니다. 시간 제한 값은 1.5h, 1.5hour, 1.5hours, 90m, 90min, 90minute, 90minutes 5400s, 5400sec, 5400second, 5400seconds 형식 중 하나로 지정됩니다. 기본값은 30m입니다.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutOptionInvalidArgument">
<source>'--hangdump-timeout' expects a single timeout argument</source>
<target state="translated">'--hangdump-timeout'에는 단일 시간 제한 인수가 필요합니다.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTypeOptionDescription">
<source>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) or 'Full'. Default type is 'Full'</source>
<target state="translated">덤프 유형을 지정하십시오. 유효한 값은 'Mini', 'Heap', 'Triage'(.NET 6 이상에서만 사용 가능) 또는 'Full'입니다. 기본 유형은 'Full'입니다.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTypeOptionInvalidType">
<source>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) and 'Full'</source>
<target state="translated">'{0}'은(는) 올바른 덤프 유형이 아닙니다. 유효한 옵션은 'Mini', 'Heap', 'Triage'(.NET 6 이상에서만 사용 가능) 및 'Full'입니다.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpUnsupportedRequestTypeErrorMessage">
<source>Request of type '{0}' is not supported</source>
<target state="translated">'{0}' 유형의 요청은 지원되지 않습니다.</target>
<note />
</trans-unit>
<trans-unit id="HangTestListArtifactDescription">
<source>The list of tests that were running at the time of the hang</source>
<target state="translated">중단 시 실행된 테스트 목록입니다.</target>
<note />
</trans-unit>
<trans-unit id="HangTestListArtifactDisplayName">
<source>Hang test list</source>
<target state="translated">테스트 목록 중단</target>
<note />
</trans-unit>
<trans-unit id="MissingHangDumpMainOption">
<source>You specified one or more hang dump parameters but did not enable it, add --hangdump to the command line</source>
<target state="translated">하나 이상의 중단 덤프 매개 변수를 지정했지만 사용하도록 설정하지 않았습니다. 명령줄에 --hangdump를 추가하세요.</target>
<note />
</trans-unit>
<trans-unit id="MutexDoesNotExistErrorMessage">
<source>Cannot find mutex '{0}'</source>
<target state="translated">뮤텍스 '{0}'을(를) 찾을 수 없습니다.</target>
<note />
</trans-unit>
<trans-unit id="MutexNameReceptionTimeoutErrorMessage">
<source>Mutex name wasn't received after '{0}' seconds</source>
<target state="translated">'{0}' 초 후에 뮤텍스 이름을 받지 못했습니다.</target>
<note />
</trans-unit>
<trans-unit id="RunningTestsWhileDumping">
<source>The following tests were still running when dump was taken (format: [&lt;time-elapsed-since-start&gt;] &lt;name&gt;):</source>
<target state="translated">덤프를 수행할 때 다음 테스트가 계속 실행되고 있었습니다(형식: [&lt;time-elapsed-since-start&gt;] &lt;name&gt;).</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Просмотреть файл

@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="pl" original="../ExtensionResources.resx">
<body>
<trans-unit id="CreatingDumpFile">
<source>Creating dump file '{0}'</source>
<target state="translated">Tworzenie pliku zrzutu „{0}”</target>
<note />
</trans-unit>
<trans-unit id="HangDumpArtifactDescription">
<source>The hang dump file</source>
<target state="translated">Plik zrzutu zawieszenia</target>
<note />
</trans-unit>
<trans-unit id="HangDumpArtifactDisplayName">
<source>Hang dump file</source>
<target state="translated">Zawieszanie pliku zrzutu</target>
<note />
</trans-unit>
<trans-unit id="HangDumpEnvironmentVariableInvalidValueErrorMessage">
<source>Environment variable '{0}' is set to '{1}' instead of '{2}'</source>
<target state="translated">Zmienna środowiskowa „{0}” jest ustawiona na wartość „{1}” zamiast „{2}”</target>
<note />
</trans-unit>
<trans-unit id="HangDumpEnvironmentVariableIsMissingErrorMessage">
<source>Environment variable '{0}' is not set</source>
<target state="translated">Zmienna środowiskowa „{0}” nie jest ustawiona</target>
<note />
</trans-unit>
<trans-unit id="HangDumpExtensionDescription">
<source>Produce hang dump files when a test execution exceed a given time.</source>
<target state="translated">Utwórz pliki zrzutu zawieszenia, gdy wykonanie testu przekroczy dany czas.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpExtensionDisplayName">
<source>Hang dump</source>
<target state="translated">Zrzut zawieszenia</target>
<note />
</trans-unit>
<trans-unit id="HangDumpFileNameOptionDescription">
<source>Specify the name of the dump file</source>
<target state="translated">Określ nazwę pliku zrzutu</target>
<note />
</trans-unit>
<trans-unit id="HangDumpOptionDescription">
<source>Generate a dump file if the test process hangs</source>
<target state="translated">Wygeneruj plik zrzutu, jeśli proces testowy zawiesza się</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutExpired">
<source>Hang dump timeout of '{0}' expired</source>
<target state="translated">Upłynął limit czasu zrzutu zawieszenia „{0}”</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutOptionDescription">
<source>Specify the timeout after which the dump will be generated. The timeout value is specified in one of the following formats: 1.5h, 1.5hour, 1.5hours, 90m, 90min, 90minute, 90minutes 5400s, 5400sec, 5400second, 5400seconds. Default is 30m.</source>
<target state="translated">Określ limit czasu, po którym zostanie wygenerowany zrzut. Wartość limitu czasu jest określona w jednym z następujących formatów: 1,5 godziny, 1,5 godziny, 90 m, 90 min, 90 minut, 90 minut 5400 s, 5400 s, 5400 sekund, 5400 sekund, 5400 sekund. Wartość domyślna to 30 m.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutOptionInvalidArgument">
<source>'--hangdump-timeout' expects a single timeout argument</source>
<target state="translated">Element „--hangdump-timeout” oczekuje pojedynczego argumentu limitu czasu</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTypeOptionDescription">
<source>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) or 'Full'. Default type is 'Full'</source>
<target state="translated">Określ typ zrzutu. Prawidłowe wartości to "Mini", "Heap", "Triage" (dostępne tylko na platformie .NET 6+) lub „Pełne”. Domyślny typ to „Pełne”</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTypeOptionInvalidType">
<source>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) and 'Full'</source>
<target state="translated">Typ „{0}” nie jest prawidłowym typem zrzutu. Prawidłowe opcje to „Mini”, „Sterta", "Klasyfikacja" (dostępne tylko na platformie .NET 6+) i „Pełne”</target>
<note />
</trans-unit>
<trans-unit id="HangDumpUnsupportedRequestTypeErrorMessage">
<source>Request of type '{0}' is not supported</source>
<target state="translated">Żądanie typu „{0}” nie jest obsługiwane</target>
<note />
</trans-unit>
<trans-unit id="HangTestListArtifactDescription">
<source>The list of tests that were running at the time of the hang</source>
<target state="translated">Lista testów, które były uruchamiane w czasie zawieszenia</target>
<note />
</trans-unit>
<trans-unit id="HangTestListArtifactDisplayName">
<source>Hang test list</source>
<target state="translated">Lista testów zawieszenia</target>
<note />
</trans-unit>
<trans-unit id="MissingHangDumpMainOption">
<source>You specified one or more hang dump parameters but did not enable it, add --hangdump to the command line</source>
<target state="translated">Określono co najmniej jeden parametr zrzutu zawieszenia, ale go nie włączono. Dodaj parametr --hangdump do wiersza polecenia</target>
<note />
</trans-unit>
<trans-unit id="MutexDoesNotExistErrorMessage">
<source>Cannot find mutex '{0}'</source>
<target state="translated">Nie można odnaleźć obiektu mutex „{0}”</target>
<note />
</trans-unit>
<trans-unit id="MutexNameReceptionTimeoutErrorMessage">
<source>Mutex name wasn't received after '{0}' seconds</source>
<target state="translated">Nazwa obiektu Mutex nie została odebrana po „{0}” s</target>
<note />
</trans-unit>
<trans-unit id="RunningTestsWhileDumping">
<source>The following tests were still running when dump was taken (format: [&lt;time-elapsed-since-start&gt;] &lt;name&gt;):</source>
<target state="translated">Następujące testy były nadal uruchomione podczas wykonywania zrzutu (format: [&lt;time-elapsed-since-start&gt;] &lt;name&gt;):</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Просмотреть файл

@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="pt-BR" original="../ExtensionResources.resx">
<body>
<trans-unit id="CreatingDumpFile">
<source>Creating dump file '{0}'</source>
<target state="translated">Criando arquivo de despejo ''{0}''</target>
<note />
</trans-unit>
<trans-unit id="HangDumpArtifactDescription">
<source>The hang dump file</source>
<target state="translated">O arquivo de despejo de travamento</target>
<note />
</trans-unit>
<trans-unit id="HangDumpArtifactDisplayName">
<source>Hang dump file</source>
<target state="translated">Arquivo de despejo de travamento</target>
<note />
</trans-unit>
<trans-unit id="HangDumpEnvironmentVariableInvalidValueErrorMessage">
<source>Environment variable '{0}' is set to '{1}' instead of '{2}'</source>
<target state="translated">A variável de ambiente ''{0}'' ambiente está definida como ''{1}'' em vez de ''{2}''</target>
<note />
</trans-unit>
<trans-unit id="HangDumpEnvironmentVariableIsMissingErrorMessage">
<source>Environment variable '{0}' is not set</source>
<target state="translated">A variável de ambiente ''{0}'' não está definida</target>
<note />
</trans-unit>
<trans-unit id="HangDumpExtensionDescription">
<source>Produce hang dump files when a test execution exceed a given time.</source>
<target state="translated">Produzir arquivos de despejo de travamento quando uma execução de teste exceder um determinado tempo.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpExtensionDisplayName">
<source>Hang dump</source>
<target state="translated">Despejo de travamento</target>
<note />
</trans-unit>
<trans-unit id="HangDumpFileNameOptionDescription">
<source>Specify the name of the dump file</source>
<target state="translated">Especifique o nome do arquivo de despejo</target>
<note />
</trans-unit>
<trans-unit id="HangDumpOptionDescription">
<source>Generate a dump file if the test process hangs</source>
<target state="translated">Gerar um arquivo de despejo se o processo de teste travar</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutExpired">
<source>Hang dump timeout of '{0}' expired</source>
<target state="translated">Tempo limite de despejo de travamento de ''{0}'' expirado</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutOptionDescription">
<source>Specify the timeout after which the dump will be generated. The timeout value is specified in one of the following formats: 1.5h, 1.5hour, 1.5hours, 90m, 90min, 90minute, 90minutes 5400s, 5400sec, 5400second, 5400seconds. Default is 30m.</source>
<target state="translated">Especifique o tempo limite após o qual o despejo será gerado. O valor de tempo limite é especificado em um dos seguintes formatos: 1.5h, 1,5hora, 1,5horas, 90m, 90min, 90minuto, 90minutos 5400s, 5400seg, 5400segundo, 5400segundos. O padrão é 30m.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutOptionInvalidArgument">
<source>'--hangdump-timeout' expects a single timeout argument</source>
<target state="translated">''--hangdump-timeout'' espera um único argumento de tempo limite</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTypeOptionDescription">
<source>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) or 'Full'. Default type is 'Full'</source>
<target state="translated">Especifique o tipo de despejo. Os valores válidos são ''Mini'', ''Heap'', ''Triage'' (disponível somente no .NET 6+) e ''Full'' O tipo padrão é ''Full''</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTypeOptionInvalidType">
<source>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) and 'Full'</source>
<target state="translated">''{0}'' não é um tipo de despejo válido. As opções válidas são ''Mini'', ''Heap'', ''Triage'' (disponível somente no .NET 6+) e ''Full''</target>
<note />
</trans-unit>
<trans-unit id="HangDumpUnsupportedRequestTypeErrorMessage">
<source>Request of type '{0}' is not supported</source>
<target state="translated">Não há suporte para a solicitação do tipo ''{0}''</target>
<note />
</trans-unit>
<trans-unit id="HangTestListArtifactDescription">
<source>The list of tests that were running at the time of the hang</source>
<target state="translated">A lista de testes que estavam sendo executados no momento do travamento</target>
<note />
</trans-unit>
<trans-unit id="HangTestListArtifactDisplayName">
<source>Hang test list</source>
<target state="translated">Lista de testes de travamento</target>
<note />
</trans-unit>
<trans-unit id="MissingHangDumpMainOption">
<source>You specified one or more hang dump parameters but did not enable it, add --hangdump to the command line</source>
<target state="translated">Você especificou um ou mais parâmetros de hang dump, mas não os ativou, adicione --hangdump à linha de comando</target>
<note />
</trans-unit>
<trans-unit id="MutexDoesNotExistErrorMessage">
<source>Cannot find mutex '{0}'</source>
<target state="translated">Não é possível localizar o mutex ''{0}''</target>
<note />
</trans-unit>
<trans-unit id="MutexNameReceptionTimeoutErrorMessage">
<source>Mutex name wasn't received after '{0}' seconds</source>
<target state="translated">O nome do mutex não foi recebido após ''{0}'' segundos</target>
<note />
</trans-unit>
<trans-unit id="RunningTestsWhileDumping">
<source>The following tests were still running when dump was taken (format: [&lt;time-elapsed-since-start&gt;] &lt;name&gt;):</source>
<target state="translated">Os testes a seguir ainda estavam em execução quando o despejo foi realizado (formato: [&lt;time-elapsed-since-start&gt;] &lt;name&gt;):</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Просмотреть файл

@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ru" original="../ExtensionResources.resx">
<body>
<trans-unit id="CreatingDumpFile">
<source>Creating dump file '{0}'</source>
<target state="translated">Создание файла дампа "{0}"</target>
<note />
</trans-unit>
<trans-unit id="HangDumpArtifactDescription">
<source>The hang dump file</source>
<target state="translated">Файл дампа зависания</target>
<note />
</trans-unit>
<trans-unit id="HangDumpArtifactDisplayName">
<source>Hang dump file</source>
<target state="translated">Файл дампа зависания</target>
<note />
</trans-unit>
<trans-unit id="HangDumpEnvironmentVariableInvalidValueErrorMessage">
<source>Environment variable '{0}' is set to '{1}' instead of '{2}'</source>
<target state="translated">Переменной среды "{0}" присвоено значение "{1}" вместо "{2}"</target>
<note />
</trans-unit>
<trans-unit id="HangDumpEnvironmentVariableIsMissingErrorMessage">
<source>Environment variable '{0}' is not set</source>
<target state="translated">Переменная среды "{0}" не задана</target>
<note />
</trans-unit>
<trans-unit id="HangDumpExtensionDescription">
<source>Produce hang dump files when a test execution exceed a given time.</source>
<target state="translated">Создавать файлы дампа зависания при превышении заданного времени выполнения теста.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpExtensionDisplayName">
<source>Hang dump</source>
<target state="translated">Дамп зависания</target>
<note />
</trans-unit>
<trans-unit id="HangDumpFileNameOptionDescription">
<source>Specify the name of the dump file</source>
<target state="translated">Укажите имя файла дампа зависания</target>
<note />
</trans-unit>
<trans-unit id="HangDumpOptionDescription">
<source>Generate a dump file if the test process hangs</source>
<target state="translated">Создавать файл дампа, если тестовый процесс завис</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutExpired">
<source>Hang dump timeout of '{0}' expired</source>
<target state="translated">Истекло время ожидания дампа зависания "{0}"</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutOptionDescription">
<source>Specify the timeout after which the dump will be generated. The timeout value is specified in one of the following formats: 1.5h, 1.5hour, 1.5hours, 90m, 90min, 90minute, 90minutes 5400s, 5400sec, 5400second, 5400seconds. Default is 30m.</source>
<target state="translated">Укажите время ожидания, по истечении которого будет создан дамп. Значение времени ожидания указано в одном из следующих форматов: 1,5 ч, 1,5 часа, 90 м, 90 мин, 90 минут, 5400 с, 5400 сек, 5400 секунд. Значение по умолчанию — 30 м.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutOptionInvalidArgument">
<source>'--hangdump-timeout' expects a single timeout argument</source>
<target state="translated">"--hangdump-timeout" ожидает один аргумент времени ожидания</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTypeOptionDescription">
<source>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) or 'Full'. Default type is 'Full'</source>
<target state="translated">Укажите тип дампа. Допустимые значения: "Mini", "Heap", "Triage" (доступно только в .NET 6+) или "Full". Тип по умолчанию — "Full"</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTypeOptionInvalidType">
<source>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) and 'Full'</source>
<target state="translated">"{0}" не является допустимым типом дампа. Допустимые параметры: "Mini", "Heap", "Triage" (доступно только в .NET 6+) и "Full"</target>
<note />
</trans-unit>
<trans-unit id="HangDumpUnsupportedRequestTypeErrorMessage">
<source>Request of type '{0}' is not supported</source>
<target state="translated">Запрос типа "{0}" не поддерживается</target>
<note />
</trans-unit>
<trans-unit id="HangTestListArtifactDescription">
<source>The list of tests that were running at the time of the hang</source>
<target state="translated">Список тестов, которые были запущены во время зависания</target>
<note />
</trans-unit>
<trans-unit id="HangTestListArtifactDisplayName">
<source>Hang test list</source>
<target state="translated">Список тестов зависаний</target>
<note />
</trans-unit>
<trans-unit id="MissingHangDumpMainOption">
<source>You specified one or more hang dump parameters but did not enable it, add --hangdump to the command line</source>
<target state="translated">Вы указали один или несколько параметров дампа зависания, но не включили его. Добавьте --hangdump в командную строку</target>
<note />
</trans-unit>
<trans-unit id="MutexDoesNotExistErrorMessage">
<source>Cannot find mutex '{0}'</source>
<target state="translated">Не удается найти мьютекс "{0}".</target>
<note />
</trans-unit>
<trans-unit id="MutexNameReceptionTimeoutErrorMessage">
<source>Mutex name wasn't received after '{0}' seconds</source>
<target state="translated">Имя мьютекса не было получено через "{0}" секунд</target>
<note />
</trans-unit>
<trans-unit id="RunningTestsWhileDumping">
<source>The following tests were still running when dump was taken (format: [&lt;time-elapsed-since-start&gt;] &lt;name&gt;):</source>
<target state="translated">При создании дампа все еще выполнялись следующие тесты (формат: [&lt;time-elapsed-since-start&gt;] &lt;name&gt;):</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Просмотреть файл

@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="tr" original="../ExtensionResources.resx">
<body>
<trans-unit id="CreatingDumpFile">
<source>Creating dump file '{0}'</source>
<target state="translated">Döküm dosyası '{0}' oluşturuluyor</target>
<note />
</trans-unit>
<trans-unit id="HangDumpArtifactDescription">
<source>The hang dump file</source>
<target state="translated">Askıda kalma dökümü dosyası</target>
<note />
</trans-unit>
<trans-unit id="HangDumpArtifactDisplayName">
<source>Hang dump file</source>
<target state="translated">Döküm dosyasını as</target>
<note />
</trans-unit>
<trans-unit id="HangDumpEnvironmentVariableInvalidValueErrorMessage">
<source>Environment variable '{0}' is set to '{1}' instead of '{2}'</source>
<target state="translated">'{0}' ortam değişkeni '{1}' yerine '{2}' olarak ayarlandı</target>
<note />
</trans-unit>
<trans-unit id="HangDumpEnvironmentVariableIsMissingErrorMessage">
<source>Environment variable '{0}' is not set</source>
<target state="translated">'{0}' ortam değişkeni ayarlı değil</target>
<note />
</trans-unit>
<trans-unit id="HangDumpExtensionDescription">
<source>Produce hang dump files when a test execution exceed a given time.</source>
<target state="translated">Bir test yürütmesi belirli bir süreyi aştığında askıda kalan döküm dosyaları üretin.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpExtensionDisplayName">
<source>Hang dump</source>
<target state="translated">Askı dökümü</target>
<note />
</trans-unit>
<trans-unit id="HangDumpFileNameOptionDescription">
<source>Specify the name of the dump file</source>
<target state="translated">Döküm dosyasının adını belirtin</target>
<note />
</trans-unit>
<trans-unit id="HangDumpOptionDescription">
<source>Generate a dump file if the test process hangs</source>
<target state="translated">Test işlemi kilitlenirse bir döküm dosyası oluşturun</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutExpired">
<source>Hang dump timeout of '{0}' expired</source>
<target state="translated">'{0}' dökümünün askıda kalma zaman aşımı süresi doldu</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutOptionDescription">
<source>Specify the timeout after which the dump will be generated. The timeout value is specified in one of the following formats: 1.5h, 1.5hour, 1.5hours, 90m, 90min, 90minute, 90minutes 5400s, 5400sec, 5400second, 5400seconds. Default is 30m.</source>
<target state="translated">Dökümün oluşturulacağı zaman aşımını belirtin. Zaman aşımı değeri şu formatlardan birinde belirtilir: 1,5 saat, 1,5 saat, 1,5 saat, 90 dakika, 90 dakika, 90 dakika, 90 dakika 5400s, 5400sn, 5400saniye, 5400saniye. Varsayılan değer 30m.</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutOptionInvalidArgument">
<source>'--hangdump-timeout' expects a single timeout argument</source>
<target state="translated">'--hangdump-timeout' tek bir zaman aşımı bağımsız değişkeni bekliyor</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTypeOptionDescription">
<source>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) or 'Full'. Default type is 'Full'</source>
<target state="translated">Dökümün türünü belirtin. Geçerli değerler 'Mini', 'Heap', 'Triage' (yalnızca .NET 6+'da mevcuttur) veya 'Full'dur. Varsayılan tür 'Tam'dır</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTypeOptionInvalidType">
<source>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) and 'Full'</source>
<target state="translated">'{0}' geçerli bir döküm türü değil. Geçerli seçenekler 'Mini', 'Heap', 'Triage' (yalnızca .NET 6+'da mevcuttur) ve 'Fulldur</target>
<note />
</trans-unit>
<trans-unit id="HangDumpUnsupportedRequestTypeErrorMessage">
<source>Request of type '{0}' is not supported</source>
<target state="translated">'{0}' türündeki istek desteklenmiyor</target>
<note />
</trans-unit>
<trans-unit id="HangTestListArtifactDescription">
<source>The list of tests that were running at the time of the hang</source>
<target state="translated">Askıya alınma anında çalışan testlerin listesi</target>
<note />
</trans-unit>
<trans-unit id="HangTestListArtifactDisplayName">
<source>Hang test list</source>
<target state="translated">Askıda kalma test listesi</target>
<note />
</trans-unit>
<trans-unit id="MissingHangDumpMainOption">
<source>You specified one or more hang dump parameters but did not enable it, add --hangdump to the command line</source>
<target state="translated">Bir veya daha fazla askıda kalma dökümü parametresi belirtmenize rağmen bunu etkinleştirmediyseniz komut satırına --hangdump ekleyin</target>
<note />
</trans-unit>
<trans-unit id="MutexDoesNotExistErrorMessage">
<source>Cannot find mutex '{0}'</source>
<target state="translated">Muteks '{0}' bulunamıyor</target>
<note />
</trans-unit>
<trans-unit id="MutexNameReceptionTimeoutErrorMessage">
<source>Mutex name wasn't received after '{0}' seconds</source>
<target state="translated">Mutex adı '{0}' saniyeden sonra alınamadı</target>
<note />
</trans-unit>
<trans-unit id="RunningTestsWhileDumping">
<source>The following tests were still running when dump was taken (format: [&lt;time-elapsed-since-start&gt;] &lt;name&gt;):</source>
<target state="translated">Döküm alındığında aşağıdaki testler hala çalışıyordu (biçim: [&lt;başlangıçtan bu yana geçen süre&gt;] &lt;ad&gt;):</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Просмотреть файл

@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="zh-Hans" original="../ExtensionResources.resx">
<body>
<trans-unit id="CreatingDumpFile">
<source>Creating dump file '{0}'</source>
<target state="translated">正在创建转储文件“{0}”</target>
<note />
</trans-unit>
<trans-unit id="HangDumpArtifactDescription">
<source>The hang dump file</source>
<target state="translated">挂起转储文件</target>
<note />
</trans-unit>
<trans-unit id="HangDumpArtifactDisplayName">
<source>Hang dump file</source>
<target state="translated">挂起转储文件</target>
<note />
</trans-unit>
<trans-unit id="HangDumpEnvironmentVariableInvalidValueErrorMessage">
<source>Environment variable '{0}' is set to '{1}' instead of '{2}'</source>
<target state="translated">环境变量“{0}”设置为“{1}”,而不是“{2}”</target>
<note />
</trans-unit>
<trans-unit id="HangDumpEnvironmentVariableIsMissingErrorMessage">
<source>Environment variable '{0}' is not set</source>
<target state="translated">未设置环境变量“{0}”</target>
<note />
</trans-unit>
<trans-unit id="HangDumpExtensionDescription">
<source>Produce hang dump files when a test execution exceed a given time.</source>
<target state="translated">当测试执行超过给定时间时生成挂起转储文件。</target>
<note />
</trans-unit>
<trans-unit id="HangDumpExtensionDisplayName">
<source>Hang dump</source>
<target state="translated">挂起转储</target>
<note />
</trans-unit>
<trans-unit id="HangDumpFileNameOptionDescription">
<source>Specify the name of the dump file</source>
<target state="translated">指定转储文件的名称</target>
<note />
</trans-unit>
<trans-unit id="HangDumpOptionDescription">
<source>Generate a dump file if the test process hangs</source>
<target state="translated">如果测试进程挂起,则生成转储文件</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutExpired">
<source>Hang dump timeout of '{0}' expired</source>
<target state="translated">挂起转储超时“{0}”已过期</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutOptionDescription">
<source>Specify the timeout after which the dump will be generated. The timeout value is specified in one of the following formats: 1.5h, 1.5hour, 1.5hours, 90m, 90min, 90minute, 90minutes 5400s, 5400sec, 5400second, 5400seconds. Default is 30m.</source>
<target state="translated">指定生成转储后的超时。超时值以以下格式之一指定: 1.5h、1.5hour、1.5hours、90m、90min、90minute、90minutes 5400s、5400sec、5400second、5400seconds。默认值为 30m。</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutOptionInvalidArgument">
<source>'--hangdump-timeout' expects a single timeout argument</source>
<target state="translated">“--hangdump-timeout”需要单一超时参数</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTypeOptionDescription">
<source>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) or 'Full'. Default type is 'Full'</source>
<target state="translated">指定转储的类型。有效值为“Mini”、“Heap”、“Triage”(仅适用于 .NET 6+)或“Full”。默认类型为“Full”</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTypeOptionInvalidType">
<source>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) and 'Full'</source>
<target state="translated">“{0}”不是有效的转储类型。有效选项为“Mini”、“Heap”、“Triage”(仅适用于 .NET 6+)和“Full”</target>
<note />
</trans-unit>
<trans-unit id="HangDumpUnsupportedRequestTypeErrorMessage">
<source>Request of type '{0}' is not supported</source>
<target state="translated">不支持类型为“{0}”的请求</target>
<note />
</trans-unit>
<trans-unit id="HangTestListArtifactDescription">
<source>The list of tests that were running at the time of the hang</source>
<target state="translated">挂起时运行的测试列表</target>
<note />
</trans-unit>
<trans-unit id="HangTestListArtifactDisplayName">
<source>Hang test list</source>
<target state="translated">挂起测试列表</target>
<note />
</trans-unit>
<trans-unit id="MissingHangDumpMainOption">
<source>You specified one or more hang dump parameters but did not enable it, add --hangdump to the command line</source>
<target state="translated">你指定了一个或多个挂起转储参数,但未启用它,请将 --hangdump 添加到命令行</target>
<note />
</trans-unit>
<trans-unit id="MutexDoesNotExistErrorMessage">
<source>Cannot find mutex '{0}'</source>
<target state="translated">找不到互斥“{0}”</target>
<note />
</trans-unit>
<trans-unit id="MutexNameReceptionTimeoutErrorMessage">
<source>Mutex name wasn't received after '{0}' seconds</source>
<target state="translated">“{0}”秒后未收到互斥名称</target>
<note />
</trans-unit>
<trans-unit id="RunningTestsWhileDumping">
<source>The following tests were still running when dump was taken (format: [&lt;time-elapsed-since-start&gt;] &lt;name&gt;):</source>
<target state="translated">执行转储时,以下测试仍在运行(格式: [&lt;time-elapsed-since-start&gt;] &lt;name&gt;):</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Просмотреть файл

@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="zh-Hant" original="../ExtensionResources.resx">
<body>
<trans-unit id="CreatingDumpFile">
<source>Creating dump file '{0}'</source>
<target state="translated">正在建立傾印檔案 '{0}'</target>
<note />
</trans-unit>
<trans-unit id="HangDumpArtifactDescription">
<source>The hang dump file</source>
<target state="translated">擱置傾印檔案</target>
<note />
</trans-unit>
<trans-unit id="HangDumpArtifactDisplayName">
<source>Hang dump file</source>
<target state="translated">擱置傾印檔案</target>
<note />
</trans-unit>
<trans-unit id="HangDumpEnvironmentVariableInvalidValueErrorMessage">
<source>Environment variable '{0}' is set to '{1}' instead of '{2}'</source>
<target state="translated">環境變數 '{0}' 已設定為 '{1}' 而不是 '{2}'</target>
<note />
</trans-unit>
<trans-unit id="HangDumpEnvironmentVariableIsMissingErrorMessage">
<source>Environment variable '{0}' is not set</source>
<target state="translated">未設定環境變數 '{0}'</target>
<note />
</trans-unit>
<trans-unit id="HangDumpExtensionDescription">
<source>Produce hang dump files when a test execution exceed a given time.</source>
<target state="translated">當測試執行超過指定時間時,產生擱置傾印檔案。</target>
<note />
</trans-unit>
<trans-unit id="HangDumpExtensionDisplayName">
<source>Hang dump</source>
<target state="translated">擱置傾印</target>
<note />
</trans-unit>
<trans-unit id="HangDumpFileNameOptionDescription">
<source>Specify the name of the dump file</source>
<target state="translated">指定傾印檔案的名稱</target>
<note />
</trans-unit>
<trans-unit id="HangDumpOptionDescription">
<source>Generate a dump file if the test process hangs</source>
<target state="translated">如果測試程序擱置,則產生傾印檔案</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutExpired">
<source>Hang dump timeout of '{0}' expired</source>
<target state="translated">'{0}' 的擱置傾印逾時已過期</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutOptionDescription">
<source>Specify the timeout after which the dump will be generated. The timeout value is specified in one of the following formats: 1.5h, 1.5hour, 1.5hours, 90m, 90min, 90minute, 90minutes 5400s, 5400sec, 5400second, 5400seconds. Default is 30m.</source>
<target state="translated">指定產生傾印前的逾時時間。逾時值會以下列其中一種格式顯示: 1.5h、1.5hour、1.5hours、90m、90min、90minute、90minutes 5400s、5400sec、5400second、5400seconds。預設為 30m。</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTimeoutOptionInvalidArgument">
<source>'--hangdump-timeout' expects a single timeout argument</source>
<target state="translated">'--hangdump-timeout' 需要單一逾時引數</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTypeOptionDescription">
<source>Specify the type of the dump. Valid values are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) or 'Full'. Default type is 'Full'</source>
<target state="translated">指定傾印的類型。有效值為 'Mini'、'Heap'、'Triage' (只有在 .NET 6+ 可供使用) 或 'Full'。預設類型為 'Full'</target>
<note />
</trans-unit>
<trans-unit id="HangDumpTypeOptionInvalidType">
<source>'{0}' is not a valid dump type. Valid options are 'Mini', 'Heap', 'Triage' (only available in .NET 6+) and 'Full'</source>
<target state="translated">'{0}' 不是有效的傾印類型。有效的選項為 'Mini'、'Heap'、'Triage' (只有在 .NET 6+ 可供使用) 和 'Full'</target>
<note />
</trans-unit>
<trans-unit id="HangDumpUnsupportedRequestTypeErrorMessage">
<source>Request of type '{0}' is not supported</source>
<target state="translated">不支援類型 '{0}' 的要求</target>
<note />
</trans-unit>
<trans-unit id="HangTestListArtifactDescription">
<source>The list of tests that were running at the time of the hang</source>
<target state="translated">擱置時正在執行的測試清單</target>
<note />
</trans-unit>
<trans-unit id="HangTestListArtifactDisplayName">
<source>Hang test list</source>
<target state="translated">擱置測試清單</target>
<note />
</trans-unit>
<trans-unit id="MissingHangDumpMainOption">
<source>You specified one or more hang dump parameters but did not enable it, add --hangdump to the command line</source>
<target state="translated">您指定了一或多個停留傾印參數但並未加以啟用,請將 --hangdump 新增至命令列中</target>
<note />
</trans-unit>
<trans-unit id="MutexDoesNotExistErrorMessage">
<source>Cannot find mutex '{0}'</source>
<target state="translated">找不到 Mutex '{0}'</target>
<note />
</trans-unit>
<trans-unit id="MutexNameReceptionTimeoutErrorMessage">
<source>Mutex name wasn't received after '{0}' seconds</source>
<target state="translated">'{0}' 秒後未收到 Mutex 名稱</target>
<note />
</trans-unit>
<trans-unit id="RunningTestsWhileDumping">
<source>The following tests were still running when dump was taken (format: [&lt;time-elapsed-since-start&gt;] &lt;name&gt;):</source>
<target state="translated">執行傾印時,下列測試仍在執行 (格式: [&lt;time-elapsed-since-start&gt;] &lt;name&gt;):</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Просмотреть файл

@ -0,0 +1,29 @@
// 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.Platform.IPC;
using Microsoft.Testing.Platform.IPC.Serializers;
namespace Microsoft.Testing.Extensions.HangDump.Serializers;
internal sealed class ActivityIndicatorMutexNameRequest(string mutexName) : IRequest
{
public string MutexName { get; } = mutexName;
}
internal sealed class ActivityIndicatorMutexNameRequestSerializer : BaseSerializer, INamedPipeSerializer
{
public int Id => 1;
public object Deserialize(Stream stream)
{
string mutexName = ReadString(stream);
return new ActivityIndicatorMutexNameRequest(mutexName);
}
public void Serialize(object objectToSerialize, Stream stream)
{
var request = (ActivityIndicatorMutexNameRequest)objectToSerialize;
WriteString(stream, request.MutexName);
}
}

Просмотреть файл

@ -0,0 +1,29 @@
// 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.Platform.IPC;
using Microsoft.Testing.Platform.IPC.Serializers;
namespace Microsoft.Testing.Extensions.HangDump.Serializers;
internal sealed class ConsumerPipeNameRequest(string pipeName) : IRequest
{
public string PipeName { get; } = pipeName;
}
internal sealed class ConsumerPipeNameRequestSerializer : BaseSerializer, INamedPipeSerializer
{
public int Id => 3;
public object Deserialize(Stream stream)
{
string mutexName = ReadString(stream);
return new ConsumerPipeNameRequest(mutexName);
}
public void Serialize(object objectToSerialize, Stream stream)
{
var request = (ConsumerPipeNameRequest)objectToSerialize;
WriteString(stream, request.PipeName);
}
}

Просмотреть файл

@ -0,0 +1,20 @@
// 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.Platform.IPC;
using Microsoft.Testing.Platform.IPC.Serializers;
namespace Microsoft.Testing.Extensions.HangDump.Serializers;
internal sealed class ExitSignalActivityIndicatorTaskRequest() : IRequest;
internal sealed class ExitSignalActivityIndicatorTaskRequestSerializer : BaseSerializer, INamedPipeSerializer
{
public int Id => 6;
public object Deserialize(Stream stream) => new ExitSignalActivityIndicatorTaskRequest();
public void Serialize(object objectToSerialize, Stream stream)
{
}
}

Просмотреть файл

@ -0,0 +1,20 @@
// 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.Platform.IPC;
using Microsoft.Testing.Platform.IPC.Serializers;
namespace Microsoft.Testing.Extensions.HangDump.Serializers;
internal sealed class GetInProgressTestsRequest() : IRequest;
internal sealed class GetInProgressTestsRequestSerializer : BaseSerializer, INamedPipeSerializer
{
public int Id => 4;
public object Deserialize(Stream stream) => new GetInProgressTestsRequest();
public void Serialize(object objectToSerialize, Stream stream)
{
}
}

Просмотреть файл

@ -0,0 +1,42 @@
// 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.Platform.IPC;
using Microsoft.Testing.Platform.IPC.Serializers;
namespace Microsoft.Testing.Extensions.HangDump.Serializers;
internal sealed class GetInProgressTestsResponse((string, int)[] tests) : IResponse
{
public (string, int)[] Tests { get; } = tests;
}
internal sealed class GetInProgressTestsResponseSerializer : BaseSerializer, INamedPipeSerializer
{
public int Id => 5;
public object Deserialize(Stream stream)
{
int readCount = ReadInt(stream);
List<(string, int)> tests = new();
for (int i = 0; i < readCount; i++)
{
string testName = ReadString(stream);
int unixTimeSeconds = ReadInt(stream);
tests.Add((testName, unixTimeSeconds));
}
return new GetInProgressTestsResponse(tests.ToArray());
}
public void Serialize(object objectToSerialize, Stream stream)
{
var getInProgressTestsResponse = (GetInProgressTestsResponse)objectToSerialize;
WriteInt(stream, getInProgressTestsResponse.Tests.Length);
foreach ((string testName, int seconds) in getInProgressTestsResponse.Tests)
{
WriteString(stream, testName);
WriteInt(stream, seconds);
}
}
}

Просмотреть файл

@ -0,0 +1,21 @@
// 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.Platform.IPC;
using Microsoft.Testing.Platform.IPC.Serializers;
namespace Microsoft.Testing.Extensions.HangDump.Serializers;
internal sealed class SessionEndSerializerRequest() : IRequest;
internal sealed class SessionEndSerializerRequestSerializer : BaseSerializer, INamedPipeSerializer
{
public int Id => 2;
public object Deserialize(Stream stream)
=> new SessionEndSerializerRequest();
public void Serialize(object _, Stream __)
{
}
}

Просмотреть файл

@ -0,0 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Microsoft.Testing.Platform.Builder;
namespace Microsoft.Testing.Extensions.HangDump;
public static class TestingPlatformBuilderHook
{
public static void AddExtensions(ITestApplicationBuilder testApplicationBuilder, string[] _)
=> testApplicationBuilder.AddHangDumpProvider();
}

Просмотреть файл

@ -0,0 +1,117 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
namespace Microsoft.Testing.Extensions.Diagnostics;
internal static class MiniDumpWriteDump
{
public static void CollectDumpUsingMiniDumpWriteDump(int pid, string outputFile, MiniDumpTypeOption type)
{
var process = Process.GetProcessById(pid);
// Open the file for writing
using var stream = new FileStream(outputFile, FileMode.Create, FileAccess.ReadWrite, FileShare.None);
NativeMethods.MinidumpExceptionInformation exceptionInfo = default;
NativeMethods.MinidumpType dumpType = type switch
{
MiniDumpTypeOption.Full =>
NativeMethods.MinidumpType.MiniDumpWithFullMemory
| NativeMethods.MinidumpType.MiniDumpWithDataSegs
| NativeMethods.MinidumpType.MiniDumpWithHandleData
| NativeMethods.MinidumpType.MiniDumpWithUnloadedModules
| NativeMethods.MinidumpType.MiniDumpWithFullMemoryInfo
| NativeMethods.MinidumpType.MiniDumpWithThreadInfo
| NativeMethods.MinidumpType.MiniDumpWithTokenInformation,
MiniDumpTypeOption.Heap =>
NativeMethods.MinidumpType.MiniDumpWithPrivateReadWriteMemory
| NativeMethods.MinidumpType.MiniDumpWithDataSegs
| NativeMethods.MinidumpType.MiniDumpWithHandleData
| NativeMethods.MinidumpType.MiniDumpWithUnloadedModules
| NativeMethods.MinidumpType.MiniDumpWithFullMemoryInfo
| NativeMethods.MinidumpType.MiniDumpWithThreadInfo
| NativeMethods.MinidumpType.MiniDumpWithTokenInformation,
MiniDumpTypeOption.Mini => NativeMethods.MinidumpType.MiniDumpWithThreadInfo,
_ => NativeMethods.MinidumpType.MiniDumpNormal,
};
// Retry the write dump on ERROR_PARTIAL_COPY
for (int i = 0; i < 5; i++)
{
// Dump the process!
if (NativeMethods.MiniDumpWriteDump(process.Handle, (uint)process.Id, stream.SafeFileHandle, dumpType, ref exceptionInfo, IntPtr.Zero, IntPtr.Zero))
{
break;
}
int err = Marshal.GetHRForLastWin32Error();
if (err != NativeMethods.ErrorPartialCopy)
{
Marshal.ThrowExceptionForHR(err);
}
}
}
private static class NativeMethods
{
public const int ErrorPartialCopy = unchecked((int)0x8007012b);
[DllImport("Dbghelp.dll", SetLastError = true)]
public static extern bool MiniDumpWriteDump(IntPtr hProcess, uint processId, SafeFileHandle hFile, MinidumpType dumpType, ref MinidumpExceptionInformation exceptionParam, IntPtr userStreamParam, IntPtr callbackParam);
[StructLayout(LayoutKind.Sequential, Pack = 4)]
public readonly struct MinidumpExceptionInformation
{
public readonly uint ThreadId;
public readonly IntPtr ExceptionPointers;
public readonly int ClientPointers;
}
[Flags]
public enum MinidumpType : uint
{
MiniDumpNormal = 0,
MiniDumpWithDataSegs = 1 << 0,
MiniDumpWithFullMemory = 1 << 1,
MiniDumpWithHandleData = 1 << 2,
MiniDumpFilterMemory = 1 << 3,
MiniDumpScanMemory = 1 << 4,
MiniDumpWithUnloadedModules = 1 << 5,
MiniDumpWithIndirectlyReferencedMemory = 1 << 6,
MiniDumpFilterModulePaths = 1 << 7,
MiniDumpWithProcessThreadData = 1 << 8,
MiniDumpWithPrivateReadWriteMemory = 1 << 9,
MiniDumpWithoutOptionalData = 1 << 10,
MiniDumpWithFullMemoryInfo = 1 << 11,
MiniDumpWithThreadInfo = 1 << 12,
MiniDumpWithCodeSegs = 1 << 13,
MiniDumpWithoutAuxiliaryState = 1 << 14,
MiniDumpWithFullAuxiliaryState = 1 << 15,
MiniDumpWithPrivateWriteCopyMemory = 1 << 16,
MiniDumpIgnoreInaccessibleMemory = 1 << 17,
MiniDumpWithTokenInformation = 1 << 18,
MiniDumpWithModuleHeaders = 1 << 19,
MiniDumpFilterTriage = 1 << 20,
MiniDumpWithAvxXStateContext = 1 << 21,
MiniDumpWithIptTrace = 1 << 22,
MiniDumpValidTypeFlags = (-1) ^ ((~1) << 22),
}
}
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1602:Enumeration items should be documented", Justification = "Copy-paste")]
internal enum MiniDumpTypeOption
{
// This is a copy of DumpTypeOption, we need both of those types, because this
// dumper is included as file in both MiniDumpTool, and BlameDataCollector, and
// blame references MiniDumpTool, so we get the enum defined twice otherwise.
Full,
Heap,
Mini,
}
}

Просмотреть файл

@ -0,0 +1,3 @@
<Project>
<Import Project="$(MSBuildThisFileDirectory)..\..\buildMultiTargeting\Microsoft.Testing.Extensions.HangDump.props" />
</Project>

Просмотреть файл

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<Project>
<ItemGroup>
<TestingPlatformBuilderHook Include="8E989246-4E23-4AEF-9590-9B45485D3B7D" Condition=" '$(GenerateTestingPlatformEntryPoint)' == 'True' " >
<DisplayName>Microsoft.Testing.Extensions.HangDump</DisplayName>
<TypeFullName>Microsoft.Testing.Extensions.HangDump.TestingPlatformBuilderHook</TypeFullName>
</TestingPlatformBuilderHook>
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,3 @@
<Project>
<Import Project="$(MSBuildThisFileDirectory)..\..\buildMultiTargeting\Microsoft.Testing.Extensions.HangDump.props" />
</Project>

Просмотреть файл

@ -0,0 +1,32 @@
// 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.ApplicationInsights;
using Microsoft.ApplicationInsights.Extensibility;
namespace Microsoft.Testing.Extensions.Telemetry;
internal class AppInsightTelemetryClient : ITelemetryClient
{
// Note: The InstrumentationKey should match the one of dotnet cli.
private const string InstrumentationKey = "74cc1c9e-3e6e-4d05-b3fc-dde9101d0254";
private const string TelemetryServiceEndpoint = "https://dc.services.visualstudio.com/";
private readonly TelemetryConfiguration _config;
private readonly TelemetryClient _telemetryClient;
public AppInsightTelemetryClient(string? currentSessionId, string osVersion)
{
_config = TelemetryConfiguration.CreateDefault();
_config.ConnectionString = $"InstrumentationKey={InstrumentationKey};IngestionEndpoint={TelemetryServiceEndpoint}";
_telemetryClient = new TelemetryClient(_config);
_telemetryClient.Context.Session.Id = currentSessionId;
_telemetryClient.Context.Device.OperatingSystem = osVersion;
}
public void TrackEvent(string eventName, Dictionary<string, string> properties, Dictionary<string, double> metrics)
{
_telemetryClient.TrackEvent(eventName, properties, metrics);
_telemetryClient.Flush();
}
}

Просмотреть файл

@ -0,0 +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.
namespace Microsoft.Testing.Extensions.Telemetry;
internal class AppInsightTelemetryClientFactory : ITelemetryClientFactory
{
public ITelemetryClient Create(string? currentSessionId, string osVersion)
=> new AppInsightTelemetryClient(currentSessionId, osVersion);
}

Просмотреть файл

@ -0,0 +1,336 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#if NETCOREAPP
using System.Threading.Channels;
#else
using System.Collections.Concurrent;
#endif
using System.Globalization;
using System.Text;
using Microsoft.Testing.Platform;
using Microsoft.Testing.Platform.Configurations;
using Microsoft.Testing.Platform.Helpers;
using Microsoft.Testing.Platform.Logging;
using Microsoft.Testing.Platform.Services;
using Microsoft.Testing.Platform.Telemetry;
namespace Microsoft.Testing.Extensions.Telemetry;
/// <summary>
/// Allows to log telemetry events via AppInsights.
/// </summary>
internal sealed partial class AppInsightsProvider :
ITelemetryCollector
#pragma warning disable SA1001 // Commas should be spaced correctly
#if NETCOREAPP
, IAsyncDisposable
#else
, IDisposable
#endif
#pragma warning restore SA1001 // Commas should be spaced correctly
{
// Note: We're currently using the same environment variable as dotnet CLI.
public static readonly string SessionIdEnvVar = "TESTINGPLATFORM_APPINSIGHTS_SESSIONID";
// Allows us to correlate events produced from the same process.
// Not calling this ProcessId, because it has a different meaning.
private static readonly string CurrentReporterId = Guid.NewGuid().ToString();
private readonly string _currentSessionId;
private readonly bool _isCi;
private readonly IEnvironment _environment;
private readonly ITestApplicationCancellationTokenSource _testApplicationCancellationTokenSource;
private readonly ITask _task;
private readonly IClock _clock;
private readonly ITelemetryInformation _telemetryInformation;
private readonly ITelemetryClientFactory _telemetryClientFactory;
private readonly bool _isDevelopmentRepository;
private readonly ILogger<AppInsightsProvider> _logger;
private readonly Task? _telemetryTask;
private readonly CancellationTokenSource _flushTimeoutOrStop = new();
#if NETCOREAPP
private readonly Channel<(string EventName, IDictionary<string, object> ParamsMap)> _payloads;
#else
private readonly BlockingCollection<(string EventName, IDictionary<string, object> ParamsMap)> _payloads;
#endif
#if DEBUG
// Telemetry properties that are allowed to contain unhashed information.
private static readonly HashSet<string> StringWhitelist = new()
{
TelemetryProperties.VersionPropertyName,
TelemetryProperties.ReporterIdPropertyName,
TelemetryProperties.SessionId,
TelemetryProperties.HostProperties.TestingPlatformVersionPropertyName,
TelemetryProperties.HostProperties.FrameworkDescriptionPropertyName,
TelemetryProperties.HostProperties.OSDescriptionPropertyName,
TelemetryProperties.HostProperties.RuntimeIdentifierPropertyName,
TelemetryProperties.HostProperties.ApplicationModePropertyName,
TelemetryProperties.HostProperties.ExitCodePropertyName,
TelemetryProperties.HostProperties.ExtensionsPropertyName,
};
#endif
private ITelemetryClient? _client;
private bool _isDisposed;
public AppInsightsProvider(
IEnvironment environment,
ITestApplicationCancellationTokenSource testApplicationCancellationTokenSource,
ITask task,
ILoggerFactory loggerFactory,
IClock clock,
IConfiguration configuration,
ITelemetryInformation telemetryInformation,
ITelemetryClientFactory telemetryClientFactory,
string sessionId)
{
_ = bool.TryParse(configuration[PlatformConfigurationConstants.PlatformTelemetryIsDevelopmentRepository], out _isDevelopmentRepository);
_isCi = CIEnvironmentDetectorForTelemetry.IsCIEnvironment();
_environment = environment;
_currentSessionId = sessionId;
_testApplicationCancellationTokenSource = testApplicationCancellationTokenSource;
_task = task;
_clock = clock;
_telemetryInformation = telemetryInformation;
_telemetryClientFactory = telemetryClientFactory;
#if NETCOREAPP
_payloads = Channel.CreateUnbounded<(string EventName, IDictionary<string, object> ParamsMap)>(new UnboundedChannelOptions()
{
// We process only 1 data at a time
SingleReader = true,
// We don't know how many threads will call the Log method
SingleWriter = false,
// We want to unlink the caller from the consumer
AllowSynchronousContinuations = false,
});
_telemetryTask = task.Run(IngestLoopAsync, _testApplicationCancellationTokenSource.CancellationToken);
#else
// Keep the custom thread to avoid to waste one from thread pool.
// We have some await but we should stay on custom one if not for special needs like trace log or exception.
_payloads = new();
_telemetryTask = _task.RunLongRunning(IngestLoopAsync, "Telemetry AppInsightsProvider", _testApplicationCancellationTokenSource.CancellationToken);
#endif
_logger = loggerFactory.CreateLogger<AppInsightsProvider>();
}
// Initialize the telemetry client and start ingesting events.
private async Task IngestLoopAsync()
{
if (_testApplicationCancellationTokenSource.CancellationToken.IsCancellationRequested)
{
return;
}
try
{
_client = _telemetryClientFactory.Create(_currentSessionId, _environment.OsVersion);
}
catch (Exception e)
{
_client = null;
await _logger.LogErrorAsync($"Failed to initialize telemetry client", e);
return;
}
DateTimeOffset? lastLoggedError = null;
_testApplicationCancellationTokenSource.CancellationToken.Register(() => _flushTimeoutOrStop.Cancel());
try
{
#if NETCOREAPP
while (await _payloads.Reader.WaitToReadAsync(_flushTimeoutOrStop.Token))
{
(string eventName, IDictionary<string, object> paramsMap) = await _payloads.Reader.ReadAsync();
#else
foreach ((string eventName, IDictionary<string, object> paramsMap) in _payloads.GetConsumingEnumerable(_flushTimeoutOrStop.Token))
{
#endif
// Add common properties.
paramsMap.Add(TelemetryProperties.VersionPropertyName, _telemetryInformation.Version);
paramsMap.Add(TelemetryProperties.SessionId, _currentSessionId);
paramsMap.Add(TelemetryProperties.ReporterIdPropertyName, CurrentReporterId);
paramsMap.Add(TelemetryProperties.IsCIPropertyName, _isCi.AsTelemetryBool());
if (_isDevelopmentRepository)
{
paramsMap.Add(TelemetryProperties.HostProperties.IsDevelopmentRepositoryPropertyName, TelemetryProperties.True);
}
var metrics = new Dictionary<string, double>();
var properties = new Dictionary<string, string>();
foreach (KeyValuePair<string, object> pair in paramsMap)
{
switch (pair.Value)
{
// Metrics:
case double value:
metrics.Add(pair.Key, value);
break;
case DateTimeOffset value:
metrics.Add(pair.Key, ToUnixTimeNanoseconds(value));
break;
// Properties:
#if DEBUG
case string value:
AssertHashed(pair.Key, value);
properties.Add(pair.Key, value);
break;
#endif
case bool value:
RoslynDebug.Assert(false, $"Telemetry entry '{pair.Key}' contains a boolean value, boolean values should always be converted to string using: .{nameof(TelemetryExtensions.AsTelemetryBool)}()");
properties.Add(pair.Key, value.AsTelemetryBool());
break;
default:
properties.Add(pair.Key, pair.Value?.ToString() ?? string.Empty);
break;
}
}
if (_logger.IsEnabled(LogLevel.Trace))
{
StringBuilder builder = new();
builder.AppendLine(CultureInfo.InvariantCulture, $"Send telemetry event: {eventName}");
foreach (KeyValuePair<string, string> keyValue in properties)
{
builder.AppendLine(CultureInfo.InvariantCulture, $" {keyValue.Key}: {keyValue.Value}");
}
foreach (KeyValuePair<string, double> keyValue in metrics)
{
builder.AppendLine(CultureInfo.InvariantCulture, $" {keyValue.Key}: {keyValue.Value.ToString("f", CultureInfo.InvariantCulture)}");
}
await _logger.LogTraceAsync(builder.ToString());
}
try
{
_client.TrackEvent(eventName, properties, metrics);
}
catch (Exception ex)
{
// If we have a lot of issues with the network we could have a lot of logs here.
// We log one error every 3 seconds.
// We could do better backpressure.
if (_logger.IsEnabled(LogLevel.Error) && (!lastLoggedError.HasValue || (lastLoggedError.Value - _clock.UtcNow).TotalSeconds > 3))
{
await _logger.LogErrorAsync($"Error during telemetry report.", ex);
lastLoggedError = _clock.UtcNow;
}
}
}
}
catch (OperationCanceledException)
{
// This is expected when the test application is shutting down or if flush timeout.
return;
}
}
private static double ToUnixTimeNanoseconds(DateTimeOffset value) =>
// The magic number is DateTimeOffset.UnixEpoch.Ticks in newer TFMs.
// We multiply by 100 because Ticks are 100 ns, and we want to report ns.
(value.UtcTicks - 621355968000000000L) * 100;
#if DEBUG
private static void AssertHashed(string key, string value)
{
if (value is TelemetryProperties.True or TelemetryProperties.False)
{
return;
}
// Full qualification of Regex to avoid adding conditional 'using' on top of the file.
if (value.Length == 64 && GetValidHashPattern().IsMatch(value))
{
return;
}
if (StringWhitelist.Contains(key))
{
return;
}
RoslynDebug.Assert(false, $"Telemetry entry '{key}' contains an unhashed string value '{value}'. Strings need to be hashed using {nameof(Sha256Hasher)}.{nameof(Sha256Hasher.HashWithNormalizedCasing)}(), or whitelisted.");
}
#if NET7_0_OR_GREATER
[System.Text.RegularExpressions.GeneratedRegex("[a-f0-9]{64}")]
private static partial System.Text.RegularExpressions.Regex GetValidHashPattern();
#else
private static System.Text.RegularExpressions.Regex GetValidHashPattern()
=> new("[a-f0-9]{64}");
#endif
#endif
public async Task LogEventAsync(string eventName, IDictionary<string, object> paramsMap)
{
#if NETCOREAPP
await _payloads.Writer.WriteAsync((eventName, paramsMap));
#else
_payloads.Add((eventName, paramsMap));
await Task.CompletedTask;
#endif
}
#if !NETCOREAPP
// Adding dispose on graceful shutdown per https://github.com/microsoft/ApplicationInsights-dotnet/issues/1152#issuecomment-518742922
public void Dispose()
{
_payloads.CompleteAdding();
if (!_isDisposed)
{
if (_telemetryTask is null)
{
throw new InvalidOperationException("Unexpected null _telemetryTask");
}
int flushForSeconds = 3;
if (!_telemetryTask.Wait(TimeSpan.FromSeconds(flushForSeconds)))
{
_flushTimeoutOrStop.Cancel();
_logger.LogWarning($"Telemetry task didn't flush after '{flushForSeconds}', some payload could be lost");
}
_isDisposed = true;
}
}
#endif
#if NETCOREAPP
public async ValueTask DisposeAsync()
{
_payloads.Writer.Complete();
if (!_isDisposed)
{
if (_telemetryTask is null)
{
throw new InvalidOperationException("Unexpected null _telemetryTask");
}
int flushForSeconds = 3;
try
{
await _telemetryTask.TimeoutAfterAsync(TimeSpan.FromSeconds(flushForSeconds));
}
catch (TimeoutException)
{
await _flushTimeoutOrStop.CancelAsync();
await _logger.LogWarningAsync($"Telemetry task didn't flush after '{flushForSeconds}', some payload could be lost");
}
_isDisposed = true;
}
}
#endif
}

Просмотреть файл

@ -0,0 +1,57 @@
// 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.Extensions.Telemetry;
using Microsoft.Testing.Extensions.Telemetry.Resources;
using Microsoft.Testing.Platform.Builder;
using Microsoft.Testing.Platform.Helpers;
using Microsoft.Testing.Platform.Services;
using Microsoft.Testing.Platform.Telemetry;
#if NETCOREAPP
using System.Runtime.CompilerServices;
#endif
namespace Microsoft.Testing.Extensions;
public static class AppInsightsTelemetryProviderExtensions
{
public static void AddAppInsightsTelemetryProvider(this ITestApplicationBuilder builder)
{
#if NETCOREAPP
// AppInsights is not supported on platforms that do not support dynamic code generation.
if (!RuntimeFeature.IsDynamicCodeSupported)
{
return;
}
#endif
#pragma warning disable IDE0022 // Use expression body for method
if (builder is not TestApplicationBuilder testApplicationBuilder)
{
throw new ArgumentException(ExtensionResources.AddAppInsightsTelemetryProviderInvalidBuilder);
}
testApplicationBuilder.TelemetryManager.AddTelemetryCollectorProvider(services =>
{
IEnvironment environment = services.GetRequiredService<IEnvironment>();
// Session ID that is inherited across processes.
string sessionId = environment.GetEnvironmentVariable(AppInsightsProvider.SessionIdEnvVar) ?? Guid.NewGuid().ToString();
// We want to flow down the processes the same session id for correlation purposes.
environment.SetEnvironmentVariable(AppInsightsProvider.SessionIdEnvVar, sessionId);
return new AppInsightsProvider(
services.GetRequiredService<IEnvironment>(),
services.GetTestApplicationCancellationTokenSource(),
services.GetTask(),
services.GetLoggerFactory(),
services.GetClock(),
services.GetConfiguration(),
services.GetRequiredService<ITelemetryInformation>(),
new AppInsightTelemetryClientFactory(),
sessionId);
});
#pragma warning restore IDE0022 // Use expression body for method
}
}

Просмотреть файл

@ -0,0 +1,4 @@
M:System.String.IsNullOrEmpty(System.String); Use 'TAString.IsNullOrEmpty' instead
M:System.String.IsNullOrWhiteSpace(System.String); Use 'TAString.IsNullOrWhiteSpace' instead
M:System.Diagnostics.Debug.Assert(System.Boolean); Use 'RoslynDebug.Assert' instead
M:System.Diagnostics.Debug.Assert(System.Boolean,System.String); Use 'RoslynDebug.Assert' instead

Просмотреть файл

@ -0,0 +1,86 @@
// 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.Platform;
namespace Microsoft.Testing.Extensions.Telemetry;
// Detection of CI: https://learn.microsoft.com/dotnet/core/tools/telemetry#continuous-integration-detection
// From: https://github.com/dotnet/sdk/blob/main/src/Cli/dotnet/Telemetry/CIEnvironmentDetectorForTelemetry.cs
internal class CIEnvironmentDetectorForTelemetry
{
// Systems that provide boolean values only, so we can simply parse and check for true
private static readonly string[] BooleanVariables = new string[]
{
// Azure Pipelines - https://docs.microsoft.com/azure/devops/pipelines/build/variables#system-variables-devops-services
"TF_BUILD",
// GitHub Actions - https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
"GITHUB_ACTIONS",
// AppVeyor - https://www.appveyor.com/docs/environment-variables/
"APPVEYOR",
// A general-use flag - Many of the major players support this: AzDo, GitHub, GitLab, AppVeyor, Travis CI, CircleCI.
// Given this, we could potentially remove all of these other options?
"CI",
// Travis CI - https://docs.travis-ci.com/user/environment-variables/#default-environment-variables
"TRAVIS",
// CircleCI - https://circleci.com/docs/2.0/env-vars/#built-in-environment-variables
"CIRCLECI",
};
// Systems where every variable must be present and not-null before returning true
private static readonly string[][] AllNotNullVariables = new string[][]
{
// AWS CodeBuild - https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html
new string[] { "CODEBUILD_BUILD_ID", "AWS_REGION" },
// Jenkins - https://github.com/jenkinsci/jenkins/blob/master/core/src/main/resources/jenkins/model/CoreEnvironmentContributor/buildEnv.groovy
new string[] { "BUILD_ID", "BUILD_URL" },
// Google Cloud Build - https://cloud.google.com/build/docs/configuring-builds/substitute-variable-values#using_default_substitutions
new string[] { "BUILD_ID", "PROJECT_ID" },
};
// Systems where the variable must be present and not-null
private static readonly string[] IfNonNullVariables = new string[]
{
// TeamCity - https://www.jetbrains.com/help/teamcity/predefined-build-parameters.html#Predefined+Server+Build+Parameters
"TEAMCITY_VERSION",
// JetBrains Space - https://www.jetbrains.com/help/space/automation-environment-variables.html#general
"JB_SPACE_API_URL",
};
public static bool IsCIEnvironment()
{
foreach (string booleanVariable in BooleanVariables)
{
if (bool.TryParse(Environment.GetEnvironmentVariable(booleanVariable), out bool envVar) && envVar)
{
return true;
}
}
foreach (string[] variables in AllNotNullVariables)
{
if (variables.All((variable) => !RoslynString.IsNullOrEmpty(Environment.GetEnvironmentVariable(variable))))
{
return true;
}
}
foreach (string variable in IfNonNullVariables)
{
if (!RoslynString.IsNullOrEmpty(Environment.GetEnvironmentVariable(variable)))
{
return true;
}
}
return false;
}
}

Просмотреть файл

@ -0,0 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.Testing.Extensions.Telemetry;
internal interface ITelemetryClient
{
void TrackEvent(string eventName, Dictionary<string, string> properties, Dictionary<string, double> metrics);
}

Просмотреть файл

@ -0,0 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.Testing.Extensions.Telemetry;
internal interface ITelemetryClientFactory
{
ITelemetryClient Create(string? currentSessionId, string osVersion);
}

Просмотреть файл

@ -0,0 +1,66 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;$(MicrosoftTestingTargetFrameworks)</TargetFrameworks>
</PropertyGroup>
<!-- NuGet properties -->
<PropertyGroup>
<PackageDescription>
<![CDATA[Microsoft Testing is a set of platform, framework and protocol intended to make it possible to run any test on any target or device.
This package provides telemetry for the platform.]]>
</PackageDescription>
</PropertyGroup>
<ItemGroup>
<InternalsVisibleTo Include="Microsoft.Testing.Platform.UnitTests" Key="$(VsPublicKey)" />
<InternalsVisibleTo Include="Microsoft.Testing.Extensions.UnitTests" Key="$(VsPublicKey)" />
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" Key="$(MoqPublicKey)" />
</ItemGroup>
<ItemGroup>
<AdditionalFiles Include="BannedSymbols.txt" />
<AdditionalFiles Include="PublicAPI\PublicAPI.Shipped.txt" />
<AdditionalFiles Include="PublicAPI\PublicAPI.Unshipped.txt" />
</ItemGroup>
<!-- Nuget package layout -->
<!-- Nuget folders https://learn.microsoft.com/nuget/create-packages/creating-a-package#from-a-convention-based-working-directory -->
<ItemGroup>
<Content Include="buildMultiTargeting/**">
<Pack>true</Pack>
<PackagePath>buildMultiTargeting</PackagePath>
</Content>
<TfmSpecificPackageFile Include="buildTransitive/**">
<PackagePath>buildTransitive/$(TargetFramework)</PackagePath>
</TfmSpecificPackageFile>
<TfmSpecificPackageFile Include="build/**">
<PackagePath>build/$(TargetFramework)</PackagePath>
</TfmSpecificPackageFile>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(RepoRoot)src\Platform\Microsoft.Testing.Platform\Microsoft.Testing.Platform.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Update="Resources\ExtensionResources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>ExtensionResources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Resources\ExtensionResources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>ExtensionResources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,9 @@
# Microsoft.Testing
Microsoft Testing is a set of platform, framework and protocol intended to make it possible to run any test on any target or device.
Documentation can be found at <https://aka.ms/testingplatform>.
## About
This package provides telemetry extensions to Microsoft Testing Platform.

Просмотреть файл

@ -0,0 +1,5 @@
#nullable enable
Microsoft.Testing.Extensions.AppInsightsTelemetryProviderExtensions
Microsoft.Testing.Extensions.Telemetry.TestingPlatformBuilderHook
static Microsoft.Testing.Extensions.AppInsightsTelemetryProviderExtensions.AddAppInsightsTelemetryProvider(this Microsoft.Testing.Platform.Builder.ITestApplicationBuilder! builder) -> void
static Microsoft.Testing.Extensions.Telemetry.TestingPlatformBuilderHook.AddExtensions(Microsoft.Testing.Platform.Builder.ITestApplicationBuilder! testApplicationBuilder, string![]! _) -> void

Просмотреть файл

@ -0,0 +1 @@
#nullable enable

Просмотреть файл

@ -0,0 +1,72 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Microsoft.Testing.Extensions.Telemetry.Resources {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class ExtensionResources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal ExtensionResources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Testing.Extensions.Telemetry.Resources.ExtensionResources", typeof(ExtensionResources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to AppInsights telemetry provider can only be registered onto Microsoft.Testing.Platform.Builder.TestApplicationBuilder builders.
/// </summary>
internal static string AddAppInsightsTelemetryProviderInvalidBuilder {
get {
return ResourceManager.GetString("AddAppInsightsTelemetryProviderInvalidBuilder", resourceCulture);
}
}
}
}

Просмотреть файл

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="AddAppInsightsTelemetryProviderInvalidBuilder" xml:space="preserve">
<value>AppInsights telemetry provider can only be registered onto Microsoft.Testing.Platform.Builder.TestApplicationBuilder builders</value>
</data>
</root>

Просмотреть файл

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="cs" original="../ExtensionResources.resx">
<body>
<trans-unit id="AddAppInsightsTelemetryProviderInvalidBuilder">
<source>AppInsights telemetry provider can only be registered onto Microsoft.Testing.Platform.Builder.TestApplicationBuilder builders</source>
<target state="translated">Zprostředkovatele telemetrie AppInsights jde zaregistrovat jenom do tvůrců Microsoft.Testing.Platform.Builder.TestApplicationBuilder.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Просмотреть файл

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="de" original="../ExtensionResources.resx">
<body>
<trans-unit id="AddAppInsightsTelemetryProviderInvalidBuilder">
<source>AppInsights telemetry provider can only be registered onto Microsoft.Testing.Platform.Builder.TestApplicationBuilder builders</source>
<target state="translated">Der AppInsights-Telemetrieanbieter kann nur bei Microsoft.Testing.Platform.Builder.TestApplicationBuilder-Builders registriert werden.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше