diff --git a/src/Cli/dotnet/commands/dotnet-test/CliConstants.cs b/src/Cli/dotnet/commands/dotnet-test/CliConstants.cs
index 50f9e375fd6b..08ba9c16b3dc 100644
--- a/src/Cli/dotnet/commands/dotnet-test/CliConstants.cs
+++ b/src/Cli/dotnet/commands/dotnet-test/CliConstants.cs
@@ -9,7 +9,6 @@ internal static class CliConstants
public const string HelpOptionKey = "--help";
public const string ServerOptionKey = "--server";
public const string DotNetTestPipeOptionKey = "--dotnet-test-pipe";
- public const string ProjectOptionKey = "--project";
public const string FrameworkOptionKey = "--framework";
public const string ServerOptionValue = "dotnettestcli";
diff --git a/src/Cli/dotnet/commands/dotnet-test/IPC/Models/ModuleMessage.cs b/src/Cli/dotnet/commands/dotnet-test/IPC/Models/ModuleMessage.cs
index f7f7ec922253..6f685d2dfdf5 100644
--- a/src/Cli/dotnet/commands/dotnet-test/IPC/Models/ModuleMessage.cs
+++ b/src/Cli/dotnet/commands/dotnet-test/IPC/Models/ModuleMessage.cs
@@ -5,4 +5,4 @@
namespace Microsoft.DotNet.Tools.Test;
-internal sealed record ModuleMessage(string? DLLPath, string? ProjectPath, string? TargetFramework, string? RunSettingsFilePath) : IRequest;
+internal sealed record ModuleMessage(string? DllOrExePath, string? ProjectPath, string? TargetFramework, string? RunSettingsFilePath, string IsTestingPlatformApplication) : IRequest;
diff --git a/src/Cli/dotnet/commands/dotnet-test/IPC/Serializers/ModuleMessageSerializer.cs b/src/Cli/dotnet/commands/dotnet-test/IPC/Serializers/ModuleMessageSerializer.cs
index cd126046f0ef..079e205ba27b 100644
--- a/src/Cli/dotnet/commands/dotnet-test/IPC/Serializers/ModuleMessageSerializer.cs
+++ b/src/Cli/dotnet/commands/dotnet-test/IPC/Serializers/ModuleMessageSerializer.cs
@@ -13,15 +13,17 @@ public object Deserialize(Stream stream)
string projectPath = ReadString(stream);
string targetFramework = ReadString(stream);
string runSettingsFilePath = ReadString(stream);
- return new ModuleMessage(modulePath.Trim(), projectPath.Trim(), targetFramework.Trim(), runSettingsFilePath.Trim());
+ string isTestingPlatformApplication = ReadString(stream);
+ return new ModuleMessage(modulePath.Trim(), projectPath.Trim(), targetFramework.Trim(), runSettingsFilePath.Trim(), isTestingPlatformApplication.Trim());
}
public void Serialize(object objectToSerialize, Stream stream)
{
- WriteString(stream, ((ModuleMessage)objectToSerialize).DLLPath);
+ WriteString(stream, ((ModuleMessage)objectToSerialize).DllOrExePath);
WriteString(stream, ((ModuleMessage)objectToSerialize).ProjectPath);
WriteString(stream, ((ModuleMessage)objectToSerialize).TargetFramework);
WriteString(stream, ((ModuleMessage)objectToSerialize).RunSettingsFilePath);
+ WriteString(stream, ((ModuleMessage)objectToSerialize).IsTestingPlatformApplication);
}
}
}
diff --git a/src/Cli/dotnet/commands/dotnet-test/LocalizableStrings.resx b/src/Cli/dotnet/commands/dotnet-test/LocalizableStrings.resx
index 8a716d8f3f71..2a6adfc6f413 100644
--- a/src/Cli/dotnet/commands/dotnet-test/LocalizableStrings.resx
+++ b/src/Cli/dotnet/commands/dotnet-test/LocalizableStrings.resx
@@ -315,4 +315,15 @@ Examples:
The test modules have the specified root directory.
+
+ Message Request type '{0}' is unsupported.
+ {0} - message request type
+
+
+ Invalid test message state '{0}'
+ {0} - test message state
+
+
+ Test application(s) that support VSTest are not supported.
+
diff --git a/src/Cli/dotnet/commands/dotnet-test/MSBuildConnectionHandler.cs b/src/Cli/dotnet/commands/dotnet-test/MSBuildConnectionHandler.cs
index 07905b128927..e8e38728b825 100644
--- a/src/Cli/dotnet/commands/dotnet-test/MSBuildConnectionHandler.cs
+++ b/src/Cli/dotnet/commands/dotnet-test/MSBuildConnectionHandler.cs
@@ -1,6 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using System.Collections.Concurrent;
using System.CommandLine;
using System.IO.Pipes;
using Microsoft.DotNet.Cli.Utils;
@@ -15,6 +16,8 @@ internal sealed class MSBuildConnectionHandler : IDisposable
private readonly PipeNameDescription _pipeNameDescription = NamedPipeServer.GetPipeName(Guid.NewGuid().ToString("N"));
private readonly List _namedPipeConnections = new();
+ private readonly ConcurrentBag _testApplications = new();
+ private bool _areTestingPlatformApplications = true;
public MSBuildConnectionHandler(List args, TestApplicationActionQueue actionQueue)
{
@@ -62,9 +65,16 @@ private Task OnRequest(IRequest request)
throw new NotSupportedException($"Request '{request.GetType()}' is unsupported.");
}
- var testApp = new TestApplication(new Module(module.DLLPath, module.ProjectPath, module.TargetFramework, module.RunSettingsFilePath), _args);
- // Write the test application to the channel
- _actionQueue.Enqueue(testApp);
+ // Check if the test app has IsTestingPlatformApplication property set to true
+ if (bool.TryParse(module.IsTestingPlatformApplication, out bool isTestingPlatformApplication) && isTestingPlatformApplication)
+ {
+ var testApp = new TestApplication(new Module(module.DllOrExePath, module.ProjectPath, module.TargetFramework, module.RunSettingsFilePath), _args);
+ _testApplications.Add(testApp);
+ }
+ else // If one test app has IsTestingPlatformApplication set to false, then we will not run any of the test apps
+ {
+ _areTestingPlatformApplications = false;
+ }
}
catch (Exception ex)
{
@@ -79,14 +89,29 @@ private Task OnRequest(IRequest request)
return Task.FromResult((IResponse)VoidResponse.CachedInstance);
}
+ public bool EnqueueTestApplications()
+ {
+ if (!_areTestingPlatformApplications)
+ {
+ return false;
+ }
+
+ foreach (var testApp in _testApplications)
+ {
+ _actionQueue.Enqueue(testApp);
+ }
+ return true;
+ }
+
public int RunWithMSBuild(ParseResult parseResult)
{
List msbuildCommandLineArgs =
[
parseResult.GetValue(TestingPlatformOptions.ProjectOption) ?? string.Empty,
- $"-t:_GetTestsProject",
+ "-t:Restore;_GetTestsProject",
$"-p:GetTestsProjectPipeName={_pipeNameDescription.Name}",
- "-verbosity:q"
+ "-verbosity:q",
+ "-nologo",
];
AddBinLogParameterIfExists(msbuildCommandLineArgs, _args);
@@ -137,6 +162,11 @@ public void Dispose()
{
namedPipeServer.Dispose();
}
+
+ foreach (var testApplication in _testApplications)
+ {
+ testApplication.Dispose();
+ }
}
}
}
diff --git a/src/Cli/dotnet/commands/dotnet-test/Models.cs b/src/Cli/dotnet/commands/dotnet-test/Models.cs
index 4f4edf811e6d..c53d72e990fa 100644
--- a/src/Cli/dotnet/commands/dotnet-test/Models.cs
+++ b/src/Cli/dotnet/commands/dotnet-test/Models.cs
@@ -5,7 +5,7 @@
namespace Microsoft.DotNet.Cli
{
- internal sealed record Module(string? DLLOrExe, string? ProjectPath, string? TargetFramework, string? RunSettingsFilePath);
+ internal sealed record Module(string? DllOrExePath, string? ProjectPath, string? TargetFramework, string? RunSettingsFilePath);
internal sealed record Handshake(Dictionary? Properties);
diff --git a/src/Cli/dotnet/commands/dotnet-test/TestApplication.cs b/src/Cli/dotnet/commands/dotnet-test/TestApplication.cs
index 0ad9e9e038af..789f77f218b5 100644
--- a/src/Cli/dotnet/commands/dotnet-test/TestApplication.cs
+++ b/src/Cli/dotnet/commands/dotnet-test/TestApplication.cs
@@ -55,12 +55,12 @@ public async Task RunAsync(bool isFilterMode, bool enableHelp, BuiltInOptio
return 1;
}
- bool isDll = _module.DLLOrExe.EndsWith(".dll");
+ bool isDll = _module.DllOrExePath.EndsWith(".dll");
ProcessStartInfo processStartInfo = new()
{
- FileName = isFilterMode ? isDll ? Environment.ProcessPath : _module.DLLOrExe : Environment.ProcessPath,
- Arguments = enableHelp ? BuildHelpArgs(isDll) : isFilterMode ? BuildArgs(isDll) : BuildArgsWithDotnetRun(builtInOptions),
+ FileName = isFilterMode ? isDll ? Environment.ProcessPath : _module.DllOrExePath : Environment.ProcessPath,
+ Arguments = isFilterMode ? BuildArgs(isDll) : BuildArgsWithDotnetRun(enableHelp, builtInOptions),
RedirectStandardOutput = true,
RedirectStandardError = true
};
@@ -74,8 +74,10 @@ public async Task RunAsync(bool isFilterMode, bool enableHelp, BuiltInOptio
var result = await StartProcess(processStartInfo);
_namedPipeConnectionLoop.Wait();
+
return result;
}
+
private async Task WaitConnectionAsync(CancellationToken token)
{
try
@@ -145,7 +147,7 @@ private Task OnRequest(IRequest request)
default:
// If it doesn't match any of the above, throw an exception
- throw new NotSupportedException($"Request '{request.GetType()}' is unsupported.");
+ throw new NotSupportedException(string.Format(LocalizableStrings.CmdUnsupportedMessageRequestTypeException, request.GetType()));
}
}
catch (Exception ex)
@@ -224,19 +226,19 @@ private void StoreOutputAndErrorData(Process process)
private bool ModulePathExists()
{
- if (!File.Exists(_module.DLLOrExe))
+ if (!File.Exists(_module.DllOrExePath))
{
- ErrorReceived.Invoke(this, new ErrorEventArgs { ErrorMessage = $"Test module '{_module.DLLOrExe}' not found. Build the test application before or run 'dotnet test'." });
+ ErrorReceived.Invoke(this, new ErrorEventArgs { ErrorMessage = $"Test module '{_module.DllOrExePath}' not found. Build the test application before or run 'dotnet test'." });
return false;
}
return true;
}
- private string BuildArgsWithDotnetRun(BuiltInOptions builtInOptions)
+ private string BuildArgsWithDotnetRun(bool hasHelp, BuiltInOptions builtInOptions)
{
StringBuilder builder = new();
- builder.Append($"{CliConstants.DotnetRunCommand} {CliConstants.ProjectOptionKey} \"{_module.ProjectPath}\"");
+ builder.Append($"{CliConstants.DotnetRunCommand} {TestingPlatformOptions.ProjectOption.Name} \"{_module.ProjectPath}\"");
if (builtInOptions.HasNoRestore)
{
@@ -265,6 +267,11 @@ private string BuildArgsWithDotnetRun(BuiltInOptions builtInOptions)
builder.Append($" {CliConstants.ParametersSeparator} ");
+ if (hasHelp)
+ {
+ builder.Append($" {CliConstants.HelpOptionKey} ");
+ }
+
builder.Append(_args.Count != 0
? _args.Aggregate((a, b) => $"{a} {b}")
: string.Empty);
@@ -280,7 +287,7 @@ private string BuildArgs(bool isDll)
if (isDll)
{
- builder.Append($"exec {_module.DLLOrExe} ");
+ builder.Append($"exec {_module.DllOrExePath} ");
}
builder.Append(_args.Count != 0
@@ -292,26 +299,12 @@ private string BuildArgs(bool isDll)
return builder.ToString();
}
- private string BuildHelpArgs(bool isDll)
- {
- StringBuilder builder = new();
-
- if (isDll)
- {
- builder.Append($"exec {_module.DLLOrExe} ");
- }
-
- builder.Append($" {CliConstants.HelpOptionKey} {CliConstants.ServerOptionKey} {CliConstants.ServerOptionValue} {CliConstants.DotNetTestPipeOptionKey} {_pipeNameDescription.Name}");
-
- return builder.ToString();
- }
-
public void OnHandshakeMessage(HandshakeMessage handshakeMessage)
{
if (handshakeMessage.Properties.TryGetValue(HandshakeMessagePropertyNames.ExecutionId, out string executionId))
{
AddExecutionId(executionId);
- ExecutionIdReceived?.Invoke(this, new ExecutionEventArgs { ModulePath = _module.DLLOrExe, ExecutionId = executionId });
+ ExecutionIdReceived?.Invoke(this, new ExecutionEventArgs { ModulePath = _module.DllOrExePath, ExecutionId = executionId });
}
HandshakeReceived?.Invoke(this, new HandshakeArgs { Handshake = new Handshake(handshakeMessage.Properties) });
}
@@ -354,9 +347,9 @@ public override string ToString()
{
StringBuilder builder = new();
- if (!string.IsNullOrEmpty(_module.DLLOrExe))
+ if (!string.IsNullOrEmpty(_module.DllOrExePath))
{
- builder.Append($"DLL: {_module.DLLOrExe}");
+ builder.Append($"DLL: {_module.DllOrExePath}");
}
if (!string.IsNullOrEmpty(_module.ProjectPath))
diff --git a/src/Cli/dotnet/commands/dotnet-test/TestingPlatformCommand.cs b/src/Cli/dotnet/commands/dotnet-test/TestingPlatformCommand.cs
index 9083b4ccf4eb..1dca9f8b9120 100644
--- a/src/Cli/dotnet/commands/dotnet-test/TestingPlatformCommand.cs
+++ b/src/Cli/dotnet/commands/dotnet-test/TestingPlatformCommand.cs
@@ -26,87 +26,105 @@ public TestingPlatformCommand(string name, string description = null) : base(nam
public int Run(ParseResult parseResult)
{
- // User can decide what the degree of parallelism should be
- // If not specified, we will default to the number of processors
- if (!int.TryParse(parseResult.GetValue(TestingPlatformOptions.MaxParallelTestModulesOption), out int degreeOfParallelism))
- degreeOfParallelism = Environment.ProcessorCount;
-
- bool filterModeEnabled = parseResult.HasOption(TestingPlatformOptions.TestModulesFilterOption);
-
- if (filterModeEnabled && parseResult.HasOption(TestingPlatformOptions.ArchitectureOption))
+ bool hasFailed = false;
+ try
{
- VSTestTrace.SafeWriteTrace(() => $"The --arch option is not supported yet.");
- }
+ // User can decide what the degree of parallelism should be
+ // If not specified, we will default to the number of processors
+ if (!int.TryParse(parseResult.GetValue(TestingPlatformOptions.MaxParallelTestModulesOption), out int degreeOfParallelism))
+ degreeOfParallelism = Environment.ProcessorCount;
- BuiltInOptions builtInOptions = new(
- parseResult.HasOption(TestingPlatformOptions.NoRestoreOption),
- parseResult.HasOption(TestingPlatformOptions.NoBuildOption),
- parseResult.GetValue(TestingPlatformOptions.ConfigurationOption),
- parseResult.GetValue(TestingPlatformOptions.ArchitectureOption));
+ bool filterModeEnabled = parseResult.HasOption(TestingPlatformOptions.TestModulesFilterOption);
- if (ContainsHelpOption(parseResult.GetArguments()))
- {
- _actionQueue = new(degreeOfParallelism, async (TestApplication testApp) =>
+ if (filterModeEnabled && parseResult.HasOption(TestingPlatformOptions.ArchitectureOption))
{
- testApp.HelpRequested += OnHelpRequested;
- testApp.ErrorReceived += OnErrorReceived;
- testApp.TestProcessExited += OnTestProcessExited;
- testApp.Run += OnTestApplicationRun;
- testApp.ExecutionIdReceived += OnExecutionIdReceived;
+ VSTestTrace.SafeWriteTrace(() => $"The --arch option is not supported yet.");
+ }
- return await testApp.RunAsync(filterModeEnabled, enableHelp: true, builtInOptions);
- });
- }
- else
- {
- _actionQueue = new(degreeOfParallelism, async (TestApplication testApp) =>
- {
- testApp.HandshakeReceived += OnHandshakeReceived;
- testApp.DiscoveredTestsReceived += OnDiscoveredTestsReceived;
- testApp.TestResultsReceived += OnTestResultsReceived;
- testApp.FileArtifactsReceived += OnFileArtifactsReceived;
- testApp.SessionEventReceived += OnSessionEventReceived;
- testApp.ErrorReceived += OnErrorReceived;
- testApp.TestProcessExited += OnTestProcessExited;
- testApp.Run += OnTestApplicationRun;
- testApp.ExecutionIdReceived += OnExecutionIdReceived;
+ BuiltInOptions builtInOptions = new(
+ parseResult.HasOption(TestingPlatformOptions.NoRestoreOption),
+ parseResult.HasOption(TestingPlatformOptions.NoBuildOption),
+ parseResult.GetValue(TestingPlatformOptions.ConfigurationOption),
+ parseResult.GetValue(TestingPlatformOptions.ArchitectureOption));
- return await testApp.RunAsync(filterModeEnabled, enableHelp: false, builtInOptions);
- });
- }
+ if (ContainsHelpOption(parseResult.GetArguments()))
+ {
+ _actionQueue = new(degreeOfParallelism, async (TestApplication testApp) =>
+ {
+ testApp.HelpRequested += OnHelpRequested;
+ testApp.ErrorReceived += OnErrorReceived;
+ testApp.TestProcessExited += OnTestProcessExited;
+ testApp.Run += OnTestApplicationRun;
+ testApp.ExecutionIdReceived += OnExecutionIdReceived;
+
+ return await testApp.RunAsync(filterModeEnabled, enableHelp: true, builtInOptions);
+ });
+ }
+ else
+ {
+ _actionQueue = new(degreeOfParallelism, async (TestApplication testApp) =>
+ {
+ testApp.HandshakeReceived += OnHandshakeReceived;
+ testApp.DiscoveredTestsReceived += OnDiscoveredTestsReceived;
+ testApp.TestResultsReceived += OnTestResultsReceived;
+ testApp.FileArtifactsReceived += OnFileArtifactsReceived;
+ testApp.SessionEventReceived += OnSessionEventReceived;
+ testApp.ErrorReceived += OnErrorReceived;
+ testApp.TestProcessExited += OnTestProcessExited;
+ testApp.Run += OnTestApplicationRun;
+ testApp.ExecutionIdReceived += OnExecutionIdReceived;
+
+ return await testApp.RunAsync(filterModeEnabled, enableHelp: false, builtInOptions);
+ });
+ }
- _args = new List(parseResult.UnmatchedTokens);
- _msBuildConnectionHandler = new(_args, _actionQueue);
- _testModulesFilterHandler = new(_args, _actionQueue);
- _namedPipeConnectionLoop = Task.Run(async () => await _msBuildConnectionHandler.WaitConnectionAsync(_cancellationToken.Token));
+ _args = new List(parseResult.UnmatchedTokens);
+ _msBuildConnectionHandler = new(_args, _actionQueue);
+ _testModulesFilterHandler = new(_args, _actionQueue);
+ _namedPipeConnectionLoop = Task.Run(async () => await _msBuildConnectionHandler.WaitConnectionAsync(_cancellationToken.Token));
- if (parseResult.HasOption(TestingPlatformOptions.TestModulesFilterOption))
- {
- if (!_testModulesFilterHandler.RunWithTestModulesFilter(parseResult))
+ if (parseResult.HasOption(TestingPlatformOptions.TestModulesFilterOption))
{
- return ExitCodes.GenericFailure;
+ if (!_testModulesFilterHandler.RunWithTestModulesFilter(parseResult))
+ {
+ return ExitCodes.GenericFailure;
+ }
}
- }
- else
- {
- // If no filter was provided, MSBuild will get the test project paths
- var msbuildResult = _msBuildConnectionHandler.RunWithMSBuild(parseResult);
- if (msbuildResult != 0)
+ else
{
- VSTestTrace.SafeWriteTrace(() => $"MSBuild task _GetTestsProject didn't execute properly with exit code: {msbuildResult}.");
- return ExitCodes.GenericFailure;
+ // If no filter was provided, MSBuild will get the test project paths
+ var msbuildResult = _msBuildConnectionHandler.RunWithMSBuild(parseResult);
+ if (msbuildResult != 0)
+ {
+ VSTestTrace.SafeWriteTrace(() => $"MSBuild task _GetTestsProject didn't execute properly with exit code: {msbuildResult}.");
+ CleanUp();
+ return ExitCodes.GenericFailure;
+ }
+
+ // If not all test projects have IsTestingPlatformApplication set to true, we will simply return
+ if (!_msBuildConnectionHandler.EnqueueTestApplications())
+ {
+ VSTestTrace.SafeWriteTrace(() => LocalizableStrings.CmdUnsupportedVSTestTestApplicationsDescription);
+ CleanUp();
+ return ExitCodes.GenericFailure;
+ }
}
- }
- _actionQueue.EnqueueCompleted();
- var hasFailed = _actionQueue.WaitAllActions();
+ _actionQueue.EnqueueCompleted();
+ hasFailed = _actionQueue.WaitAllActions();
- // Above line will block till we have all connections and all GetTestsProject msbuild task complete.
- _cancellationToken.Cancel();
- _namedPipeConnectionLoop.Wait();
+ // Above line will block till we have all connections and all GetTestsProject msbuild task complete.
+ _cancellationToken.Cancel();
+ _namedPipeConnectionLoop.Wait();
- // Clean up everything
- CleanUp();
+ // Clean up everything
+ CleanUp();
+ }
+ catch (Exception)
+ {
+ CleanUp();
+ throw;
+ }
return hasFailed ? ExitCodes.GenericFailure : ExitCodes.Success;
}
diff --git a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.cs.xlf
index 83a4bba377f6..2ad19fb0b1b8 100644
--- a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.cs.xlf
+++ b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.cs.xlf
@@ -113,6 +113,11 @@ Příklady:
NÁZEV="HODNOTA"
+
+
+ Invalid test message state '{0}'
+ {0} - test message state
+ Maximální počet testovacích modulů, které je možné spustit paralelně.
@@ -245,6 +250,16 @@ Pokud zadaný adresář neexistuje, bude vytvořen.
The test modules have the specified root directory.
+
+
+ Message Request type '{0}' is unsupported.
+ {0} - message request type
+
+
+
+ Test application(s) that support VSTest are not supported.
+
+ DUMP_TYPE
diff --git a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.de.xlf
index 7efb211bccf3..230a26c4cdf8 100644
--- a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.de.xlf
+++ b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.de.xlf
@@ -113,6 +113,11 @@ Beispiele:
NAME="WERT"
+
+
+ Invalid test message state '{0}'
+ {0} - test message state
+ Die maximale Anzahl von Testmodulen, die parallel ausgeführt werden können.
@@ -245,6 +250,16 @@ Das angegebene Verzeichnis wird erstellt, wenn es nicht vorhanden ist.
The test modules have the specified root directory.
+
+
+ Message Request type '{0}' is unsupported.
+ {0} - message request type
+
+
+
+ Test application(s) that support VSTest are not supported.
+
+ DUMP_TYPE
diff --git a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.es.xlf
index 2f5cf87baa45..b4504cd41ca0 100644
--- a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.es.xlf
+++ b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.es.xlf
@@ -115,6 +115,11 @@ Ejemplos:
NAME="VALUE"
+
+
+ Invalid test message state '{0}'
+ {0} - test message state
+ Número máximo de módulos de prueba que se pueden ejecutar en paralelo.
@@ -247,6 +252,16 @@ Si no existe, se creará el directorio especificado.
The test modules have the specified root directory.
+
+
+ Message Request type '{0}' is unsupported.
+ {0} - message request type
+
+
+
+ Test application(s) that support VSTest are not supported.
+
+ DUMP_TYPE
diff --git a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.fr.xlf
index 8a258dc33a1f..080d51785fda 100644
--- a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.fr.xlf
+++ b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.fr.xlf
@@ -113,6 +113,11 @@ Exemples :
NAME="VALUE"
+
+
+ Invalid test message state '{0}'
+ {0} - test message state
+ Nombre maximal de modules de test qui peuvent s’exécuter en parallèle.
@@ -245,6 +250,16 @@ Le répertoire spécifié est créé, s'il n'existe pas déjà.
The test modules have the specified root directory.
+
+
+ Message Request type '{0}' is unsupported.
+ {0} - message request type
+
+
+
+ Test application(s) that support VSTest are not supported.
+
+ DUMP_TYPE
diff --git a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.it.xlf
index 3bccb19e8bda..31ea56d050fe 100644
--- a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.it.xlf
+++ b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.it.xlf
@@ -113,6 +113,11 @@ Esempi:
NAME="VALORE"
+
+
+ Invalid test message state '{0}'
+ {0} - test message state
+ Numero massimo di moduli di test che possono essere eseguiti in parallelo.
@@ -245,6 +250,16 @@ Se non esiste, la directory specificata verrà creata.
The test modules have the specified root directory.
+
+
+ Message Request type '{0}' is unsupported.
+ {0} - message request type
+
+
+
+ Test application(s) that support VSTest are not supported.
+
+ DUMP_TYPE
diff --git a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ja.xlf
index 29f5c453b89b..cc1420582f48 100644
--- a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ja.xlf
+++ b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ja.xlf
@@ -113,6 +113,11 @@ Examples:
NAME="VALUE"
+
+
+ Invalid test message state '{0}'
+ {0} - test message state
+ 並列で実行できるテスト モジュールの最大数。
@@ -245,6 +250,16 @@ The specified directory will be created if it does not exist.
The test modules have the specified root directory.
+
+
+ Message Request type '{0}' is unsupported.
+ {0} - message request type
+
+
+
+ Test application(s) that support VSTest are not supported.
+
+ DUMP_TYPE
diff --git a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ko.xlf
index c8cf9b805489..37bb82ef49af 100644
--- a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ko.xlf
+++ b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ko.xlf
@@ -113,6 +113,11 @@ Examples:
NAME="VALUE"
+
+
+ Invalid test message state '{0}'
+ {0} - test message state
+ 병렬로 실행할 수 있는 최대 테스트 모듈 수입니다.
@@ -245,6 +250,16 @@ The specified directory will be created if it does not exist.
The test modules have the specified root directory.
+
+
+ Message Request type '{0}' is unsupported.
+ {0} - message request type
+
+
+
+ Test application(s) that support VSTest are not supported.
+
+ DUMP_TYPE
diff --git a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pl.xlf
index 5fa62e425f4a..8d40d724227b 100644
--- a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pl.xlf
+++ b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pl.xlf
@@ -113,6 +113,11 @@ Przykłady:
NAZWA="WARTOŚĆ"
+
+
+ Invalid test message state '{0}'
+ {0} - test message state
+ Maksymalna liczba modułów testowych, które mogą być uruchamiane równolegle.
@@ -245,6 +250,16 @@ Jeśli określony katalog nie istnieje, zostanie utworzony.
The test modules have the specified root directory.
+
+
+ Message Request type '{0}' is unsupported.
+ {0} - message request type
+
+
+
+ Test application(s) that support VSTest are not supported.
+
+ DUMP_TYPE
diff --git a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pt-BR.xlf
index bea22d376cfa..5eaa4668710e 100644
--- a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pt-BR.xlf
+++ b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.pt-BR.xlf
@@ -113,6 +113,11 @@ Exemplos:
NAME="VALUE"
+
+
+ Invalid test message state '{0}'
+ {0} - test message state
+ O número máximo de módulos de teste que podem ser executados em paralelo.
@@ -245,6 +250,16 @@ O diretório especificado será criado se ele ainda não existir.
The test modules have the specified root directory.
+
+
+ Message Request type '{0}' is unsupported.
+ {0} - message request type
+
+
+
+ Test application(s) that support VSTest are not supported.
+
+ DUMP_TYPE
diff --git a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ru.xlf
index 68642e4e501f..a9669d9915c4 100644
--- a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ru.xlf
+++ b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.ru.xlf
@@ -113,6 +113,11 @@ Examples:
NAME="VALUE"
+
+
+ Invalid test message state '{0}'
+ {0} - test message state
+ Максимальное число тестовых модулей, которые могут выполняться параллельно.
@@ -245,6 +250,16 @@ The specified directory will be created if it does not exist.
The test modules have the specified root directory.
+
+
+ Message Request type '{0}' is unsupported.
+ {0} - message request type
+
+
+
+ Test application(s) that support VSTest are not supported.
+
+ DUMP_TYPE
diff --git a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.tr.xlf
index 62d2eb669f00..68bcd480e31b 100644
--- a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.tr.xlf
+++ b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.tr.xlf
@@ -113,6 +113,11 @@ Bu bağımsız değişken, birden çok değişken sağlamak için birden çok ke
AD="DEĞER"
+
+
+ Invalid test message state '{0}'
+ {0} - test message state
+ Paralel olarak çalıştırılabilecek test modüllerinin maksimum sayısı.
@@ -245,6 +250,16 @@ Belirtilen dizin yoksa oluşturulur.
The test modules have the specified root directory.
+
+
+ Message Request type '{0}' is unsupported.
+ {0} - message request type
+
+
+
+ Test application(s) that support VSTest are not supported.
+
+ DÖKÜM_TÜRÜ
diff --git a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hans.xlf
index 03f422f9671f..e7ac40be829b 100644
--- a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hans.xlf
+++ b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hans.xlf
@@ -113,6 +113,11 @@ Examples:
NAME="VALUE"
+
+
+ Invalid test message state '{0}'
+ {0} - test message state
+ 可并行运行的测试模块的最大数目。
@@ -245,6 +250,16 @@ The specified directory will be created if it does not exist.
The test modules have the specified root directory.
+
+
+ Message Request type '{0}' is unsupported.
+ {0} - message request type
+
+
+
+ Test application(s) that support VSTest are not supported.
+
+ DUMP_TYPE
diff --git a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hant.xlf
index 607a06989de6..222eb321c2c4 100644
--- a/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hant.xlf
+++ b/src/Cli/dotnet/commands/dotnet-test/xlf/LocalizableStrings.zh-Hant.xlf
@@ -113,6 +113,11 @@ Examples:
NAME="VALUE"
+
+
+ Invalid test message state '{0}'
+ {0} - test message state
+ 可平行執行的測試模組數目上限。
@@ -245,6 +250,16 @@ The specified directory will be created if it does not exist.
The test modules have the specified root directory.
+
+
+ Message Request type '{0}' is unsupported.
+ {0} - message request type
+
+
+
+ Test application(s) that support VSTest are not supported.
+
+ DUMP_TYPE
diff --git a/src/Layout/redist/MSBuildImports/Current/Microsoft.Common.CrossTargeting.targets/ImportAfter/Microsoft.TestPlatform.CrossTargeting.targets b/src/Layout/redist/MSBuildImports/Current/Microsoft.Common.CrossTargeting.targets/ImportAfter/Microsoft.TestPlatform.CrossTargeting.targets
index c0dccc2c5812..932d7f5f74fa 100644
--- a/src/Layout/redist/MSBuildImports/Current/Microsoft.Common.CrossTargeting.targets/ImportAfter/Microsoft.TestPlatform.CrossTargeting.targets
+++ b/src/Layout/redist/MSBuildImports/Current/Microsoft.Common.CrossTargeting.targets/ImportAfter/Microsoft.TestPlatform.CrossTargeting.targets
@@ -154,7 +154,6 @@ Copyright (c) .NET Foundation. All rights reserved.
-
diff --git a/src/Layout/redist/MSBuildImports/Current/Microsoft.Common.targets/ImportAfter/Microsoft.TestPlatform.ImportAfter.targets b/src/Layout/redist/MSBuildImports/Current/Microsoft.Common.targets/ImportAfter/Microsoft.TestPlatform.ImportAfter.targets
index 74cf2ac98f47..875d58d41c35 100644
--- a/src/Layout/redist/MSBuildImports/Current/Microsoft.Common.targets/ImportAfter/Microsoft.TestPlatform.ImportAfter.targets
+++ b/src/Layout/redist/MSBuildImports/Current/Microsoft.Common.targets/ImportAfter/Microsoft.TestPlatform.ImportAfter.targets
@@ -19,7 +19,7 @@ Copyright (c) .NET Foundation. All rights reserved.
-
-
+
+
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/GetTestsProject.cs b/src/Tasks/Microsoft.NET.Build.Tasks/GetTestsProject.cs
index d7ff79182342..bc29b3224df1 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/GetTestsProject.cs
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/GetTestsProject.cs
@@ -24,6 +24,8 @@ public class GetTestsProject : Microsoft.Build.Utilities.Task
public ITaskItem RunSettingsFilePath { get; set; } = new TaskItem(string.Empty);
+ public ITaskItem IsTestingPlatformApplication { get; set; } = new TaskItem(string.Empty);
+
public override bool Execute()
{
try
@@ -36,7 +38,7 @@ public override bool Execute()
dotnetTestPipeClient.RegisterSerializer(new VoidResponseSerializer(), typeof(VoidResponse));
dotnetTestPipeClient.ConnectAsync(CancellationToken.None).GetAwaiter().GetResult();
- dotnetTestPipeClient.RequestReplyAsync(new ModuleMessage(TargetPath.ItemSpec, ProjectFullPath.ItemSpec, TargetFramework.ItemSpec, RunSettingsFilePath.ItemSpec), CancellationToken.None).GetAwaiter().GetResult();
+ dotnetTestPipeClient.RequestReplyAsync(new ModuleMessage(TargetPath.ItemSpec, ProjectFullPath.ItemSpec, TargetFramework.ItemSpec, RunSettingsFilePath.ItemSpec, IsTestingPlatformApplication.ItemSpec), CancellationToken.None).GetAwaiter().GetResult();
}
catch (Exception ex)
{