diff --git a/Directory.Build.targets b/Directory.Build.targets
index 691921249d5f..2d510c42fc18 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -96,8 +96,9 @@
-
+
+
diff --git a/Directory.Packages.props b/Directory.Packages.props
index ab453e50c8c7..788923bf48d6 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -59,7 +59,6 @@
-
diff --git a/eng/SourcePackage.netframework.editorconfig b/eng/SourcePackage.netframework.editorconfig
new file mode 100644
index 000000000000..e9cd67ee9fbd
--- /dev/null
+++ b/eng/SourcePackage.netframework.editorconfig
@@ -0,0 +1,21 @@
+# Remove the line below if you want to inherit .editorconfig settings from higher directories
+root = true
+
+# C# files
+[*.cs]
+
+# We don't want any analyzer diagnostics to be reported for people consuming this as a source package.
+dotnet_analyzer_diagnostic.severity = none
+
+generated_code = true
+
+# The above configurations don't apply to compiler warnings. Requiring all params to be documented
+# is not something we require for this project, so suppressing it directly here.
+dotnet_diagnostic.CS1573.severity = none
+
+# As above, we need to specifically disable compiler warnings that we don't want to break downstream
+# builds
+dotnet_diagnostic.IDE0005.severity = none
+
+# Disable nullability checks when targeting .NET Framework
+dotnet_diagnostic.CS8604.severity = none
\ No newline at end of file
diff --git a/src/BuiltInTools/dotnet-watch/HotReload/AppModels/HotReloadAppModel.cs b/src/BuiltInTools/dotnet-watch/HotReload/AppModels/HotReloadAppModel.cs
index 37502de871c7..7a205a8d1fce 100644
--- a/src/BuiltInTools/dotnet-watch/HotReload/AppModels/HotReloadAppModel.cs
+++ b/src/BuiltInTools/dotnet-watch/HotReload/AppModels/HotReloadAppModel.cs
@@ -16,13 +16,7 @@ protected static string GetInjectedAssemblyPath(string targetFramework, string a
public static string GetStartupHookPath(ProjectGraphNode project)
{
- var hookTargetFramework = project.GetTargetFramework() switch
- {
- // Note: Hot Reload is only supported on net6.0+
- "net6.0" or "net7.0" or "net8.0" or "net9.0" => "net6.0",
- _ => "net10.0",
- };
-
+ var hookTargetFramework = project.GetTargetFrameworkVersion() is { Major: >= 10 } ? "net10.0" : "net6.0";
return GetInjectedAssemblyPath(hookTargetFramework, "Microsoft.Extensions.DotNetDeltaApplier");
}
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Components.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Components.cs
index 34870595d00e..1a73b2615c39 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/Components.cs
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/Components.cs
@@ -15,7 +15,6 @@ public static class Components
(typeof(IPostActionProcessor), new InstructionDisplayPostActionProcessor()),
(typeof(IPostActionProcessor), new ProcessStartPostActionProcessor()),
(typeof(IPostActionProcessor), new AddJsonPropertyPostActionProcessor()),
- (typeof(IPostActionProcessor), new CreateOrUpdateDotnetConfigPostActionProcessor()),
};
}
}
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/LocalizableStrings.Designer.cs b/src/Cli/Microsoft.TemplateEngine.Cli/LocalizableStrings.Designer.cs
index f7b0a86e0e80..ecf9c58147f5 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/LocalizableStrings.Designer.cs
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/LocalizableStrings.Designer.cs
@@ -1403,51 +1403,6 @@ internal static string PossibleValuesHeader {
}
}
- ///
- /// Looks up a localized string similar to Created new section in 'dotnet.config' file.
- ///
- internal static string PostAction_CreateDotnetConfig_CreatedNewSection {
- get {
- return ResourceManager.GetString("PostAction_CreateDotnetConfig_CreatedNewSection", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Updating existing values in 'dotnet.config' is not yet supported. Please, manually update 'dotnet.config' to have '{0}' under section '{1}'..
- ///
- internal static string PostAction_CreateDotnetConfig_ManuallyUpdate {
- get {
- return ResourceManager.GetString("PostAction_CreateDotnetConfig_ManuallyUpdate", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Successfully created 'dotnet.config' file..
- ///
- internal static string PostAction_CreateDotnetConfig_Succeeded {
- get {
- return ResourceManager.GetString("PostAction_CreateDotnetConfig_Succeeded", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to The required value in 'dotnet.config' is already set..
- ///
- internal static string PostAction_CreateDotnetConfig_ValueAlreadyExist {
- get {
- return ResourceManager.GetString("PostAction_CreateDotnetConfig_ValueAlreadyExist", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Post action argument '{0}' is mandatory, but not configured..
- ///
- internal static string PostAction_DotnetConfig_Error_ArgumentNotConfigured {
- get {
- return ResourceManager.GetString("PostAction_DotnetConfig_Error_ArgumentNotConfigured", resourceCulture);
- }
- }
-
///
/// Looks up a localized string similar to Post action argument '{0}' is not a valid boolean value..
///
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/LocalizableStrings.resx b/src/Cli/Microsoft.TemplateEngine.Cli/LocalizableStrings.resx
index d7de5f7d82b2..01b59dfe8833 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/LocalizableStrings.resx
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/LocalizableStrings.resx
@@ -953,23 +953,4 @@ The header is followed by the list of parameters and their errors (might be seve
Attempting to find json file '{0}' in '{1}'
-
- Post action argument '{0}' is mandatory, but not configured.
-
-
- Successfully created 'dotnet.config' file.
- {Locked="dotnet.config"}
-
-
- Created new section in 'dotnet.config' file
- {Locked="dotnet.config"}
-
-
- The required value in 'dotnet.config' is already set.
- {Locked="dotnet.config"}
-
-
- Updating existing values in 'dotnet.config' is not yet supported. Please, manually update 'dotnet.config' to have '{0}' under section '{1}'.
- {Locked="dotnet.config"}
-
-
\ No newline at end of file
+
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Microsoft.TemplateEngine.Cli.csproj b/src/Cli/Microsoft.TemplateEngine.Cli/Microsoft.TemplateEngine.Cli.csproj
index d8fb3406268a..228c9cd613d2 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/Microsoft.TemplateEngine.Cli.csproj
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/Microsoft.TemplateEngine.Cli.csproj
@@ -16,7 +16,6 @@
-
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/AddJsonPropertyPostActionProcessor.cs b/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/AddJsonPropertyPostActionProcessor.cs
index 68a0855d97ef..80ca23402914 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/AddJsonPropertyPostActionProcessor.cs
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/AddJsonPropertyPostActionProcessor.cs
@@ -19,6 +19,7 @@ internal class AddJsonPropertyPostActionProcessor : PostActionProcessorBase
private const string ParentPropertyPathArgument = "parentPropertyPath";
private const string NewJsonPropertyNameArgument = "newJsonPropertyName";
private const string NewJsonPropertyValueArgument = "newJsonPropertyValue";
+ private const string DetectRepoRootForFileCreation = "detectRepositoryRootForFileCreation";
private static readonly JsonSerializerOptions SerializerOptions = new()
{
@@ -36,6 +37,43 @@ internal class AddJsonPropertyPostActionProcessor : PostActionProcessorBase
internal static Guid ActionProcessorId { get; } = new Guid("695A3659-EB40-4FF5-A6A6-C9C4E629FCB0");
+ internal static string GetRootDirectory(IPhysicalFileSystem fileSystem, string outputBasePath)
+ {
+ string? currentDirectory = outputBasePath;
+ string? directoryWithSln = null;
+ while (currentDirectory is not null)
+ {
+ if (fileSystem.FileExists(Path.Combine(currentDirectory, "global.json")) ||
+ fileSystem.FileExists(Path.Combine(currentDirectory, ".git")) ||
+ fileSystem.DirectoryExists(Path.Combine(currentDirectory, ".git")))
+ {
+ // If we found global.json or .git, we immediately return the directory as the repo root.
+ // We won't go up any further.
+ return currentDirectory;
+ }
+
+ // DirectoryExists here should always be true in practice, but for the way tests are mocking the file system, it's not.
+ // The check was added to prevent test failures similar to:
+ // System.IO.DirectoryNotFoundException : Could not find a part of the path '/Users/runner/work/1/s/artifacts/bin/Microsoft.TemplateEngine.Cli.UnitTests/Release/sandbox'.
+ // We get to this exception when doing `EnumerateFiles` on a directory that was virtually created in memory (not really available on disk).
+ // EnumerateFiles tries to access the physical file system, which then fails.
+ if (fileSystem.DirectoryExists(currentDirectory) &&
+ (fileSystem.EnumerateFiles(currentDirectory, "*.sln", SearchOption.TopDirectoryOnly).Any() ||
+ fileSystem.EnumerateFiles(currentDirectory, "*.slnx", SearchOption.TopDirectoryOnly).Any()))
+ {
+ directoryWithSln = currentDirectory;
+ }
+
+ currentDirectory = Directory.GetParent(currentDirectory)?.FullName;
+ }
+
+ // If we reach here, that means we didn't find .git or global.json.
+ // So, we return the directory where we found a .sln/.slnx file, if any.
+ // Note that when we keep track of directoryWithSln, we keep updating it from sln/slnx from parent directories, if found.
+ // This means that if there are multiple .sln/.slnx files in the parent directories, we will return the top-most one.
+ return directoryWithSln ?? outputBasePath;
+ }
+
protected override bool ProcessInternal(
IEngineEnvironmentSettings environment,
IPostAction action,
@@ -65,7 +103,13 @@ protected override bool ProcessInternal(
return false;
}
- string newJsonFilePath = Path.Combine(outputBasePath, jsonFileName);
+ if (!bool.TryParse(action.Args.GetValueOrDefault(DetectRepoRootForFileCreation, "false"), out bool detectRepoRoot))
+ {
+ Reporter.Error.WriteLine(string.Format(LocalizableStrings.PostAction_ModifyJson_Error_ArgumentNotBoolean, DetectRepoRootForFileCreation));
+ return false;
+ }
+
+ string newJsonFilePath = Path.Combine(detectRepoRoot ? GetRootDirectory(environment.Host.FileSystem, outputBasePath) : outputBasePath, jsonFileName);
environment.Host.FileSystem.WriteAllText(newJsonFilePath, "{}");
jsonFiles = new List { newJsonFilePath };
}
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/CreateOrUpdateDotnetConfigPostActionProcessor.cs b/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/CreateOrUpdateDotnetConfigPostActionProcessor.cs
deleted file mode 100644
index 9afbf5e899a0..000000000000
--- a/src/Cli/Microsoft.TemplateEngine.Cli/PostActionProcessors/CreateOrUpdateDotnetConfigPostActionProcessor.cs
+++ /dev/null
@@ -1,131 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using Microsoft.DotNet.Cli.Utils;
-using Microsoft.Extensions.Configuration;
-using Microsoft.TemplateEngine.Abstractions;
-using Microsoft.TemplateEngine.Abstractions.PhysicalFileSystem;
-
-namespace Microsoft.TemplateEngine.Cli.PostActionProcessors
-{
- internal sealed class CreateOrUpdateDotnetConfigPostActionProcessor : PostActionProcessorBase
- {
- private const string SectionArgument = "section";
- private const string KeyArgument = "key";
- private const string ValueArgument = "value";
-
- public override Guid Id => ActionProcessorId;
-
- internal static Guid ActionProcessorId { get; } = new Guid("597E7933-0D87-452C-B094-8FA0EEF7FD97");
-
- protected override bool ProcessInternal(
- IEngineEnvironmentSettings environment,
- IPostAction action,
- ICreationEffects creationEffects,
- ICreationResult templateCreationResult,
- string outputBasePath)
- {
- if (!action.Args.TryGetValue(SectionArgument, out string? sectionName))
- {
- Reporter.Error.WriteLine(string.Format(LocalizableStrings.PostAction_DotnetConfig_Error_ArgumentNotConfigured, SectionArgument));
- return false;
- }
-
- if (!action.Args.TryGetValue(KeyArgument, out string? key))
- {
- Reporter.Error.WriteLine(string.Format(LocalizableStrings.PostAction_DotnetConfig_Error_ArgumentNotConfigured, KeyArgument));
- return false;
- }
-
- if (!action.Args.TryGetValue(ValueArgument, out string? value))
- {
- Reporter.Error.WriteLine(string.Format(LocalizableStrings.PostAction_DotnetConfig_Error_ArgumentNotConfigured, ValueArgument));
- return false;
- }
-
- var fileSystem = environment.Host.FileSystem;
- var repoRoot = GetRootDirectory(fileSystem, outputBasePath);
- var dotnetConfigFilePath = Path.Combine(repoRoot, "dotnet.config");
- if (!fileSystem.FileExists(dotnetConfigFilePath))
- {
- fileSystem.WriteAllText(dotnetConfigFilePath, $"""
- [{sectionName}]
- {key} = "{value}"
-
- """);
-
- Reporter.Output.WriteLine(LocalizableStrings.PostAction_CreateDotnetConfig_Succeeded);
- return true;
- }
-
- var builder = new ConfigurationBuilder();
- using var stream = fileSystem.OpenRead(dotnetConfigFilePath);
- builder.AddIniStream(stream);
- IConfigurationRoot config = builder.Build();
- var section = config.GetSection(sectionName);
-
- if (!section.Exists())
- {
- var existingContent = fileSystem.ReadAllText(dotnetConfigFilePath);
- fileSystem.WriteAllText(dotnetConfigFilePath, $"""
- {existingContent}
-
- [{sectionName}]
- {key} = "{value}"
-
- """);
-
- Reporter.Output.WriteLine(LocalizableStrings.PostAction_CreateDotnetConfig_CreatedNewSection);
- return true;
- }
-
- string? existingValue = section[key];
- if (string.IsNullOrEmpty(existingValue))
- {
- // The section exists, but the key/value pair does not.
- Reporter.Error.WriteLine(string.Format(LocalizableStrings.PostAction_CreateDotnetConfig_ManuallyUpdate, $"{key} = \"{value}\"", $"[{sectionName}]"));
- return false;
- }
-
- if (existingValue.Equals(value, StringComparison.Ordinal))
- {
- // The key already exists with the same value, nothing to do.
- Reporter.Output.WriteLine(LocalizableStrings.PostAction_CreateDotnetConfig_ValueAlreadyExist);
- return true;
- }
-
- Reporter.Error.WriteLine(string.Format(LocalizableStrings.PostAction_CreateDotnetConfig_ManuallyUpdate, $"{key} = \"{value}\"", $"[{sectionName}]"));
- return false;
- }
-
- private static string GetRootDirectory(IPhysicalFileSystem fileSystem, string outputBasePath)
- {
- string? currentDirectory = outputBasePath;
- string? directoryWithSln = null;
- while (currentDirectory is not null)
- {
- if (fileSystem.FileExists(Path.Combine(currentDirectory, "dotnet.config")) ||
- fileSystem.DirectoryExists(Path.Combine(currentDirectory, ".git")))
- {
- return currentDirectory;
- }
-
- // DirectoryExists here should always be true in practice, but for the way tests are mocking the file system, it's not.
- // The check was added to prevent test failures similar to:
- // System.IO.DirectoryNotFoundException : Could not find a part of the path '/Users/runner/work/1/s/artifacts/bin/Microsoft.TemplateEngine.Cli.UnitTests/Release/sandbox'.
- // We get to this exception when doing `EnumerateFiles` on a directory that was virtually created in memory (not really available on disk).
- // EnumerateFiles tries to access the physical file system, which then fails.
- if (fileSystem.DirectoryExists(currentDirectory) &&
- (fileSystem.EnumerateFiles(currentDirectory, "*.sln", SearchOption.TopDirectoryOnly).Any() ||
- fileSystem.EnumerateFiles(currentDirectory, "*.slnx", SearchOption.TopDirectoryOnly).Any()))
- {
- directoryWithSln = currentDirectory;
- }
-
- currentDirectory = Directory.GetParent(currentDirectory)?.FullName;
- }
-
- return directoryWithSln ?? outputBasePath;
- }
- }
-}
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.cs.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.cs.xlf
index 39bd00e9d35f..45f6d58a1ba7 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.cs.xlf
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.cs.xlf
@@ -830,31 +830,6 @@ The header is followed by the list of parameters and their errors (might be seve
Chcete tuto akci spustit? [{0}(ano)|{1}(ne)]
-
- Created new section in 'dotnet.config' file
- V souboru dotnet.config se vytvořil nový oddíl.
- {Locked="dotnet.config"}
-
-
- Updating existing values in 'dotnet.config' is not yet supported. Please, manually update 'dotnet.config' to have '{0}' under section '{1}'.
- Aktualizace existujících hodnot v souboru dotnet.config se zatím nepodporuje. Ručně prosím aktualizujte soubor dotnet.config, aby obsahoval {0} v oddílu {1}.
- {Locked="dotnet.config"}
-
-
- Successfully created 'dotnet.config' file.
- Soubor dotnet.config se úspěšně vytvořil.
- {Locked="dotnet.config"}
-
-
- The required value in 'dotnet.config' is already set.
- Požadovaná hodnota v souboru dotnet.config je již nastavena.
- {Locked="dotnet.config"}
-
-
- Post action argument '{0}' is mandatory, but not configured.
- Argument „{0}“ po akci je povinný, ale není nakonfigurovaný.
-
- Post action argument '{0}' is not a valid boolean value.Argument post-action {0} není platná logická hodnota.
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.de.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.de.xlf
index 2e62d4b04a4c..eb67ab8bf9bf 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.de.xlf
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.de.xlf
@@ -830,31 +830,6 @@ The header is followed by the list of parameters and their errors (might be seve
Möchten Sie diese Aktion ausführen [{0} (ja) |{1} (nein)]?
-
- Created new section in 'dotnet.config' file
- Neuer Abschnitt in der dotnet.config-Datei erstellt
- {Locked="dotnet.config"}
-
-
- Updating existing values in 'dotnet.config' is not yet supported. Please, manually update 'dotnet.config' to have '{0}' under section '{1}'.
- Das Aktualisieren vorhandener Werte in „dotnet.config“ wird noch nicht unterstützt. Aktualisieren Sie „dotnet.config“ manuell, damit „{0}“ im Abschnitt „{1}“ vorhanden ist.
- {Locked="dotnet.config"}
-
-
- Successfully created 'dotnet.config' file.
- Die dotnet.config-Datei wurde erfolgreich erstellt.
- {Locked="dotnet.config"}
-
-
- The required value in 'dotnet.config' is already set.
- Der erforderliche Wert in „dotnet.config“ ist bereits festgelegt.
- {Locked="dotnet.config"}
-
-
- Post action argument '{0}' is mandatory, but not configured.
- Das Postaktionsargument "{0}" ist obligatorisch, aber nicht konfiguriert.
-
- Post action argument '{0}' is not a valid boolean value.Das Post-Aktionsargument „{0}“ ist kein gültiger boolescher Wert.
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.es.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.es.xlf
index f0826c732183..748e66f30a00 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.es.xlf
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.es.xlf
@@ -830,31 +830,6 @@ The header is followed by the list of parameters and their errors (might be seve
¿Quiere ejecutar esta acción [{0}(yes)|{1}(no)]?
-
- Created new section in 'dotnet.config' file
- Se ha creado una nueva sección en el archivo "dotnet.config"
- {Locked="dotnet.config"}
-
-
- Updating existing values in 'dotnet.config' is not yet supported. Please, manually update 'dotnet.config' to have '{0}' under section '{1}'.
- Aún no se admite la actualización de los valores existentes en "dotnet.config". Actualice manualmente "dotnet.config" para que tenga "{0}" en la sección "{1}".
- {Locked="dotnet.config"}
-
-
- Successfully created 'dotnet.config' file.
- El archivo "dotnet.config" se creó correctamente.
- {Locked="dotnet.config"}
-
-
- The required value in 'dotnet.config' is already set.
- El valor requerido en "dotnet.config" ya está establecido.
- {Locked="dotnet.config"}
-
-
- Post action argument '{0}' is mandatory, but not configured.
- El argumento de acción posterior '{0}' es obligatorio, pero no está configurado.
-
- Post action argument '{0}' is not a valid boolean value.El argumento de la acción publicado '{0}' no es un valor booleano válido.
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.fr.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.fr.xlf
index 204d36b66c5a..d86722e36e60 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.fr.xlf
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.fr.xlf
@@ -830,31 +830,6 @@ The header is followed by the list of parameters and their errors (might be seve
Voulez-vous exécuter cette action [{0} (yes) |{1} (no)] ?
-
- Created new section in 'dotnet.config' file
- Création d'une nouvelle section dans le fichier « dotnet.config »
- {Locked="dotnet.config"}
-
-
- Updating existing values in 'dotnet.config' is not yet supported. Please, manually update 'dotnet.config' to have '{0}' under section '{1}'.
- La mise à jour des valeurs existantes dans « dotnet.config » n'est pas encore prise en charge. Veuillez mettre à jour manuellement 'dotnet.config' pour avoir '{0}' sous la section '{1}'.
- {Locked="dotnet.config"}
-
-
- Successfully created 'dotnet.config' file.
- Fichier « dotnet.config » créé avec succès.
- {Locked="dotnet.config"}
-
-
- The required value in 'dotnet.config' is already set.
- La valeur requise dans « dotnet.config » est déjà définie.
- {Locked="dotnet.config"}
-
-
- Post action argument '{0}' is mandatory, but not configured.
- L'argument de publication de l'action '{0}' est obligatoire, mais n'est pas configuré.
-
- Post action argument '{0}' is not a valid boolean value.L’argument post-action « {0} » n’est pas une valeur booléenne valide.
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.it.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.it.xlf
index a1794531a180..45d8e4f02e4e 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.it.xlf
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.it.xlf
@@ -830,31 +830,6 @@ The header is followed by the list of parameters and their errors (might be seve
Eseguire questa azione [{0} (sì) |{1} (no)]?
-
- Created new section in 'dotnet.config' file
- Nuova sezione aggiunta al file ''dotnet.config''
- {Locked="dotnet.config"}
-
-
- Updating existing values in 'dotnet.config' is not yet supported. Please, manually update 'dotnet.config' to have '{0}' under section '{1}'.
- L'aggiornamento dei valori esistenti in ''dotnet.config' 'non è ancora supportato. Si prega di aggiornare manualmente ''dotnet.config'' per avere ''{0}'' nella sezione ''{1}''.
- {Locked="dotnet.config"}
-
-
- Successfully created 'dotnet.config' file.
- Il file ''dotnet.config'' è stato creato.
- {Locked="dotnet.config"}
-
-
- The required value in 'dotnet.config' is already set.
- Il valore richiesto in ''dotnet.config'' è già stato impostato.
- {Locked="dotnet.config"}
-
-
- Post action argument '{0}' is mandatory, but not configured.
- L'argomento post-azione '{0}' è obbligatorio, ma non configurato.
-
- Post action argument '{0}' is not a valid boolean value.L'argomento dell'azione successiva '{0}' non è un valore booleano valido.
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ja.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ja.xlf
index 2b87f6884fdb..2f9a5c77a259 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ja.xlf
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ja.xlf
@@ -830,31 +830,6 @@ The header is followed by the list of parameters and their errors (might be seve
このアクションを実行しますか[{0} (はい) |{1} (いいえ)] ですか?
-
- Created new section in 'dotnet.config' file
- 'dotnet.config' ファイルに新しいセクションを作成しました
- {Locked="dotnet.config"}
-
-
- Updating existing values in 'dotnet.config' is not yet supported. Please, manually update 'dotnet.config' to have '{0}' under section '{1}'.
- 'dotnet.config' の既存の値の更新はまだサポートされていません。セクション '{1}' の下に 'dotnet.config' を手動で更新して '{0}' を持つようにしてください。
- {Locked="dotnet.config"}
-
-
- Successfully created 'dotnet.config' file.
- 'dotnet.config' ファイルが正常に作成されました。
- {Locked="dotnet.config"}
-
-
- The required value in 'dotnet.config' is already set.
- 'dotnet.config' に必要な値はすでに設定されています。
- {Locked="dotnet.config"}
-
-
- Post action argument '{0}' is mandatory, but not configured.
- 事後アクション引数 '{0}' は必須ですが、構成されていません。
-
- Post action argument '{0}' is not a valid boolean value.事後アクションの引数 '{0}' は有効なブール値ではありません。
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ko.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ko.xlf
index be266386b4d8..11699454506d 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ko.xlf
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ko.xlf
@@ -830,31 +830,6 @@ The header is followed by the list of parameters and their errors (might be seve
이 작업을 실행하시겠어요 [{0} (예) |{1} (아니요)]?
-
- Created new section in 'dotnet.config' file
- 'dotnet.config' 파일에 새 섹션을 만들었습니다.
- {Locked="dotnet.config"}
-
-
- Updating existing values in 'dotnet.config' is not yet supported. Please, manually update 'dotnet.config' to have '{0}' under section '{1}'.
- 'dotnet.config'의 기존 값 업데이트는 아직 지원되지 않습니다. 'dotnet.config'를 수동으로 업데이트하여 '{0}' 섹션의 '{1}'을(를) 갖도록 하세요.
- {Locked="dotnet.config"}
-
-
- Successfully created 'dotnet.config' file.
- 'dotnet.config' 파일을 만들었습니다.
- {Locked="dotnet.config"}
-
-
- The required value in 'dotnet.config' is already set.
- 'dotnet.config'의 필수 값이 이미 설정되어 있습니다.
- {Locked="dotnet.config"}
-
-
- Post action argument '{0}' is mandatory, but not configured.
- '{0}' 게시물 매크로 함수 인수가 필수이지만 구성되지 않았습니다.
-
- Post action argument '{0}' is not a valid boolean value.사후 작업 인수 '{0}'은(는) 올바른 부울 값이 아닙니다.
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.pl.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.pl.xlf
index 18f4ee4817d9..6e5167124b31 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.pl.xlf
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.pl.xlf
@@ -830,31 +830,6 @@ The header is followed by the list of parameters and their errors (might be seve
Chcesz uruchomić tę akcję [{0}(tak)|{1}(nie)]?
-
- Created new section in 'dotnet.config' file
- Utworzono nową sekcję w pliku „dotnet.config”
- {Locked="dotnet.config"}
-
-
- Updating existing values in 'dotnet.config' is not yet supported. Please, manually update 'dotnet.config' to have '{0}' under section '{1}'.
- Aktualizowanie istniejących wartości w pliku „dotnet.config” nie jest jeszcze obsługiwane. Ręcznie zaktualizuj plik „dotnet.config”, aby miał element „{0}” w sekcji „{1}”.
- {Locked="dotnet.config"}
-
-
- Successfully created 'dotnet.config' file.
- Pomyślnie utworzono plik „dotnet.config”.
- {Locked="dotnet.config"}
-
-
- The required value in 'dotnet.config' is already set.
- Wymagana wartość w pliku „dotnet.config” jest już ustawiona.
- {Locked="dotnet.config"}
-
-
- Post action argument '{0}' is mandatory, but not configured.
- Argument po wystąpieniu akcji „{0}” jest obowiązkowy, ale nie jest skonfigurowany.
-
- Post action argument '{0}' is not a valid boolean value.Argument akcji „{0}” nie jest prawidłową wartością logiczną.
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.pt-BR.xlf
index 5691c61ba12e..24f89179cb85 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.pt-BR.xlf
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.pt-BR.xlf
@@ -830,31 +830,6 @@ The header is followed by the list of parameters and their errors (might be seve
Deseja executar esta ação [{0}(yes)|{1}(no)]?
-
- Created new section in 'dotnet.config' file
- Nova seção criada no arquivo "dotnet.config"
- {Locked="dotnet.config"}
-
-
- Updating existing values in 'dotnet.config' is not yet supported. Please, manually update 'dotnet.config' to have '{0}' under section '{1}'.
- Ainda não há suporte para a atualização de valores existentes em "dotnet.config". Atualize manualmente "dotnet.config" para ter "{0}" na seção "{1}".
- {Locked="dotnet.config"}
-
-
- Successfully created 'dotnet.config' file.
- Arquivo "dotnet.config" criado com sucesso.
- {Locked="dotnet.config"}
-
-
- The required value in 'dotnet.config' is already set.
- O valor necessário em "dotnet.config" já está definido.
- {Locked="dotnet.config"}
-
-
- Post action argument '{0}' is mandatory, but not configured.
- O argumento pós-ação '{0}' é obrigatório, mas não configurado.
-
- Post action argument '{0}' is not a valid boolean value.O argumento de pós-ação '{0}' não é um valor booleano válido.
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ru.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ru.xlf
index 1d9b5d4e94d3..6578a4d5bf14 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ru.xlf
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.ru.xlf
@@ -830,31 +830,6 @@ The header is followed by the list of parameters and their errors (might be seve
Вы хотите выполнить это действие [{0}(да)|{1}(нет)]?
-
- Created new section in 'dotnet.config' file
- Создан новый раздел в файле "dotnet.config"
- {Locked="dotnet.config"}
-
-
- Updating existing values in 'dotnet.config' is not yet supported. Please, manually update 'dotnet.config' to have '{0}' under section '{1}'.
- Изменение существующих значений в "dotnet.config" пока не поддерживается. Отредактируйте "dotnet.config" вручную, чтобы значение "{0}" находилось в разделе "{1}".
- {Locked="dotnet.config"}
-
-
- Successfully created 'dotnet.config' file.
- Файл "dotnet.config" успешно создан.
- {Locked="dotnet.config"}
-
-
- The required value in 'dotnet.config' is already set.
- Обязательное значение в "dotnet.config" уже установлено.
- {Locked="dotnet.config"}
-
-
- Post action argument '{0}' is mandatory, but not configured.
- Аргумент после действия "{0}" является обязательным, но не настроен.
-
- Post action argument '{0}' is not a valid boolean value.Аргумент после действия "{0}" не является допустимым логическим значением.
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.tr.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.tr.xlf
index 8cfbf1557c82..a0d71cff2b96 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.tr.xlf
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.tr.xlf
@@ -830,31 +830,6 @@ The header is followed by the list of parameters and their errors (might be seve
Bu eylemi çalıştırmak istiyor musunuz [{0}(evet)|{1}(hayır)]?
-
- Created new section in 'dotnet.config' file
- 'dotnet.config' dosyasında yeni bölüm oluşturuldu
- {Locked="dotnet.config"}
-
-
- Updating existing values in 'dotnet.config' is not yet supported. Please, manually update 'dotnet.config' to have '{0}' under section '{1}'.
- 'dotnet.config' içindeki mevcut değerleri güncelleştirmek henüz desteklenmemektedir. Lütfen 'dotnet.config' dosyasını manuel olarak güncelleştirmek suretiyle '{1}' bölümünün altına '{0}' ekleyin.
- {Locked="dotnet.config"}
-
-
- Successfully created 'dotnet.config' file.
- 'dotnet.config' dosyası başarıyla oluşturuldu.
- {Locked="dotnet.config"}
-
-
- The required value in 'dotnet.config' is already set.
- 'dotnet.config' dosyasında gerekli değer zaten ayarlanmıştır.
- {Locked="dotnet.config"}
-
-
- Post action argument '{0}' is mandatory, but not configured.
- '{0}' eylem sonrası bağımsız değişkeni zorunlu, ancak yapılandırılmamış.
-
- Post action argument '{0}' is not a valid boolean value.'{0}' eylem sonrası bağımsız değişkeni, geçerli bir boole değeri değil.
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.zh-Hans.xlf
index 249c25ff2b81..f75d8ad68dae 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.zh-Hans.xlf
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.zh-Hans.xlf
@@ -830,31 +830,6 @@ The header is followed by the list of parameters and their errors (might be seve
是否要运行此操作 [{0}(是)|{1}(否)]?
-
- Created new section in 'dotnet.config' file
- 已在 ‘dotnet.config’ 文件中创建新节
- {Locked="dotnet.config"}
-
-
- Updating existing values in 'dotnet.config' is not yet supported. Please, manually update 'dotnet.config' to have '{0}' under section '{1}'.
- 尚不支持更新 ‘dotnet.config’ 中的现有值。请在节 ‘{1}’ 下手动将 ‘dotnet.config’ 更新为具有 ‘{0}’。
- {Locked="dotnet.config"}
-
-
- Successfully created 'dotnet.config' file.
- 已成功创建 ‘dotnet.config’ 文件。
- {Locked="dotnet.config"}
-
-
- The required value in 'dotnet.config' is already set.
- 已设置 'dotnet.config' 中所需的值。
- {Locked="dotnet.config"}
-
-
- Post action argument '{0}' is mandatory, but not configured.
- 发布操作参数“{0}”是必需的,但未进行配置。
-
- Post action argument '{0}' is not a valid boolean value.Post 操作参数“{0}”不是有效的布尔值。
diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.zh-Hant.xlf
index eb6891d08e3d..56c64a9d9b91 100644
--- a/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.zh-Hant.xlf
+++ b/src/Cli/Microsoft.TemplateEngine.Cli/xlf/LocalizableStrings.zh-Hant.xlf
@@ -830,31 +830,6 @@ The header is followed by the list of parameters and their errors (might be seve
是否要執行此動作 [{0}(是)|{1}(否)]?
-
- Created new section in 'dotnet.config' file
- 在 'dotnet.config' 檔案中建立新區段
- {Locked="dotnet.config"}
-
-
- Updating existing values in 'dotnet.config' is not yet supported. Please, manually update 'dotnet.config' to have '{0}' under section '{1}'.
- 尚不支援更新 'dotnet.config' 中的現有值。請手動更新 'dotnet.config',以便在 '{1}' 區段下設定 '{0}'。
- {Locked="dotnet.config"}
-
-
- Successfully created 'dotnet.config' file.
- 已成功建立 'dotnet.config' 檔案。
- {Locked="dotnet.config"}
-
-
- The required value in 'dotnet.config' is already set.
- 'dotnet.config' 中所需的值已經設定。
- {Locked="dotnet.config"}
-
-
- Post action argument '{0}' is mandatory, but not configured.
- 動作後引數 '{0}' 是強制的,但未設定。
-
- Post action argument '{0}' is not a valid boolean value.Post 巨集指令引數 '{0}' 不是有效的布林值。
diff --git a/src/Cli/dotnet/Commands/CliCommandStrings.resx b/src/Cli/dotnet/Commands/CliCommandStrings.resx
index 4e095b9740a0..89db2642f5dc 100644
--- a/src/Cli/dotnet/Commands/CliCommandStrings.resx
+++ b/src/Cli/dotnet/Commands/CliCommandStrings.resx
@@ -117,9 +117,6 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- Aborted
-
{0} tests running
@@ -646,14 +643,13 @@ If not specified the file will be generated inside the default 'TestResults' dir
Test runner '{0}' is not supported.
- dotnet.config defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
+ global.json defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
The following test projects are using VSTest test runner:
{0}
See https://aka.ms/dotnet-test/mtp for more information.
- {0} is one or more project names.
-Microsoft.Testing.Platform is a name, don't translate.
-dotnet.config is a name don't translate.
+ {Locked="global.json"}{Locked="Microsoft.Testing.Platform"}
+{0} is one or more project names.Enables project lock file to be generated and used with restore.
@@ -2670,4 +2666,32 @@ Proceed?
Supported protocol versions sent by Microsoft.Testing.Platform are '{0}'. The SDK supports '{1}', which is incompatible.
+
+ The following exception occurred when running the test module with RunCommand '{0}' and RunArguments '{1}':
+
+{2}
+ {Locked="RunCommand"}{Locked="RunArguments"}
+{2} is the exception that occurred.
+
+
+ A test session end event was received without a corresponding test session start.
+
+
+ A test session start event was received without a corresponding test session end.
+
+
+ Aborted
+
+
+ An unexpected help-related message was received when `--help` wasn't used.
+
+
+ A new handshake '{0}' was received for the test application that doesn't match the previous handshake '{1}'.
+
+
+ A message of type '{0}' was received in help mode, which is not expected.
+
+
+ A message of type '{0}' was received before we got any handshakes, which is unexpected.
+
diff --git a/src/Cli/dotnet/Commands/Test/MTP/CustomEventArgs.cs b/src/Cli/dotnet/Commands/Test/MTP/CustomEventArgs.cs
deleted file mode 100644
index 731bf3557f76..000000000000
--- a/src/Cli/dotnet/Commands/Test/MTP/CustomEventArgs.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-#nullable disable
-
-namespace Microsoft.DotNet.Cli.Commands.Test;
-
-internal sealed class HelpEventArgs : EventArgs
-{
- public string ModulePath { get; set; }
-
- public CommandLineOption[] CommandLineOptions { get; set; }
-}
diff --git a/src/Cli/dotnet/Commands/Test/MTP/IPC/Models/HandshakeMessage.cs b/src/Cli/dotnet/Commands/Test/MTP/IPC/Models/HandshakeMessage.cs
index 00870e30c393..78331178da74 100644
--- a/src/Cli/dotnet/Commands/Test/MTP/IPC/Models/HandshakeMessage.cs
+++ b/src/Cli/dotnet/Commands/Test/MTP/IPC/Models/HandshakeMessage.cs
@@ -3,4 +3,4 @@
namespace Microsoft.DotNet.Cli.Commands.Test.IPC.Models;
-internal sealed record HandshakeMessage(Dictionary? Properties) : IRequest, IResponse;
+internal sealed record HandshakeMessage(Dictionary Properties) : IRequest, IResponse;
diff --git a/src/Cli/dotnet/Commands/Test/MTP/IPC/NamedPipeServer.cs b/src/Cli/dotnet/Commands/Test/MTP/IPC/NamedPipeServer.cs
index b06261dde858..ba9c04f6fe76 100644
--- a/src/Cli/dotnet/Commands/Test/MTP/IPC/NamedPipeServer.cs
+++ b/src/Cli/dotnet/Commands/Test/MTP/IPC/NamedPipeServer.cs
@@ -32,7 +32,15 @@ public NamedPipeServer(
CancellationToken cancellationToken,
bool skipUnknownMessages)
{
- _namedPipeServerStream = new(pipeName, PipeDirection.InOut, maxNumberOfServerInstances, PipeTransmissionMode.Byte, PipeOptions.Asynchronous | PipeOptions.CurrentUserOnly);
+ _namedPipeServerStream = new NamedPipeServerStream(
+ pipeName,
+ PipeDirection.InOut,
+ maxNumberOfServerInstances,
+ PipeTransmissionMode.Byte,
+ PipeOptions.Asynchronous | PipeOptions.CurrentUserOnly,
+ inBufferSize: 0,
+ outBufferSize: 0);
+
_callback = callback;
_cancellationToken = cancellationToken;
_skipUnknownMessages = skipUnknownMessages;
@@ -67,51 +75,69 @@ public async Task WaitConnectionAsync(CancellationToken cancellationToken)
///
private async Task InternalLoopAsync(CancellationToken cancellationToken)
{
- int currentMessageSize = 0;
- int missingBytesToReadOfWholeMessage = 0;
+ // This is an indicator when reading from the pipe whether we are at the start of a new message (i.e, we should read 4 bytes as message size)
+ // Note that the implementation assumes no overlapping messages in the pipe.
+ // The flow goes like:
+ // 1. MTP sends a request (and acquires lock).
+ // 2. SDK reads the request.
+ // 3. SDK sends a response.
+ // 4. MTP reads the response (and releases lock).
+ // This means that no two requests can be in the pipe at the same time.
+ bool isStartOfNewMessage = true;
+ int remainingBytesToReadOfWholeMessage = 0;
while (!cancellationToken.IsCancellationRequested)
{
- int missingBytesToReadOfCurrentChunk = 0;
- int currentReadIndex = 0;
- int currentReadBytes = await _namedPipeServerStream.ReadAsync(_readBuffer.AsMemory(currentReadIndex, _readBuffer.Length), cancellationToken);
- if (currentReadBytes == 0)
+ // If we are at the start of a new message, we need to read at least the message size.
+ int currentReadBytes = isStartOfNewMessage
+ ? await _namedPipeServerStream.ReadAtLeastAsync(_readBuffer, minimumBytes: sizeof(int), throwOnEndOfStream: false, cancellationToken)
+ : await _namedPipeServerStream.ReadAsync(_readBuffer, cancellationToken);
+
+ if (currentReadBytes == 0 || (isStartOfNewMessage && currentReadBytes < sizeof(int)))
{
// The client has disconnected
return;
}
- // Reset the current chunk size
- missingBytesToReadOfCurrentChunk = currentReadBytes;
+ // The local remainingBytesToProcess tracks the remaining bytes of what we have read from the pipe but not yet processed.
+ // At the beginning here, it contains everything we have read from the pipe.
+ // As we are processing the data in it, we continue to slice it.
+ Memory remainingBytesToProcess = _readBuffer.AsMemory(0, currentReadBytes);
- // If currentRequestSize is 0, we need to read the message size
- if (currentMessageSize == 0)
+ // If the current read is the start of a new message, we need to read the message size first.
+ if (isStartOfNewMessage)
{
// We need to read the message size, first 4 bytes
- if (currentReadBytes < sizeof(int))
- {
- throw new UnreachableException(CliCommandStrings.DotnetTestPipeIncompleteSize);
- }
+ remainingBytesToReadOfWholeMessage = BitConverter.ToInt32(remainingBytesToProcess.Span);
+
+ // Now that we have read the size, we slice the remainingBytesToProcess.
+ remainingBytesToProcess = remainingBytesToProcess.Slice(sizeof(int));
- currentMessageSize = BitConverter.ToInt32(_readBuffer, 0);
- missingBytesToReadOfCurrentChunk = currentReadBytes - sizeof(int);
- missingBytesToReadOfWholeMessage = currentMessageSize;
- currentReadIndex = sizeof(int);
+ // Now that we have read the size, we are no longer at the start of a new message.
+ // If the current chunk ended up to be the full message, we will set this back to true later.
+ isStartOfNewMessage = false;
}
- if (missingBytesToReadOfCurrentChunk > 0)
+ // We read the rest of the message.
+ // Note that this assumes that no messages are overlapping in the pipe.
+ if (remainingBytesToProcess.Length > 0)
{
// We need to read the rest of the message
- await _messageBuffer.WriteAsync(_readBuffer.AsMemory(currentReadIndex, missingBytesToReadOfCurrentChunk), cancellationToken);
- missingBytesToReadOfWholeMessage -= missingBytesToReadOfCurrentChunk;
+ await _messageBuffer.WriteAsync(remainingBytesToProcess, cancellationToken);
+ remainingBytesToReadOfWholeMessage -= remainingBytesToProcess.Length;
+
+ // At this point, we have read everything in the remainingBytesToProcess.
+ // Note that while remainingBytesToProcess isn't accessed after this point, we still maintain the
+ // invariant that it tracks what we have read from the pipe but not yet processed.
+ remainingBytesToProcess = Memory.Empty;
}
- if (missingBytesToReadOfWholeMessage < 0)
+ if (remainingBytesToReadOfWholeMessage < 0)
{
throw new UnreachableException(CliCommandStrings.DotnetTestPipeOverlapping);
}
// If we have read all the message, we can deserialize it
- if (missingBytesToReadOfWholeMessage == 0)
+ if (remainingBytesToReadOfWholeMessage == 0)
{
// Deserialize the message
_messageBuffer.Position = 0;
@@ -147,12 +173,19 @@ private async Task InternalLoopAsync(CancellationToken cancellationToken)
// Write the message size
byte[] bytes = _sizeOfIntArray;
- BitConverter.TryWriteBytes(bytes, sizeOfTheWholeMessage);
+ if (!BitConverter.TryWriteBytes(bytes, sizeOfTheWholeMessage))
+ {
+ throw new UnreachableException();
+ }
+
await _messageBuffer.WriteAsync(bytes, cancellationToken);
// Write the serializer id
bytes = _sizeOfIntArray;
- BitConverter.TryWriteBytes(bytes, responseNamedPipeSerializer.Id);
+ if (!BitConverter.TryWriteBytes(bytes, responseNamedPipeSerializer.Id))
+ {
+ throw new UnreachableException();
+ }
await _messageBuffer.WriteAsync(bytes.AsMemory(0, sizeof(int)), cancellationToken);
@@ -164,10 +197,6 @@ private async Task InternalLoopAsync(CancellationToken cancellationToken)
{
await _namedPipeServerStream.WriteAsync(_messageBuffer.GetBuffer().AsMemory(0, (int)_messageBuffer.Position), cancellationToken);
await _namedPipeServerStream.FlushAsync(cancellationToken);
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
- {
- _namedPipeServerStream.WaitForPipeDrain();
- }
}
finally
{
@@ -177,8 +206,8 @@ private async Task InternalLoopAsync(CancellationToken cancellationToken)
}
// Reset the control variables
- currentMessageSize = 0;
- missingBytesToReadOfWholeMessage = 0;
+ isStartOfNewMessage = true;
+ remainingBytesToReadOfWholeMessage = 0;
}
}
}
diff --git a/src/Cli/dotnet/Commands/Test/MTP/IPC/Serializers/HandshakeMessageSerializer.cs b/src/Cli/dotnet/Commands/Test/MTP/IPC/Serializers/HandshakeMessageSerializer.cs
index 933ed3dc301d..6ed6d352f2e5 100644
--- a/src/Cli/dotnet/Commands/Test/MTP/IPC/Serializers/HandshakeMessageSerializer.cs
+++ b/src/Cli/dotnet/Commands/Test/MTP/IPC/Serializers/HandshakeMessageSerializer.cs
@@ -1,8 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-#nullable disable
-
using System.Diagnostics;
using Microsoft.DotNet.Cli.Commands.Test.IPC.Models;
diff --git a/src/Cli/dotnet/Commands/Test/MTP/IPC/Serializers/UnknownMessageSerializer.cs b/src/Cli/dotnet/Commands/Test/MTP/IPC/Serializers/UnknownMessageSerializer.cs
index 3ebc6f1802be..f1e3331f333b 100644
--- a/src/Cli/dotnet/Commands/Test/MTP/IPC/Serializers/UnknownMessageSerializer.cs
+++ b/src/Cli/dotnet/Commands/Test/MTP/IPC/Serializers/UnknownMessageSerializer.cs
@@ -17,7 +17,5 @@ public object Deserialize(Stream _)
}
public void Serialize(object _, Stream stream)
- {
- WriteInt(stream, Id);
- }
+ => Environment.FailFast("SDK never serializes UnknownMessage. This should never be hit.");
}
diff --git a/src/Cli/dotnet/Commands/Test/MTP/MicrosoftTestingPlatformTestCommand.Help.cs b/src/Cli/dotnet/Commands/Test/MTP/MicrosoftTestingPlatformTestCommand.Help.cs
index ee551e4b6d47..b21ee35ff933 100644
--- a/src/Cli/dotnet/Commands/Test/MTP/MicrosoftTestingPlatformTestCommand.Help.cs
+++ b/src/Cli/dotnet/Commands/Test/MTP/MicrosoftTestingPlatformTestCommand.Help.cs
@@ -5,13 +5,14 @@
using System.Collections.Concurrent;
using System.CommandLine;
+using Microsoft.DotNet.Cli.Commands.Test.IPC.Models;
using Microsoft.TemplateEngine.Cli.Help;
namespace Microsoft.DotNet.Cli.Commands.Test;
internal partial class MicrosoftTestingPlatformTestCommand
{
- private readonly ConcurrentDictionary _commandLineOptionNameToModuleNames = [];
+ private readonly ConcurrentDictionary _commandLineOptionNameToModuleNames = [];
private readonly ConcurrentDictionary> _moduleNamesToCommandLineOptions = [];
private static readonly string Indent = " ";
@@ -29,9 +30,9 @@ public IEnumerable> CustomHelpLayout()
return;
}
- Dictionary> allOptions = GetAllOptions(context.Command.Options);
- allOptions.TryGetValue(true, out List builtInOptions);
- allOptions.TryGetValue(false, out List nonBuiltInOptions);
+ Dictionary> allOptions = GetAllOptions(context.Command.Options);
+ allOptions.TryGetValue(true, out List builtInOptions);
+ allOptions.TryGetValue(false, out List nonBuiltInOptions);
Dictionary> moduleToMissingOptions = GetModulesToMissingOptions(_moduleNamesToCommandLineOptions, builtInOptions.Select(option => option.Name), nonBuiltInOptions.Select(option => option.Name));
@@ -92,22 +93,14 @@ private static string FormatHelpOption(string option)
return $"[{option.Trim(':').ToLower()}]";
}
- private void OnHelpRequested(object sender, HelpEventArgs args)
+ private void OnHelpRequested(CommandLineOptionMessages commandLineOptionMessages)
{
- var testApp = (TestApplication)sender;
- if (!testApp.TestOptions.IsHelp)
- {
- // TODO: Better to throw exception?
- return;
- }
-
- CommandLineOption[] commandLineOptionMessages = args.CommandLineOptions;
- string moduleName = args.ModulePath;
+ string moduleName = commandLineOptionMessages.ModulePath;
List builtInOptions = [];
List nonBuiltInOptions = [];
- foreach (CommandLineOption commandLineOption in commandLineOptionMessages)
+ foreach (CommandLineOptionMessage commandLineOption in commandLineOptionMessages.CommandLineOptionMessageList)
{
if (commandLineOption.IsHidden.HasValue && commandLineOption.IsHidden.Value) continue;
@@ -135,19 +128,19 @@ private void OnHelpRequested(object sender, HelpEventArgs args)
(isBuiltIn, value) => [.. value, (moduleName, nonBuiltInOptions.ToArray())]);
}
- private Dictionary> GetAllOptions(IList
- dotnet.config defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
+ global.json defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
The following test projects are using VSTest test runner:
{0}
See https://aka.ms/dotnet-test/mtp for more information.
- Soubor dotnet.config definuje, že spouštěč testů bude Microsoft.Testing.Platform. Tento spouštěč testů musí používat všechny projekty.
+ Soubor dotnet.config definuje, že spouštěč testů bude Microsoft.Testing.Platform. Tento spouštěč testů musí používat všechny projekty.
Následující testovací projekty používají spouštěč testů VSTest:
{0}
Další informace najdete na https://aka.ms/dotnet-test/mtp.
- {0} is one or more project names.
-Microsoft.Testing.Platform is a name, don't translate.
-dotnet.config is a name don't translate.
+ {Locked="global.json"}{Locked="Microsoft.Testing.Platform"}
+{0} is one or more project names.Enables project lock file to be generated and used with restore.
@@ -1222,6 +1221,16 @@ Nastavte odlišné názvy profilů.
Duplicitní direktivy nejsou podporovány: {0} v {1}{0} is the directive type and name. {1} is the file path and line number.
+
+ The following exception occurred when running the test module with RunCommand '{0}' and RunArguments '{1}':
+
+{2}
+ The following exception occurred when running the test module with RunCommand '{0}' and RunArguments '{1}':
+
+{2}
+ {Locked="RunCommand"}{Locked="RunArguments"}
+{2} is the exception that occurred.
+ Restore failed. Run `dotnet restore` for more details on the issue.Obnovení neproběhlo úspěšně. Další podrobnosti o problému získáte spuštěním příkazu dotnet restore.
@@ -1709,11 +1718,21 @@ Nástroj {1} (verze {2}) se úspěšně nainstaloval. Do souboru manifestu {3} s
Minimální očekávané porušení zásad testů, spuštěné testy: {0}, očekávané minimum: {1}{0}, {1} number of tests
+
+ A new handshake '{0}' was received for the test application that doesn't match the previous handshake '{1}'.
+ A new handshake '{0}' was received for the test application that doesn't match the previous handshake '{1}'.
+
+ Missing name of '{0}' at {1}.Chybí název pro {0} v {1}.{0} is the directive name like 'package' or 'sdk', {1} is the file path and line number.
+
+ A test session start event was received without a corresponding test session end.
+ A test session start event was received without a corresponding test session end.
+
+ Run Microsoft Build Engine (MSBuild) commands.Spustí příkazy MSBuild (Microsoft Build Engine).
@@ -3533,6 +3552,26 @@ příkazu „dotnet tool list“.
{0} pokusnumber or tries of the current test assembly when test assembly is being retried. {0} is number that starts at 1
+
+ An unexpected help-related message was received when `--help` wasn't used.
+ An unexpected help-related message was received when `--help` wasn't used.
+
+
+
+ A message of type '{0}' was received in help mode, which is not expected.
+ A message of type '{0}' was received in help mode, which is not expected.
+
+
+
+ A message of type '{0}' was received before we got any handshakes, which is unexpected.
+ A message of type '{0}' was received before we got any handshakes, which is unexpected.
+
+
+
+ A test session end event was received without a corresponding test session start.
+ A test session end event was received without a corresponding test session start.
+
+ Tool '{0}' was successfully uninstalled and removed from manifest file {1}.Nástroj {0} se úspěšně odinstaloval a odebral ze souboru manifestu {1}.
diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf
index dafd56961336..75ca025c5998 100644
--- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf
+++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf
@@ -878,19 +878,18 @@ Das angegebene Verzeichnis wird erstellt, wenn es nicht vorhanden ist.
- dotnet.config defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
+ global.json defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
The following test projects are using VSTest test runner:
{0}
See https://aka.ms/dotnet-test/mtp for more information.
- dotnet.config definiert den Test Runner als Microsoft.Testing.Platform. Alle Projekte müssen diesen Test Runner verwenden.
+ dotnet.config definiert den Test Runner als Microsoft.Testing.Platform. Alle Projekte müssen diesen Test Runner verwenden.
Die folgenden Testprojekte verwenden den VSTest-Test Runner:
{0}
Weitere Informationen finden Sie unter https://aka.ms/dotnet-test/mtp.
- {0} is one or more project names.
-Microsoft.Testing.Platform is a name, don't translate.
-dotnet.config is a name don't translate.
+ {Locked="global.json"}{Locked="Microsoft.Testing.Platform"}
+{0} is one or more project names.Enables project lock file to be generated and used with restore.
@@ -1222,6 +1221,16 @@ Erstellen Sie eindeutige Profilnamen.
Doppelte Direktiven werden nicht unterstützt: {0} bei {1}.{0} is the directive type and name. {1} is the file path and line number.
+
+ The following exception occurred when running the test module with RunCommand '{0}' and RunArguments '{1}':
+
+{2}
+ The following exception occurred when running the test module with RunCommand '{0}' and RunArguments '{1}':
+
+{2}
+ {Locked="RunCommand"}{Locked="RunArguments"}
+{2} is the exception that occurred.
+ Restore failed. Run `dotnet restore` for more details on the issue.Fehler beim Wiederherstellen. Führen Sie "dotnet restore" aus, um weitere Informationen zum Problem zu erhalten.
@@ -1709,11 +1718,21 @@ Das Tool "{1}" (Version {2}) wurde erfolgreich installiert. Der Eintrag wird der
Mindestens erwartete Testrichtlinienverletzung, {0} Tests wurden ausgeführt, mindestens erwartet: {1}{0}, {1} number of tests
+
+ A new handshake '{0}' was received for the test application that doesn't match the previous handshake '{1}'.
+ A new handshake '{0}' was received for the test application that doesn't match the previous handshake '{1}'.
+
+ Missing name of '{0}' at {1}.Fehlender Name von "{0}" bei "{1}".{0} is the directive name like 'package' or 'sdk', {1} is the file path and line number.
+
+ A test session start event was received without a corresponding test session end.
+ A test session start event was received without a corresponding test session end.
+
+ Run Microsoft Build Engine (MSBuild) commands.Hiermit werden Befehle der Microsoft-Build-Engine (MSBuild) ausgeführt.
@@ -3533,6 +3552,26 @@ und die zugehörigen Paket-IDs für installierte Tools über den Befehl
{0} testennumber or tries of the current test assembly when test assembly is being retried. {0} is number that starts at 1
+
+ An unexpected help-related message was received when `--help` wasn't used.
+ An unexpected help-related message was received when `--help` wasn't used.
+
+
+
+ A message of type '{0}' was received in help mode, which is not expected.
+ A message of type '{0}' was received in help mode, which is not expected.
+
+
+
+ A message of type '{0}' was received before we got any handshakes, which is unexpected.
+ A message of type '{0}' was received before we got any handshakes, which is unexpected.
+
+
+
+ A test session end event was received without a corresponding test session start.
+ A test session end event was received without a corresponding test session start.
+
+ Tool '{0}' was successfully uninstalled and removed from manifest file {1}.Das Tool "{0}" wurde erfolgreich deinstalliert und aus der Manifestdatei "{1}" entfernt.
diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.es.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.es.xlf
index 455bb28f007f..154382e6f2c4 100644
--- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.es.xlf
+++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.es.xlf
@@ -878,19 +878,18 @@ Si no existe, se creará el directorio especificado.
- dotnet.config defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
+ global.json defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
The following test projects are using VSTest test runner:
{0}
See https://aka.ms/dotnet-test/mtp for more information.
- dotnet.config define que el ejecutor de pruebas sea Microsoft.Testing.Platform. Todos los proyectos deben usar ese ejecutor de pruebas.
+ dotnet.config define que el ejecutor de pruebas sea Microsoft.Testing.Platform. Todos los proyectos deben usar ese ejecutor de pruebas.
Los siguientes proyectos de prueba usan el ejecutor de pruebas de VSTest:
{0}
Consulte https://aka.ms/dotnet-test/mtp para obtener más información.
- {0} is one or more project names.
-Microsoft.Testing.Platform is a name, don't translate.
-dotnet.config is a name don't translate.
+ {Locked="global.json"}{Locked="Microsoft.Testing.Platform"}
+{0} is one or more project names.Enables project lock file to be generated and used with restore.
@@ -1222,6 +1221,16 @@ Defina nombres de perfiles distintos.
No se admiten directivas duplicadas: {0} en {1}{0} is the directive type and name. {1} is the file path and line number.
+
+ The following exception occurred when running the test module with RunCommand '{0}' and RunArguments '{1}':
+
+{2}
+ The following exception occurred when running the test module with RunCommand '{0}' and RunArguments '{1}':
+
+{2}
+ {Locked="RunCommand"}{Locked="RunArguments"}
+{2} is the exception that occurred.
+ Restore failed. Run `dotnet restore` for more details on the issue.Error en la restauración. Ejecute "dotnet restore" para obtener más detalles sobre el problema.
@@ -1709,11 +1718,21 @@ La herramienta "{1}" (versión "{2}") se instaló correctamente. Se ha agregado
Infracción de directiva de pruebas mínimas esperadas, pruebas ejecutadas {0}, mínimas esperadas {1}{0}, {1} number of tests
+
+ A new handshake '{0}' was received for the test application that doesn't match the previous handshake '{1}'.
+ A new handshake '{0}' was received for the test application that doesn't match the previous handshake '{1}'.
+
+ Missing name of '{0}' at {1}.Falta el nombre de "{0}" en {1}.{0} is the directive name like 'package' or 'sdk', {1} is the file path and line number.
+
+ A test session start event was received without a corresponding test session end.
+ A test session start event was received without a corresponding test session end.
+
+ Run Microsoft Build Engine (MSBuild) commands.Ejecuta comandos de Microsoft Build Engine (MSBuild).
@@ -3533,6 +3552,26 @@ y los identificadores de los paquetes correspondientes a las herramientas instal
intento {0}number or tries of the current test assembly when test assembly is being retried. {0} is number that starts at 1
+
+ An unexpected help-related message was received when `--help` wasn't used.
+ An unexpected help-related message was received when `--help` wasn't used.
+
+
+
+ A message of type '{0}' was received in help mode, which is not expected.
+ A message of type '{0}' was received in help mode, which is not expected.
+
+
+
+ A message of type '{0}' was received before we got any handshakes, which is unexpected.
+ A message of type '{0}' was received before we got any handshakes, which is unexpected.
+
+
+
+ A test session end event was received without a corresponding test session start.
+ A test session end event was received without a corresponding test session start.
+
+ Tool '{0}' was successfully uninstalled and removed from manifest file {1}.La herramienta "{0}" se desinstaló y quitó correctamente del archivo de manifiesto {1}.
diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.fr.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.fr.xlf
index e810a3e5d8e3..156885883b37 100644
--- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.fr.xlf
+++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.fr.xlf
@@ -878,19 +878,18 @@ Le répertoire spécifié est créé, s'il n'existe pas déjà.
- dotnet.config defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
+ global.json defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
The following test projects are using VSTest test runner:
{0}
See https://aka.ms/dotnet-test/mtp for more information.
- dotnet.config définit le test runner comme Microsoft.Testing.Platform. Tous les projets doivent utiliser ce test runner.
+ dotnet.config définit le test runner comme Microsoft.Testing.Platform. Tous les projets doivent utiliser ce test runner.
Les projets de test suivants utilisent le test runner VSTest :
{0}
Pour plus d’informations, consultez https://aka.ms/dotnet-test/mtp.
- {0} is one or more project names.
-Microsoft.Testing.Platform is a name, don't translate.
-dotnet.config is a name don't translate.
+ {Locked="global.json"}{Locked="Microsoft.Testing.Platform"}
+{0} is one or more project names.Enables project lock file to be generated and used with restore.
@@ -1222,6 +1221,16 @@ Faites en sorte que les noms de profil soient distincts.
Les directives dupliquées ne sont pas prises en charge : {0} au {1}{0} is the directive type and name. {1} is the file path and line number.
+
+ The following exception occurred when running the test module with RunCommand '{0}' and RunArguments '{1}':
+
+{2}
+ The following exception occurred when running the test module with RunCommand '{0}' and RunArguments '{1}':
+
+{2}
+ {Locked="RunCommand"}{Locked="RunArguments"}
+{2} is the exception that occurred.
+ Restore failed. Run `dotnet restore` for more details on the issue.Échec de la restauration. Exécutez « dotnet restore » pour plus de détails sur le problème.
@@ -1709,11 +1718,21 @@ L'outil '{1}' (version '{2}') a été correctement installé. L'entrée est ajou
Violation de stratégie de tests minimale attendue, tests exécutés {0}, minimum attendu {1}{0}, {1} number of tests
+
+ A new handshake '{0}' was received for the test application that doesn't match the previous handshake '{1}'.
+ A new handshake '{0}' was received for the test application that doesn't match the previous handshake '{1}'.
+
+ Missing name of '{0}' at {1}.Nom manquant pour « {0} » à {1}.{0} is the directive name like 'package' or 'sdk', {1} is the file path and line number.
+
+ A test session start event was received without a corresponding test session end.
+ A test session start event was received without a corresponding test session end.
+
+ Run Microsoft Build Engine (MSBuild) commands.Exécutez des commandes MSBuild (Microsoft Build Engine).
@@ -3533,6 +3552,26 @@ et les ID de package correspondants aux outils installés, utilisez la commande
essayer {0}number or tries of the current test assembly when test assembly is being retried. {0} is number that starts at 1
+
+ An unexpected help-related message was received when `--help` wasn't used.
+ An unexpected help-related message was received when `--help` wasn't used.
+
+
+
+ A message of type '{0}' was received in help mode, which is not expected.
+ A message of type '{0}' was received in help mode, which is not expected.
+
+
+
+ A message of type '{0}' was received before we got any handshakes, which is unexpected.
+ A message of type '{0}' was received before we got any handshakes, which is unexpected.
+
+
+
+ A test session end event was received without a corresponding test session start.
+ A test session end event was received without a corresponding test session start.
+
+ Tool '{0}' was successfully uninstalled and removed from manifest file {1}.L'outil '{0}' a été désinstallé et supprimé correctement du fichier manifeste {1}.
diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.it.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.it.xlf
index 3320521225dc..d7549423f0b5 100644
--- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.it.xlf
+++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.it.xlf
@@ -878,19 +878,18 @@ Se non esiste, la directory specificata verrà creata.
- dotnet.config defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
+ global.json defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
The following test projects are using VSTest test runner:
{0}
See https://aka.ms/dotnet-test/mtp for more information.
- dotnet.config definisce il Test Runner come Microsoft.Testing.Platform. Tutti i progetti devono usare tale Test Runner.
+ dotnet.config definisce il Test Runner come Microsoft.Testing.Platform. Tutti i progetti devono usare tale Test Runner.
I progetti di test seguenti usano il Test Runner VSTest:
{0}
Per altre informazioni, vedi https://aka.ms/dotnet-test/mtp.
- {0} is one or more project names.
-Microsoft.Testing.Platform is a name, don't translate.
-dotnet.config is a name don't translate.
+ {Locked="global.json"}{Locked="Microsoft.Testing.Platform"}
+{0} is one or more project names.Enables project lock file to be generated and used with restore.
@@ -1222,6 +1221,16 @@ Rendi distinti i nomi profilo.
Direttive duplicate non supportate: {0} in {1}{0} is the directive type and name. {1} is the file path and line number.
+
+ The following exception occurred when running the test module with RunCommand '{0}' and RunArguments '{1}':
+
+{2}
+ The following exception occurred when running the test module with RunCommand '{0}' and RunArguments '{1}':
+
+{2}
+ {Locked="RunCommand"}{Locked="RunArguments"}
+{2} is the exception that occurred.
+ Restore failed. Run `dotnet restore` for more details on the issue.Ripristino non riuscito. Esegui 'dotnet restore' per altri dettagli sul problema.
@@ -1709,11 +1718,21 @@ Lo strumento '{1}' versione '{2}' è stato installato. La voce è stata aggiunta
Violazione minima dei criteri di test previsti, test eseguiti {0}, minimo previsto {1}{0}, {1} number of tests
+
+ A new handshake '{0}' was received for the test application that doesn't match the previous handshake '{1}'.
+ A new handshake '{0}' was received for the test application that doesn't match the previous handshake '{1}'.
+
+ Missing name of '{0}' at {1}.Nome mancante di '{0}' in {1}.{0} is the directive name like 'package' or 'sdk', {1} is the file path and line number.
+
+ A test session start event was received without a corresponding test session end.
+ A test session start event was received without a corresponding test session end.
+
+ Run Microsoft Build Engine (MSBuild) commands.Esegue i comandi di Microsoft Build Engine (MSBuild).
@@ -3533,6 +3552,26 @@ e gli ID pacchetto corrispondenti per gli strumenti installati usando il comando
prova {0}number or tries of the current test assembly when test assembly is being retried. {0} is number that starts at 1
+
+ An unexpected help-related message was received when `--help` wasn't used.
+ An unexpected help-related message was received when `--help` wasn't used.
+
+
+
+ A message of type '{0}' was received in help mode, which is not expected.
+ A message of type '{0}' was received in help mode, which is not expected.
+
+
+
+ A message of type '{0}' was received before we got any handshakes, which is unexpected.
+ A message of type '{0}' was received before we got any handshakes, which is unexpected.
+
+
+
+ A test session end event was received without a corresponding test session start.
+ A test session end event was received without a corresponding test session start.
+
+ Tool '{0}' was successfully uninstalled and removed from manifest file {1}.Lo strumento '{0}' è stato disinstallato e rimosso dal file manifesto {1}.
diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ja.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ja.xlf
index 785f269a9d5c..d094b276f162 100644
--- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ja.xlf
+++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ja.xlf
@@ -878,19 +878,18 @@ The specified directory will be created if it does not exist.
- dotnet.config defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
+ global.json defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
The following test projects are using VSTest test runner:
{0}
See https://aka.ms/dotnet-test/mtp for more information.
- dotnet.config では、テスト ランナーを Microsoft.Testing.Platform と定義します。すべてのプロジェクトで、そのテスト ランナーを使用する必要があります。
+ dotnet.config では、テスト ランナーを Microsoft.Testing.Platform と定義します。すべてのプロジェクトで、そのテスト ランナーを使用する必要があります。
次のテスト プロジェクトでは、VSTest テスト ランナーを使用しています:
{0}
詳細については、https://aka.ms/dotnet-test/mtp を参照してください。
- {0} is one or more project names.
-Microsoft.Testing.Platform is a name, don't translate.
-dotnet.config is a name don't translate.
+ {Locked="global.json"}{Locked="Microsoft.Testing.Platform"}
+{0} is one or more project names.Enables project lock file to be generated and used with restore.
@@ -1222,6 +1221,16 @@ Make the profile names distinct.
重複するディレクティブはサポートされていません: {1} の {0}{0} is the directive type and name. {1} is the file path and line number.
+
+ The following exception occurred when running the test module with RunCommand '{0}' and RunArguments '{1}':
+
+{2}
+ The following exception occurred when running the test module with RunCommand '{0}' and RunArguments '{1}':
+
+{2}
+ {Locked="RunCommand"}{Locked="RunArguments"}
+{2} is the exception that occurred.
+ Restore failed. Run `dotnet restore` for more details on the issue.復元に失敗しました。問題の詳細については、'dotnet restore' を実行してください。
@@ -1709,11 +1718,21 @@ Tool '{1}' (version '{2}') was successfully installed. Entry is added to the man
予想されるテストの最小ポリシー違反、テストの実行数 {0} 件、予想される最小数 {1} 件{0}, {1} number of tests
+
+ A new handshake '{0}' was received for the test application that doesn't match the previous handshake '{1}'.
+ A new handshake '{0}' was received for the test application that doesn't match the previous handshake '{1}'.
+
+ Missing name of '{0}' at {1}.{1} に ' {0}' の名前がありません。{0} is the directive name like 'package' or 'sdk', {1} is the file path and line number.
+
+ A test session start event was received without a corresponding test session end.
+ A test session start event was received without a corresponding test session end.
+
+ Run Microsoft Build Engine (MSBuild) commands.Microsoft Build Engine (MSBuild) コマンドを実行します。
@@ -3533,6 +3552,26 @@ and the corresponding package Ids for installed tools using the command
{0} を試すnumber or tries of the current test assembly when test assembly is being retried. {0} is number that starts at 1
+
+ An unexpected help-related message was received when `--help` wasn't used.
+ An unexpected help-related message was received when `--help` wasn't used.
+
+
+
+ A message of type '{0}' was received in help mode, which is not expected.
+ A message of type '{0}' was received in help mode, which is not expected.
+
+
+
+ A message of type '{0}' was received before we got any handshakes, which is unexpected.
+ A message of type '{0}' was received before we got any handshakes, which is unexpected.
+
+
+
+ A test session end event was received without a corresponding test session start.
+ A test session end event was received without a corresponding test session start.
+
+ Tool '{0}' was successfully uninstalled and removed from manifest file {1}.ツール '{0}' が正常にアンインストールされ、マニフェスト ファイル {1} から削除されました。
diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ko.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ko.xlf
index 3de05efa36e9..95ef8761b36e 100644
--- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ko.xlf
+++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ko.xlf
@@ -878,19 +878,18 @@ The specified directory will be created if it does not exist.
- dotnet.config defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
+ global.json defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
The following test projects are using VSTest test runner:
{0}
See https://aka.ms/dotnet-test/mtp for more information.
- dotnet.config는 Test Runner를 Microsoft.Testing.Platform으로 정의합니다. 모든 프로젝트는 해당 Test Runner를 사용해야 합니다.
+ dotnet.config는 Test Runner를 Microsoft.Testing.Platform으로 정의합니다. 모든 프로젝트는 해당 Test Runner를 사용해야 합니다.
다음 테스트 프로젝트에서 VSTest Test Runner를 사용하고 있습니다.
{0}
자세한 내용은 https://aka.ms/dotnet-test/mtp를 참조하세요.
- {0} is one or more project names.
-Microsoft.Testing.Platform is a name, don't translate.
-dotnet.config is a name don't translate.
+ {Locked="global.json"}{Locked="Microsoft.Testing.Platform"}
+{0} is one or more project names.Enables project lock file to be generated and used with restore.
@@ -1222,6 +1221,16 @@ Make the profile names distinct.
중복된 지시문은 지원되지 않습니다. {1}의 {0}.{0} is the directive type and name. {1} is the file path and line number.
+
+ The following exception occurred when running the test module with RunCommand '{0}' and RunArguments '{1}':
+
+{2}
+ The following exception occurred when running the test module with RunCommand '{0}' and RunArguments '{1}':
+
+{2}
+ {Locked="RunCommand"}{Locked="RunArguments"}
+{2} is the exception that occurred.
+ Restore failed. Run `dotnet restore` for more details on the issue.복원하지 못했습니다. 문제에 대한 자세한 내용을 보려면 'dotnet restore'를 실행하세요.
@@ -1709,11 +1718,21 @@ Tool '{1}' (version '{2}') was successfully installed. Entry is added to the man
예상되는 최소 테스트 정책 위반, 테스트 실행 {0}, 필요한 최소 {1}{0}, {1} number of tests
+
+ A new handshake '{0}' was received for the test application that doesn't match the previous handshake '{1}'.
+ A new handshake '{0}' was received for the test application that doesn't match the previous handshake '{1}'.
+
+ Missing name of '{0}' at {1}.{1}에 ' {0}'의 이름이 없습니다.{0} is the directive name like 'package' or 'sdk', {1} is the file path and line number.
+
+ A test session start event was received without a corresponding test session end.
+ A test session start event was received without a corresponding test session end.
+
+ Run Microsoft Build Engine (MSBuild) commands.Microsoft Build Engine(MSBuild) 명령을 실행합니다.
@@ -3533,6 +3552,26 @@ and the corresponding package Ids for installed tools using the command
{0} 시도number or tries of the current test assembly when test assembly is being retried. {0} is number that starts at 1
+
+ An unexpected help-related message was received when `--help` wasn't used.
+ An unexpected help-related message was received when `--help` wasn't used.
+
+
+
+ A message of type '{0}' was received in help mode, which is not expected.
+ A message of type '{0}' was received in help mode, which is not expected.
+
+
+
+ A message of type '{0}' was received before we got any handshakes, which is unexpected.
+ A message of type '{0}' was received before we got any handshakes, which is unexpected.
+
+
+
+ A test session end event was received without a corresponding test session start.
+ A test session end event was received without a corresponding test session start.
+
+ Tool '{0}' was successfully uninstalled and removed from manifest file {1}.'{0}' 도구가 제거되었으며 매니페스트 파일 {1}에서 제거되었습니다.
diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pl.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pl.xlf
index 963dbe0c2840..53cf20778d85 100644
--- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pl.xlf
+++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pl.xlf
@@ -878,19 +878,18 @@ Jeśli określony katalog nie istnieje, zostanie utworzony.
- dotnet.config defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
+ global.json defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
The following test projects are using VSTest test runner:
{0}
See https://aka.ms/dotnet-test/mtp for more information.
- Plik dotnet.config definiuje moduł uruchamiający testy jako Microsoft.Testing.Platform. Wszystkie projekty muszą używać tego modułu uruchamiającego testy.
+ Plik dotnet.config definiuje moduł uruchamiający testy jako Microsoft.Testing.Platform. Wszystkie projekty muszą używać tego modułu uruchamiającego testy.
Następujące projekty testowe używają modułu uruchamiającego testy VSTest:
{0}
Aby uzyskać więcej informacji, zobacz https://aka.ms/dotnet-test/mtp.
- {0} is one or more project names.
-Microsoft.Testing.Platform is a name, don't translate.
-dotnet.config is a name don't translate.
+ {Locked="global.json"}{Locked="Microsoft.Testing.Platform"}
+{0} is one or more project names.Enables project lock file to be generated and used with restore.
@@ -1222,6 +1221,16 @@ Rozróżnij nazwy profilów.
Zduplikowane dyrektywy nie są obsługiwane: {0} w lokalizacji {1}{0} is the directive type and name. {1} is the file path and line number.
+
+ The following exception occurred when running the test module with RunCommand '{0}' and RunArguments '{1}':
+
+{2}
+ The following exception occurred when running the test module with RunCommand '{0}' and RunArguments '{1}':
+
+{2}
+ {Locked="RunCommand"}{Locked="RunArguments"}
+{2} is the exception that occurred.
+ Restore failed. Run `dotnet restore` for more details on the issue.Błąd przywracania. Uruchom polecenie `dotnet restore`, aby uzyskać więcej informacji na temat problemu.
@@ -1709,11 +1718,21 @@ Narzędzie „{1}” (wersja „{2}”) zostało pomyślnie zainstalowane. Wpis
Minimalne oczekiwane naruszenie zasad testów, uruchomione testy: {0}, oczekiwane minimum: {1}{0}, {1} number of tests
+
+ A new handshake '{0}' was received for the test application that doesn't match the previous handshake '{1}'.
+ A new handshake '{0}' was received for the test application that doesn't match the previous handshake '{1}'.
+
+ Missing name of '{0}' at {1}.Brak nazwy „{0}” w {1}.{0} is the directive name like 'package' or 'sdk', {1} is the file path and line number.
+
+ A test session start event was received without a corresponding test session end.
+ A test session start event was received without a corresponding test session end.
+
+ Run Microsoft Build Engine (MSBuild) commands.Uruchom polecenia aparatu Microsoft Build Engine (MSBuild).
@@ -3533,6 +3552,26 @@ i odpowiednie identyfikatory pakietów zainstalowanych narzędzi można znaleź
wypróbuj {0}number or tries of the current test assembly when test assembly is being retried. {0} is number that starts at 1
+
+ An unexpected help-related message was received when `--help` wasn't used.
+ An unexpected help-related message was received when `--help` wasn't used.
+
+
+
+ A message of type '{0}' was received in help mode, which is not expected.
+ A message of type '{0}' was received in help mode, which is not expected.
+
+
+
+ A message of type '{0}' was received before we got any handshakes, which is unexpected.
+ A message of type '{0}' was received before we got any handshakes, which is unexpected.
+
+
+
+ A test session end event was received without a corresponding test session start.
+ A test session end event was received without a corresponding test session start.
+
+ Tool '{0}' was successfully uninstalled and removed from manifest file {1}.Narzędzie „{0}” zostało pomyślnie odinstalowane i usunięte z pliku manifestu {1}.
diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pt-BR.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pt-BR.xlf
index e59dc11689e3..62303c0c2a4a 100644
--- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pt-BR.xlf
+++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pt-BR.xlf
@@ -878,19 +878,18 @@ O diretório especificado será criado se ele ainda não existir.
- dotnet.config defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
+ global.json defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
The following test projects are using VSTest test runner:
{0}
See https://aka.ms/dotnet-test/mtp for more information.
- dotnet.config define o executor de teste como Microsoft.Testing.Platform. Todos os projetos devem usar esse executor de teste.
+ dotnet.config define o executor de teste como Microsoft.Testing.Platform. Todos os projetos devem usar esse executor de teste.
Os seguintes projetos de teste estão usando o executor de teste do VSTest:
{0}
Consulte https://aka.ms/dotnet-test/mtp para obter mais informações.
- {0} is one or more project names.
-Microsoft.Testing.Platform is a name, don't translate.
-dotnet.config is a name don't translate.
+ {Locked="global.json"}{Locked="Microsoft.Testing.Platform"}
+{0} is one or more project names.Enables project lock file to be generated and used with restore.
@@ -1222,6 +1221,16 @@ Diferencie os nomes dos perfis.
Não há suporte para diretivas duplicadas: {0} em {1}{0} is the directive type and name. {1} is the file path and line number.
+
+ The following exception occurred when running the test module with RunCommand '{0}' and RunArguments '{1}':
+
+{2}
+ The following exception occurred when running the test module with RunCommand '{0}' and RunArguments '{1}':
+
+{2}
+ {Locked="RunCommand"}{Locked="RunArguments"}
+{2} is the exception that occurred.
+ Restore failed. Run `dotnet restore` for more details on the issue.Falha na restauração. Execute "dotnet restore" para obter mais detalhes sobre o problema.
@@ -1709,11 +1718,21 @@ A ferramenta '{1}' (versão '{2}') foi instalada com êxito. A entrada foi adici
Violação de política de testes mínimos esperados, {0} testes executados, mínimo esperado {1}{0}, {1} number of tests
+
+ A new handshake '{0}' was received for the test application that doesn't match the previous handshake '{1}'.
+ A new handshake '{0}' was received for the test application that doesn't match the previous handshake '{1}'.
+
+ Missing name of '{0}' at {1}.Nome de "{0}" ausente em {1}.{0} is the directive name like 'package' or 'sdk', {1} is the file path and line number.
+
+ A test session start event was received without a corresponding test session end.
+ A test session start event was received without a corresponding test session end.
+
+ Run Microsoft Build Engine (MSBuild) commands.Executar comandos do MSBuild (Microsoft Build Engine).
@@ -3533,6 +3552,26 @@ e as Ids de pacote correspondentes para as ferramentas instaladas usando o coman
experimente {0}number or tries of the current test assembly when test assembly is being retried. {0} is number that starts at 1
+
+ An unexpected help-related message was received when `--help` wasn't used.
+ An unexpected help-related message was received when `--help` wasn't used.
+
+
+
+ A message of type '{0}' was received in help mode, which is not expected.
+ A message of type '{0}' was received in help mode, which is not expected.
+
+
+
+ A message of type '{0}' was received before we got any handshakes, which is unexpected.
+ A message of type '{0}' was received before we got any handshakes, which is unexpected.
+
+
+
+ A test session end event was received without a corresponding test session start.
+ A test session end event was received without a corresponding test session start.
+
+ Tool '{0}' was successfully uninstalled and removed from manifest file {1}.A ferramenta '{0}' foi desinstalada com êxito e removida do arquivo de manifesto {1}.
diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ru.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ru.xlf
index 668afca46954..df5dbc990adc 100644
--- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ru.xlf
+++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ru.xlf
@@ -878,19 +878,18 @@ The specified directory will be created if it does not exist.
- dotnet.config defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
+ global.json defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
The following test projects are using VSTest test runner:
{0}
See https://aka.ms/dotnet-test/mtp for more information.
- В dotnet.config в качестве средства выполнения тестов указана Microsoft.Testing.Platform. Все проекты должны использовать это средство выполнения тестов.
+ В dotnet.config в качестве средства выполнения тестов указана Microsoft.Testing.Platform. Все проекты должны использовать это средство выполнения тестов.
Следующие тестовые проекты используют средство выполнения тестов VSTest:
{0}
Подробнее см. https://aka.ms/dotnet-test/mtp.
- {0} is one or more project names.
-Microsoft.Testing.Platform is a name, don't translate.
-dotnet.config is a name don't translate.
+ {Locked="global.json"}{Locked="Microsoft.Testing.Platform"}
+{0} is one or more project names.Enables project lock file to be generated and used with restore.
@@ -1222,6 +1221,16 @@ Make the profile names distinct.
Повторяющиеся директивы не поддерживаются: {0} (файл, строка: {1}){0} is the directive type and name. {1} is the file path and line number.
+
+ The following exception occurred when running the test module with RunCommand '{0}' and RunArguments '{1}':
+
+{2}
+ The following exception occurred when running the test module with RunCommand '{0}' and RunArguments '{1}':
+
+{2}
+ {Locked="RunCommand"}{Locked="RunArguments"}
+{2} is the exception that occurred.
+ Restore failed. Run `dotnet restore` for more details on the issue.Провести восстановление не удалось. Для получения дополнительных сведений о проблеме выполните команду "dotnet restore".
@@ -1709,11 +1718,21 @@ Tool '{1}' (version '{2}') was successfully installed. Entry is added to the man
Нарушение политики минимального ожидаемого числа тестов. Выполнено тестов: {0}, ожидаемый минимум: {1}{0}, {1} number of tests
+
+ A new handshake '{0}' was received for the test application that doesn't match the previous handshake '{1}'.
+ A new handshake '{0}' was received for the test application that doesn't match the previous handshake '{1}'.
+
+ Missing name of '{0}' at {1}.В {1} отсутствует имя "{0}".{0} is the directive name like 'package' or 'sdk', {1} is the file path and line number.
+
+ A test session start event was received without a corresponding test session end.
+ A test session start event was received without a corresponding test session end.
+
+ Run Microsoft Build Engine (MSBuild) commands.Выполнение команд Microsoft Build Engine (MSBuild).
@@ -3534,6 +3553,26 @@ and the corresponding package Ids for installed tools using the command
попробуйте {0}number or tries of the current test assembly when test assembly is being retried. {0} is number that starts at 1
+
+ An unexpected help-related message was received when `--help` wasn't used.
+ An unexpected help-related message was received when `--help` wasn't used.
+
+
+
+ A message of type '{0}' was received in help mode, which is not expected.
+ A message of type '{0}' was received in help mode, which is not expected.
+
+
+
+ A message of type '{0}' was received before we got any handshakes, which is unexpected.
+ A message of type '{0}' was received before we got any handshakes, which is unexpected.
+
+
+
+ A test session end event was received without a corresponding test session start.
+ A test session end event was received without a corresponding test session start.
+
+ Tool '{0}' was successfully uninstalled and removed from manifest file {1}.Средство "{0}" успешно удалено и исключено из файла манифеста {1}.
diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.tr.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.tr.xlf
index 4a06330a482b..fc394893faf0 100644
--- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.tr.xlf
+++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.tr.xlf
@@ -878,19 +878,18 @@ Belirtilen dizin yoksa oluşturulur.
- dotnet.config defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
+ global.json defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
The following test projects are using VSTest test runner:
{0}
See https://aka.ms/dotnet-test/mtp for more information.
- dotnet.config, test çalıştırıcısını Microsoft.Testing.Platform olarak tanımlar. Tüm projelerin bu test çalıştırıcısını kullanması gereklidir.
+ dotnet.config, test çalıştırıcısını Microsoft.Testing.Platform olarak tanımlar. Tüm projelerin bu test çalıştırıcısını kullanması gereklidir.
Aşağıdaki test projeleri VSTest test çalıştırıcısını kullanıyor:
{0}
Daha fazla bilgi için https://aka.ms/dotnet-test/mtp adresine bakın.
- {0} is one or more project names.
-Microsoft.Testing.Platform is a name, don't translate.
-dotnet.config is a name don't translate.
+ {Locked="global.json"}{Locked="Microsoft.Testing.Platform"}
+{0} is one or more project names.Enables project lock file to be generated and used with restore.
@@ -1222,6 +1221,16 @@ Lütfen profil adlarını değiştirin.
Yinelenen yönergeler desteklenmez: {1} konumunda {0}{0} is the directive type and name. {1} is the file path and line number.
+
+ The following exception occurred when running the test module with RunCommand '{0}' and RunArguments '{1}':
+
+{2}
+ The following exception occurred when running the test module with RunCommand '{0}' and RunArguments '{1}':
+
+{2}
+ {Locked="RunCommand"}{Locked="RunArguments"}
+{2} is the exception that occurred.
+ Restore failed. Run `dotnet restore` for more details on the issue.Geri yükleme başarısız oldu. Sorunla ilgili daha fazla bilgi için 'dotnet restore' çalıştırın.
@@ -1709,11 +1718,21 @@ Tool '{1}' (version '{2}') was successfully installed. Entry is added to the man
Beklenen minimum test ilke ihlali, yürütülen test: {0}, beklenen minimum test: {1}{0}, {1} number of tests
+
+ A new handshake '{0}' was received for the test application that doesn't match the previous handshake '{1}'.
+ A new handshake '{0}' was received for the test application that doesn't match the previous handshake '{1}'.
+
+ Missing name of '{0}' at {1}.{1} konumunda '{0}' paketinin adı eksik.{0} is the directive name like 'package' or 'sdk', {1} is the file path and line number.
+
+ A test session start event was received without a corresponding test session end.
+ A test session start event was received without a corresponding test session end.
+
+ Run Microsoft Build Engine (MSBuild) commands.Microsoft Build Engine (MSBuild) komutlarını çalıştırır.
@@ -3533,6 +3552,26 @@ karşılık gelen paket kimliklerini bulmak için
Şunu deneyin: {0}number or tries of the current test assembly when test assembly is being retried. {0} is number that starts at 1
+
+ An unexpected help-related message was received when `--help` wasn't used.
+ An unexpected help-related message was received when `--help` wasn't used.
+
+
+
+ A message of type '{0}' was received in help mode, which is not expected.
+ A message of type '{0}' was received in help mode, which is not expected.
+
+
+
+ A message of type '{0}' was received before we got any handshakes, which is unexpected.
+ A message of type '{0}' was received before we got any handshakes, which is unexpected.
+
+
+
+ A test session end event was received without a corresponding test session start.
+ A test session end event was received without a corresponding test session start.
+
+ Tool '{0}' was successfully uninstalled and removed from manifest file {1}.'{0}' aracı başarıyla kaldırıldı ve {1} bildirim dosyasından çıkarıldı.
diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hans.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hans.xlf
index 6fa923ff04b1..b4d09ae2961f 100644
--- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hans.xlf
+++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hans.xlf
@@ -878,19 +878,18 @@ The specified directory will be created if it does not exist.
- dotnet.config defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
+ global.json defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
The following test projects are using VSTest test runner:
{0}
See https://aka.ms/dotnet-test/mtp for more information.
- dotnet.config 将测试运行器定义为 Microsoft.Testing.Platform。所有项目必须使用该测试运行器。
+ dotnet.config 将测试运行器定义为 Microsoft.Testing.Platform。所有项目必须使用该测试运行器。
以下测试项目正在使用 VSTest 测试运行器:
{0}
有关详细信息,请参阅 https://aka.ms/dotnet-test/mtp。
- {0} is one or more project names.
-Microsoft.Testing.Platform is a name, don't translate.
-dotnet.config is a name don't translate.
+ {Locked="global.json"}{Locked="Microsoft.Testing.Platform"}
+{0} is one or more project names.Enables project lock file to be generated and used with restore.
@@ -1222,6 +1221,16 @@ Make the profile names distinct.
不支持重复指令: {1} 处的 {0}{0} is the directive type and name. {1} is the file path and line number.
+
+ The following exception occurred when running the test module with RunCommand '{0}' and RunArguments '{1}':
+
+{2}
+ The following exception occurred when running the test module with RunCommand '{0}' and RunArguments '{1}':
+
+{2}
+ {Locked="RunCommand"}{Locked="RunArguments"}
+{2} is the exception that occurred.
+ Restore failed. Run `dotnet restore` for more details on the issue.还原失败。运行 `dotnet restore` 以了解有关问题的更多详细信息。
@@ -1709,11 +1718,21 @@ Tool '{1}' (version '{2}') was successfully installed. Entry is added to the man
最低预期测试策略冲突,测试已运行 {0} 次,最低预期 {1} 次{0}, {1} number of tests
+
+ A new handshake '{0}' was received for the test application that doesn't match the previous handshake '{1}'.
+ A new handshake '{0}' was received for the test application that doesn't match the previous handshake '{1}'.
+
+ Missing name of '{0}' at {1}.缺少 {1} 处 ‘{0}’ 的名称。{0} is the directive name like 'package' or 'sdk', {1} is the file path and line number.
+
+ A test session start event was received without a corresponding test session end.
+ A test session start event was received without a corresponding test session end.
+
+ Run Microsoft Build Engine (MSBuild) commands.运行 Microsoft 生成引擎(MSBuild)命令。
@@ -3533,6 +3552,26 @@ and the corresponding package Ids for installed tools using the command
尝试 {0}number or tries of the current test assembly when test assembly is being retried. {0} is number that starts at 1
+
+ An unexpected help-related message was received when `--help` wasn't used.
+ An unexpected help-related message was received when `--help` wasn't used.
+
+
+
+ A message of type '{0}' was received in help mode, which is not expected.
+ A message of type '{0}' was received in help mode, which is not expected.
+
+
+
+ A message of type '{0}' was received before we got any handshakes, which is unexpected.
+ A message of type '{0}' was received before we got any handshakes, which is unexpected.
+
+
+
+ A test session end event was received without a corresponding test session start.
+ A test session end event was received without a corresponding test session start.
+
+ Tool '{0}' was successfully uninstalled and removed from manifest file {1}.工具“{0}”已成功卸载并从清单文件 {1} 中移除。
diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hant.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hant.xlf
index 6511ea356648..2948d58d14aa 100644
--- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hant.xlf
+++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hant.xlf
@@ -878,19 +878,18 @@ The specified directory will be created if it does not exist.
- dotnet.config defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
+ global.json defines test runner to be Microsoft.Testing.Platform. All projects must use that test runner.
The following test projects are using VSTest test runner:
{0}
See https://aka.ms/dotnet-test/mtp for more information.
- dotnet.config 定義測試執行器為 Microsoft.Testing.Platform。所有專案必須使用該測試執行器。
+ dotnet.config 定義測試執行器為 Microsoft.Testing.Platform。所有專案必須使用該測試執行器。
以下測試專案正在使用 VSTest 測試執行器:
{0}
如需詳細資訊,請參閱 https://aka.ms/dotnet-test/mtp。
- {0} is one or more project names.
-Microsoft.Testing.Platform is a name, don't translate.
-dotnet.config is a name don't translate.
+ {Locked="global.json"}{Locked="Microsoft.Testing.Platform"}
+{0} is one or more project names.Enables project lock file to be generated and used with restore.
@@ -1222,6 +1221,16 @@ Make the profile names distinct.
不支援重複的指示詞: {0} 位於 {1}{0} is the directive type and name. {1} is the file path and line number.
+
+ The following exception occurred when running the test module with RunCommand '{0}' and RunArguments '{1}':
+
+{2}
+ The following exception occurred when running the test module with RunCommand '{0}' and RunArguments '{1}':
+
+{2}
+ {Locked="RunCommand"}{Locked="RunArguments"}
+{2} is the exception that occurred.
+ Restore failed. Run `dotnet restore` for more details on the issue.還原失敗。如需問題的詳細資料,請執行 'dotnet restore'。
@@ -1709,11 +1718,21 @@ Tool '{1}' (version '{2}') was successfully installed. Entry is added to the man
預期測試原則違反的最小值,{0} 個執行的測試,預期的最小值為 {1}{0}, {1} number of tests
+
+ A new handshake '{0}' was received for the test application that doesn't match the previous handshake '{1}'.
+ A new handshake '{0}' was received for the test application that doesn't match the previous handshake '{1}'.
+
+ Missing name of '{0}' at {1}.缺少位於 {1} 的 '{0}' 名稱。{0} is the directive name like 'package' or 'sdk', {1} is the file path and line number.
+
+ A test session start event was received without a corresponding test session end.
+ A test session start event was received without a corresponding test session end.
+
+ Run Microsoft Build Engine (MSBuild) commands.執行 Microsoft Build Engine (MSBuild) 命令。
@@ -3533,6 +3552,26 @@ and the corresponding package Ids for installed tools using the command
嘗試 {0}number or tries of the current test assembly when test assembly is being retried. {0} is number that starts at 1
+
+ An unexpected help-related message was received when `--help` wasn't used.
+ An unexpected help-related message was received when `--help` wasn't used.
+
+
+
+ A message of type '{0}' was received in help mode, which is not expected.
+ A message of type '{0}' was received in help mode, which is not expected.
+
+
+
+ A message of type '{0}' was received before we got any handshakes, which is unexpected.
+ A message of type '{0}' was received before we got any handshakes, which is unexpected.
+
+
+
+ A test session end event was received without a corresponding test session start.
+ A test session end event was received without a corresponding test session start.
+
+ Tool '{0}' was successfully uninstalled and removed from manifest file {1}.已成功解除安裝工具 '{0}',且已將其從資訊清單檔 {1} 中移除。
diff --git a/src/Cli/dotnet/dotnet.csproj b/src/Cli/dotnet/dotnet.csproj
index 156dc1027688..2e63f9a3c5a8 100644
--- a/src/Cli/dotnet/dotnet.csproj
+++ b/src/Cli/dotnet/dotnet.csproj
@@ -66,7 +66,6 @@
-
diff --git a/src/Layout/pkg/windows/bundles/sdk/bundle.thm b/src/Layout/pkg/windows/bundles/sdk/bundle.thm
index 0b8a551e1168..a9ed6a319c7d 100644
--- a/src/Layout/pkg/windows/bundles/sdk/bundle.thm
+++ b/src/Layout/pkg/windows/bundles/sdk/bundle.thm
@@ -81,7 +81,7 @@
-
-
+ #(loc.FailureHeader)#(loc.FailureLayoutHeader)#(loc.FailureUnsafeUninstallHeader)
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenAResolvePackageDependenciesTask.cs b/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenAResolvePackageDependenciesTask.cs
index 40543d1ae798..1d4a52b44d49 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenAResolvePackageDependenciesTask.cs
+++ b/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenAResolvePackageDependenciesTask.cs
@@ -141,12 +141,17 @@ public void ItAssignsExpectedTopLevelDependencies()
});
}
- [Fact]
- public void ItAssignsDiagnosticLevel()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public void ItAssignsDiagnosticLevel(bool useAlias)
{
const string target1 = ".NETCoreApp,Version=v1.0";
const string target2 = ".NETCoreApp,Version=v2.0";
+ string alias1 = useAlias ? "netcoreapp1.0" : target1;
+ string alias2 = useAlias ? "netcoreapp2.0" : target2;
+
string lockFileContent = CreateLockFileSnippet(
targets: new string[] {
CreateTarget("netcoreapp1.0", TargetLibA, TargetLibB, TargetLibC),
@@ -157,15 +162,15 @@ public void ItAssignsDiagnosticLevel()
logs: new[]
{
// LibA
- CreateLog(NuGetLogCode.NU1000, LogLevel.Information, "", libraryId: "LibA", targetGraphs: new[] { target1 }),
- CreateLog(NuGetLogCode.NU1000, LogLevel.Warning, "", libraryId: "LibA", targetGraphs: new[] { target1 }),
- CreateLog(NuGetLogCode.NU1000, LogLevel.Error, "", libraryId: "LibA", targetGraphs: new[] { target1 }),
+ CreateLog(NuGetLogCode.NU1000, LogLevel.Information, "", libraryId: "LibA", targetGraphs: new[] { alias1 }),
+ CreateLog(NuGetLogCode.NU1000, LogLevel.Warning, "", libraryId: "LibA", targetGraphs: new[] { alias1 }),
+ CreateLog(NuGetLogCode.NU1000, LogLevel.Error, "", libraryId: "LibA", targetGraphs: new[] { alias1 }),
// LibB
- CreateLog(NuGetLogCode.NU1000, LogLevel.Information, "", libraryId: "LibB", targetGraphs: new[] { target1, target2 }),
- CreateLog(NuGetLogCode.NU1000, LogLevel.Warning, "", libraryId: "LibB", targetGraphs: new[] { target1, target2 }),
+ CreateLog(NuGetLogCode.NU1000, LogLevel.Information, "", libraryId: "LibB", targetGraphs: new[] { alias1, alias2 }),
+ CreateLog(NuGetLogCode.NU1000, LogLevel.Warning, "", libraryId: "LibB", targetGraphs: new[] { alias1, alias2 }),
// LibC (wrong target)
- CreateLog(NuGetLogCode.NU1000, LogLevel.Information, "", libraryId: "LibB", targetGraphs: new[] { target2 }),
- CreateLog(NuGetLogCode.NU1000, LogLevel.Warning, "", libraryId: "LibB", targetGraphs: new[] { target2 })
+ CreateLog(NuGetLogCode.NU1000, LogLevel.Information, "", libraryId: "LibB", targetGraphs: new[] { alias2 }),
+ CreateLog(NuGetLogCode.NU1000, LogLevel.Warning, "", libraryId: "LibB", targetGraphs: new[] { alias2 })
}
);
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenThatWeWantToGetDependenciesViaDesignTimeBuild.cs b/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenThatWeWantToGetDependenciesViaDesignTimeBuild.cs
index 5a97538139b3..70a49278a575 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenThatWeWantToGetDependenciesViaDesignTimeBuild.cs
+++ b/src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/GivenThatWeWantToGetDependenciesViaDesignTimeBuild.cs
@@ -351,8 +351,10 @@ public void ItShouldOnlyReturnPackagesInTheSpecifiedTarget()
Assert.Equal("top.package1/1.0.0", item1.ItemSpec);
}
- [WindowsOnlyFact]
- public void ItShouldOnlyReturnTopLevelPackages()
+ [WindowsOnlyTheory]
+ [InlineData("latestNet")]
+ [InlineData("net6.0")]
+ public void ItShouldOnlyReturnTopLevelPackages(string alias)
{
var testRoot = _testAssetsManager.CreateTestDirectory().Path;
Log.WriteLine("Test root: " + testRoot);
@@ -360,11 +362,11 @@ public void ItShouldOnlyReturnTopLevelPackages()
string projectAssetsJsonPath = Path.Combine(testRoot, "project.assets.json");
string projectCacheAssetsJsonPath = Path.Combine(testRoot, "projectassets.cache");
// project.assets.json
- File.WriteAllText(projectAssetsJsonPath, CreateBasicProjectAssetsFile(testRoot));
+ File.WriteAllText(projectAssetsJsonPath, CreateBasicProjectAssetsFile(testRoot, alias: alias));
var task = InitializeTask(testRoot, out _);
task.ProjectAssetsFile = projectAssetsJsonPath;
task.ProjectAssetsCacheFile = projectCacheAssetsJsonPath;
- task.TargetFramework = "net6.0";
+ task.TargetFramework = alias;
task.Execute();
// Verify all top packages are listed here
@@ -404,7 +406,7 @@ public void ItShouldOnlyReturnTopLevelPackages()
///
/// dependent.package2 has an error message, and dependent.package3 has a warning.
///
- private string CreateBasicProjectAssetsFile(string testRoot, string package2Type = "package", string package3Type = "package")
+ private string CreateBasicProjectAssetsFile(string testRoot, string package2Type = "package", string package3Type = "package", string alias = "net6.0")
{
var json =
"""
@@ -586,11 +588,11 @@ private string CreateBasicProjectAssetsFile(string testRoot, string package2Type
"C:\\configDir3\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
- "net6.0"
+ "TFM_ALIAS"
],
"frameworks": {
"net6.0": {
- "targetAlias": "net6.0",
+ "targetAlias": "TFM_ALIAS",
"projectReferences": {}
}
},
@@ -602,7 +604,7 @@ private string CreateBasicProjectAssetsFile(string testRoot, string package2Type
},
"frameworks" : {
"net6.0": {
- "targetAlias" : "net6.0",
+ "targetAlias" : "TFM_ALIAS",
"dependencies" : {
"top.package1" : {
"target" : "Package",
@@ -620,7 +622,7 @@ private string CreateBasicProjectAssetsFile(string testRoot, string package2Type
"message": "some warning message",
"libraryId": "dependent.package2",
"targetGraphs": [
- "net6.0"
+ "TFM_ALIAS"
]
},
{
@@ -630,7 +632,7 @@ private string CreateBasicProjectAssetsFile(string testRoot, string package2Type
"message": "some warning message",
"libraryId": "dependent.package3",
"targetGraphs": [
- "net6.0"
+ "TFM_ALIAS"
]
}
]
@@ -638,6 +640,7 @@ private string CreateBasicProjectAssetsFile(string testRoot, string package2Type
""";
return json.Replace("PACKAGE2_TYPE", package2Type)
.Replace("PACKAGE3_TYPE", package3Type)
+ .Replace("TFM_ALIAS", alias)
.Replace(@"C:\\.nuget", $@"{testRoot.Replace("\\", "\\\\")}\\.nuget");
}
private ResolvePackageAssets InitializeTask(string testRoot, out IEnumerable inputProperties)
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/ResolvePackageAssets.cs b/src/Tasks/Microsoft.NET.Build.Tasks/ResolvePackageAssets.cs
index 8a0cba60b829..31d6c5959cc4 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/ResolvePackageAssets.cs
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/ResolvePackageAssets.cs
@@ -1575,10 +1575,19 @@ Dictionary> GetReverseDependencies()
bool ForCurrentTargetFramework(string targetFramework)
{
var parts = targetFramework.Split(LockFile.DirectorySeparatorChar);
- var parsedTargetGraph = NuGetFramework.Parse(parts[0]);
- var alias = _lockFile.PackageSpec.TargetFrameworks
- .FirstOrDefault(tf => tf.FrameworkName == parsedTargetGraph)
- ?.TargetAlias ?? targetFramework;
+ string alias = parts[0];
+ if (alias == _task.TargetFramework)
+ {
+ return true;
+ }
+ else
+ {
+ var parsedTargetGraph = NuGetFramework.Parse(alias);
+ alias = _lockFile.PackageSpec.TargetFrameworks
+ .FirstOrDefault(tf => tf.FrameworkName == parsedTargetGraph)
+ ?.TargetAlias ?? targetFramework;
+ }
+
return alias == _task.TargetFramework;
}
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/ResolvePackageDependencies.cs b/src/Tasks/Microsoft.NET.Build.Tasks/ResolvePackageDependencies.cs
index bb02ba219335..0dbc7286009e 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/ResolvePackageDependencies.cs
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/ResolvePackageDependencies.cs
@@ -5,6 +5,7 @@
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
+using NuGet.Common;
using NuGet.Frameworks;
using NuGet.ProjectModel;
@@ -238,20 +239,35 @@ string GetPackageDiagnosticLevel(LockFileLibrary package)
{
string target = TargetFramework ?? "";
- var messages = LockFile.LogMessages.Where(log => log.LibraryId == package.Name && log.TargetGraphs
- .Select(tg =>
- {
- var parsedTargetGraph = NuGetFramework.Parse(tg);
- var alias = _lockFile.PackageSpec.TargetFrameworks.FirstOrDefault(tf => tf.FrameworkName == parsedTargetGraph)?.TargetAlias;
- return alias ?? tg;
- }).Contains(target));
+ LogLevel? logLevel = null;
- if (!messages.Any())
+ foreach (var message in LockFile.LogMessages)
{
- return string.Empty;
+ if (message.LibraryId == package.Name)
+ {
+ foreach (var targetGraph in message.TargetGraphs)
+ {
+ string effectiveTargetGraphName = targetGraph;
+ // If the target graph is not in the map, then very likely aliases are being used.
+ if (_targetNameToAliasMap.ContainsKey(targetGraph))
+ {
+ var parsedTargetGraph = NuGetFramework.Parse(targetGraph);
+ effectiveTargetGraphName = _lockFile.PackageSpec.TargetFrameworks.FirstOrDefault(tf => tf.FrameworkName == parsedTargetGraph)?.TargetAlias;
+ }
+
+ if (effectiveTargetGraphName == target)
+ {
+ if (logLevel == null || message.Level > logLevel)
+ {
+ logLevel = message.Level;
+ }
+ break;
+ }
+ }
+ }
}
- return messages.Max(log => log.Level).ToString();
+ return logLevel != null ? logLevel.ToString() : string.Empty;
}
}
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.cs.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.cs.json
index 0fdb47a86fa9..a84a213c397a 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.cs.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.cs.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Metoda testovacího přípravku TestCleanup",
"postActions/restoreNugetPackages/description": "Obnoví balíčky NuGet vyžadované tímto projektem.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Spustit dotnet restore",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Otevře Test1.cs v editoru."
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.de.json
index 594cf985b372..6ce2fa04d6bb 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.de.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.de.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Fixierungsmethode \"TestCleanup\"",
"postActions/restoreNugetPackages/description": "Stellt die NuGet-Pakete wieder her, die für dieses Projekt erforderlich sind.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" ausführen",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Öffnet Test1.cs im Editor"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.en.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.en.json
index fb2e89825d4e..ef734e6510e4 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.en.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.en.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup fixture method",
"postActions/restoreNugetPackages/description": "Restore NuGet packages required by this project.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Run 'dotnet restore'",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Opens Test1.cs in the editor"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.es.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.es.json
index 0b1442b5b7b5..79f6e8b7ed5f 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.es.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.es.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Método de accesorio TestCleanup",
"postActions/restoreNugetPackages/description": "Restaure los paquetes NuGet necesarios para este proyecto.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Ejecutar \"dotnet restore\"",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Abrir Test1.cs en el editor."
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.fr.json
index 21305173780f..53fe20ff3650 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.fr.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.fr.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Méthode de fixture TestCleanup",
"postActions/restoreNugetPackages/description": "Restaurez les packages NuGet requis par ce projet.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Exécutez « dotnet restore »",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Ouvre Test1.cs dans l’éditeur"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.it.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.it.json
index a068453a420d..f0bbe81b6081 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.it.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.it.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Metodo fixture TestCleanup",
"postActions/restoreNugetPackages/description": "Ripristina i pacchetti NuGet richiesti da questo progetto.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Esegui 'dotnet restore'",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Apre Test1.cs nell'editor"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.ja.json
index e363c2123673..8abec526fba5 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.ja.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.ja.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup フィクスチャ メソッド",
"postActions/restoreNugetPackages/description": "このプロジェクトに必要な NuGet パッケージを復元します。",
"postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' を実行する",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "エディターで Test1.cs を開きます"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.ko.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.ko.json
index ce2b14bc2d29..7b5233ccbc18 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.ko.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.ko.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup fixture 메서드",
"postActions/restoreNugetPackages/description": "이 프로젝트에 필요한 NuGet 패키지를 복원합니다.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' 실행",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "편집기에서 Test1.cs 열기"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.pl.json
index a22f3f0cb23c..bca7305e53d9 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.pl.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.pl.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup — metoda początkowa",
"postActions/restoreNugetPackages/description": "Przywróć pakiety NuGet wymagane przez ten projekt.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Uruchom polecenie „dotnet restore”",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Otwiera plik Test1.cs w edytorze"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.pt-BR.json
index 7344f39086ef..e97e6205db55 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.pt-BR.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.pt-BR.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Método de acessório TestCleanup",
"postActions/restoreNugetPackages/description": "Restaura os pacotes do NuGet exigidos por este projeto.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Executa \"dotnet restore\"",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Abre o Test1.cs no editor"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.ru.json
index 975bfb42ae77..b3bd988269a7 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.ru.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.ru.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Метод работы со средствами TestCleanup",
"postActions/restoreNugetPackages/description": "Восстановление пакетов NuGet, необходимых для этого проекта.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Выполнить команду \"dotnet restore\"",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Открывает Test1.cs редакторе"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.tr.json
index a045955a540e..e09e1d1eb151 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.tr.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.tr.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup düzen yöntemi",
"postActions/restoreNugetPackages/description": "Bu projenin gerektirdiği NuGet paketlerini geri yükleyin.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" çalıştır",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Test1.cs'yi düzenleyicide açar"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.zh-Hans.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.zh-Hans.json
index 273193085681..a7fda34f2294 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.zh-Hans.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.zh-Hans.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup 固定例程方法",
"postActions/restoreNugetPackages/description": "还原此项目所需的 NuGet 包。",
"postActions/restoreNugetPackages/manualInstructions/default/text": "运行 \"dotnet restore\"",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "在编辑器中打开 Test1.cs"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.zh-Hant.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.zh-Hant.json
index d625f9cf2d93..51fc6105a344 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.zh-Hant.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/localize/templatestrings.zh-Hant.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup 固件方法",
"postActions/restoreNugetPackages/description": "還原此專案所需的 NuGet 套件。",
"postActions/restoreNugetPackages/manualInstructions/default/text": "執行 'dotnet restore'",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "在編輯器中開啟 Test1.cs"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/template.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/template.json
index 95b01952003c..01977ec20d99 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/template.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-CSharp/.template.config/template.json
@@ -229,14 +229,18 @@
},
{
"condition": "(TestRunner == \"Microsoft.Testing.Platform\")",
- "description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "manualInstructions": [{ "text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform" }],
- "actionId": "597E7933-0D87-452C-B094-8FA0EEF7FD97",
- "id": "createOrUpdateDotnetConfig",
+ "description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "manualInstructions": [{ "text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform" }],
+ "actionId": "695A3659-EB40-4FF5-A6A6-C9C4E629FCB0",
+ "id": "addJsonProperty",
"args": {
- "section": "dotnet.test.runner",
- "key": "name",
- "value": "Microsoft.Testing.Platform",
+ "allowFileCreation": true,
+ "allowPathCreation": true,
+ "jsonFileName": "global.json",
+ "parentPropertyPath": "test",
+ "newJsonPropertyName": "runner",
+ "newJsonPropertyValue": "Microsoft.Testing.Platform",
+ "detectRepositoryRootForFileCreation": true
},
"continueOnError": true
},
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.cs.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.cs.json
index 1d701ed95fde..b7ff6b32d45f 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.cs.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.cs.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Metoda testovacího přípravku TestCleanup",
"postActions/restoreNugetPackages/description": "Obnoví balíčky NuGet vyžadované tímto projektem.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Spustit dotnet restore",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Otevře Test1.fs v editoru."
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.de.json
index c74ad6135107..83a5669b3e1b 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.de.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.de.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Fixierungsmethode \"TestCleanup\"",
"postActions/restoreNugetPackages/description": "Stellt die NuGet-Pakete wieder her, die für dieses Projekt erforderlich sind.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" ausführen",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Öffnet Test1.fs im Editor"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.en.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.en.json
index 58bb621b8d4d..2ddfebf82f61 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.en.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.en.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup fixture method",
"postActions/restoreNugetPackages/description": "Restore NuGet packages required by this project.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Run 'dotnet restore'",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Opens Test1.fs in the editor"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.es.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.es.json
index b76c96adbd90..1e9575a5346f 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.es.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.es.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Método de accesorio TestCleanup",
"postActions/restoreNugetPackages/description": "Restaure los paquetes NuGet necesarios para este proyecto.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Ejecutar \"dotnet restore\"",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Abrir Test1.fs en el editor"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.fr.json
index 4b6587cf41b6..8c0eb4a05506 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.fr.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.fr.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Méthode de fixture TestCleanup",
"postActions/restoreNugetPackages/description": "Restaurez les packages NuGet requis par ce projet.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Exécutez « dotnet restore »",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Ouvre Test1.fs dans l’éditeur"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.it.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.it.json
index cae6e5791d93..db8b42b1f617 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.it.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.it.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Metodo fixture TestCleanup",
"postActions/restoreNugetPackages/description": "Ripristina i pacchetti NuGet richiesti da questo progetto.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Esegui 'dotnet restore'",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Apre Test1.fs nell'editor"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.ja.json
index 0d237e3e1fb1..93ecd87fadd3 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.ja.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.ja.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup フィクスチャ メソッド",
"postActions/restoreNugetPackages/description": "このプロジェクトに必要な NuGet パッケージを復元します。",
"postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' を実行する",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "エディターで Test1.fs を開きます"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.ko.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.ko.json
index 2ca744e3e3d7..4d43f0445d48 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.ko.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.ko.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup fixture 메서드",
"postActions/restoreNugetPackages/description": "이 프로젝트에 필요한 NuGet 패키지를 복원합니다.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' 실행",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "편집기에서 Test1.fs 열기"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.pl.json
index d1049621573c..0562966c9b78 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.pl.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.pl.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup — metoda początkowa",
"postActions/restoreNugetPackages/description": "Przywróć pakiety NuGet wymagane przez ten projekt.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Uruchom polecenie „dotnet restore”",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Otwiera plik Test1.fs w edytorze"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.pt-BR.json
index 782c6fd53de6..1e0e1f8c92d2 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.pt-BR.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.pt-BR.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Método de acessório TestCleanup",
"postActions/restoreNugetPackages/description": "Restaura os pacotes do NuGet exigidos por este projeto.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Executa \"dotnet restore\"",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Abre o Test1.fs no editor"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.ru.json
index cee394752afe..d82d72c10c99 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.ru.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.ru.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Метод работы со средствами TestCleanup",
"postActions/restoreNugetPackages/description": "Восстановление пакетов NuGet, необходимых для этого проекта.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Выполнить команду \"dotnet restore\"",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Открывает Test1.fs в редакторе"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.tr.json
index 0f8978497413..1cd7b63e0a39 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.tr.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.tr.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup düzen yöntemi",
"postActions/restoreNugetPackages/description": "Bu projenin gerektirdiği NuGet paketlerini geri yükleyin.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" çalıştır",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Test1.fs'yi düzenleyicide açar"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.zh-Hans.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.zh-Hans.json
index 50ce4d4cc102..bf7797f48535 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.zh-Hans.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.zh-Hans.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup 固定例程方法",
"postActions/restoreNugetPackages/description": "还原此项目所需的 NuGet 包。",
"postActions/restoreNugetPackages/manualInstructions/default/text": "运行 \"dotnet restore\"",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "在编辑器中打开 Test1.fs"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.zh-Hant.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.zh-Hant.json
index c617677cabde..0f55f462362c 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.zh-Hant.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/localize/templatestrings.zh-Hant.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup 固件方法",
"postActions/restoreNugetPackages/description": "還原此專案所需的 NuGet 套件。",
"postActions/restoreNugetPackages/manualInstructions/default/text": "執行 'dotnet restore'",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "在編輯器中開啟 Test1.fs"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/template.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/template.json
index d7f018f5efc6..022ffe70b9cf 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/template.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-FSharp/.template.config/template.json
@@ -229,14 +229,18 @@
},
{
"condition": "(TestRunner == \"Microsoft.Testing.Platform\")",
- "description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "manualInstructions": [{ "text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform" }],
- "actionId": "597E7933-0D87-452C-B094-8FA0EEF7FD97",
- "id": "createOrUpdateDotnetConfig",
+ "description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "manualInstructions": [{ "text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform" }],
+ "actionId": "695A3659-EB40-4FF5-A6A6-C9C4E629FCB0",
+ "id": "addJsonProperty",
"args": {
- "section": "dotnet.test.runner",
- "key": "name",
- "value": "Microsoft.Testing.Platform",
+ "allowFileCreation": true,
+ "allowPathCreation": true,
+ "jsonFileName": "global.json",
+ "parentPropertyPath": "test",
+ "newJsonPropertyName": "runner",
+ "newJsonPropertyValue": "Microsoft.Testing.Platform",
+ "detectRepositoryRootForFileCreation": true
},
"continueOnError": true
},
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.cs.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.cs.json
index a4faa216478d..d51fe797a198 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.cs.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.cs.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Metoda testovacího přípravku TestCleanup",
"postActions/restoreNugetPackages/description": "Obnoví balíčky NuGet vyžadované tímto projektem.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Spustit dotnet restore",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Otevře Test1.vb v editoru."
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.de.json
index e910f6c6e6b3..91296abf8c4b 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.de.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.de.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Fixierungsmethode \"TestCleanup\"",
"postActions/restoreNugetPackages/description": "Stellt die NuGet-Pakete wieder her, die für dieses Projekt erforderlich sind.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" ausführen",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Öffnet Test1.vb im Editor"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.en.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.en.json
index 1143066584bb..7e7ca4cc4ab3 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.en.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.en.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup fixture method",
"postActions/restoreNugetPackages/description": "Restore NuGet packages required by this project.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Run 'dotnet restore'",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Opens Test1.vb in the editor"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.es.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.es.json
index 6812ad4fd80d..26c232daac1e 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.es.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.es.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Método de accesorio TestCleanup",
"postActions/restoreNugetPackages/description": "Restaure los paquetes NuGet necesarios para este proyecto.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Ejecutar \"dotnet restore\"",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Abrir Test1.vb en el editor"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.fr.json
index 1319abf40675..38dd553aa8a8 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.fr.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.fr.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Méthode de fixture TestCleanup",
"postActions/restoreNugetPackages/description": "Restaurez les packages NuGet requis par ce projet.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Exécutez « dotnet restore »",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Ouvre Test1.vb dans l’éditeur"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.it.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.it.json
index 215f12975feb..d90ba815124c 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.it.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.it.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Metodo fixture TestCleanup",
"postActions/restoreNugetPackages/description": "Ripristina i pacchetti NuGet richiesti da questo progetto.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Esegui 'dotnet restore'",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Apre Test1.vb nell'editor"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.ja.json
index 3566ea0640e7..1e5086d83fa6 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.ja.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.ja.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup フィクスチャ メソッド",
"postActions/restoreNugetPackages/description": "このプロジェクトに必要な NuGet パッケージを復元します。",
"postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' を実行する",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "エディターで Test1.vb を開きます"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.ko.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.ko.json
index 693ea4756c17..b9023d907f62 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.ko.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.ko.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup fixture 메서드",
"postActions/restoreNugetPackages/description": "이 프로젝트에 필요한 NuGet 패키지를 복원합니다.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' 실행",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "편집기에서 Test1.vb 열기"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.pl.json
index 210f461e4d01..2df4f1064515 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.pl.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.pl.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup — metoda początkowa",
"postActions/restoreNugetPackages/description": "Przywróć pakiety NuGet wymagane przez ten projekt.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Uruchom polecenie „dotnet restore”",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Otwiera plik Test1.vb w edytorze"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.pt-BR.json
index a7e21b2fc4c2..b0311cbc2cac 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.pt-BR.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.pt-BR.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Método de acessório TestCleanup",
"postActions/restoreNugetPackages/description": "Restaura os pacotes do NuGet exigidos por este projeto.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Executa \"dotnet restore\"",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Abre o Test1.vb no editor"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.ru.json
index c53d7943066e..b5a84d8cd027 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.ru.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.ru.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Метод работы со средствами TestCleanup",
"postActions/restoreNugetPackages/description": "Восстановление пакетов NuGet, необходимых для этого проекта.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Выполнить команду \"dotnet restore\"",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Открывает Test1.vb в редакторе"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.tr.json
index 71e3b3c5933e..88d9f7cd1761 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.tr.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.tr.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup düzen yöntemi",
"postActions/restoreNugetPackages/description": "Bu projenin gerektirdiği NuGet paketlerini geri yükleyin.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" çalıştır",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Test1.vb'yi düzenleyicide açar"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.zh-Hans.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.zh-Hans.json
index 8ec06bf6163d..53b04ad750ca 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.zh-Hans.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.zh-Hans.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup 固定例程方法",
"postActions/restoreNugetPackages/description": "还原此项目所需的 NuGet 包。",
"postActions/restoreNugetPackages/manualInstructions/default/text": "运行 \"dotnet restore\"",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "在编辑器中打开 Test1.vb"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.zh-Hant.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.zh-Hant.json
index 9e74ecfbd7bd..9a74906310ef 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.zh-Hant.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/localize/templatestrings.zh-Hant.json
@@ -52,7 +52,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup 固件方法",
"postActions/restoreNugetPackages/description": "還原此專案所需的 NuGet 套件。",
"postActions/restoreNugetPackages/manualInstructions/default/text": "執行 'dotnet restore'",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "在編輯器中開啟 Test1.vb"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/template.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/template.json
index 71fe6ea96124..cca88e73c3cd 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/template.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/MSTest-VisualBasic/.template.config/template.json
@@ -229,14 +229,18 @@
},
{
"condition": "(TestRunner == \"Microsoft.Testing.Platform\")",
- "description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "manualInstructions": [{ "text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform" }],
- "actionId": "597E7933-0D87-452C-B094-8FA0EEF7FD97",
- "id": "createOrUpdateDotnetConfig",
+ "description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "manualInstructions": [{ "text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform" }],
+ "actionId": "695A3659-EB40-4FF5-A6A6-C9C4E629FCB0",
+ "id": "addJsonProperty",
"args": {
- "section": "dotnet.test.runner",
- "key": "name",
- "value": "Microsoft.Testing.Platform",
+ "allowFileCreation": true,
+ "allowPathCreation": true,
+ "jsonFileName": "global.json",
+ "parentPropertyPath": "test",
+ "newJsonPropertyName": "runner",
+ "newJsonPropertyValue": "Microsoft.Testing.Platform",
+ "detectRepositoryRootForFileCreation": true
},
"continueOnError": true
},
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.cs.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.cs.json
index 6d5b848e0557..70f943fbeceb 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.cs.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.cs.json
@@ -57,7 +57,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Metoda testovacího přípravku TestCleanup",
"postActions/restoreNugetPackages/description": "Obnoví balíčky NuGet vyžadované tímto projektem.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Spustit dotnet restore",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Otevře Test1.cs v editoru."
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.de.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.de.json
index 809c88470873..a033b36b85f2 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.de.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.de.json
@@ -57,7 +57,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Fixierungsmethode \"TestCleanup\"",
"postActions/restoreNugetPackages/description": "Stellt die NuGet-Pakete wieder her, die für dieses Projekt erforderlich sind.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" ausführen",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Öffnet Test1.cs im Editor"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.en.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.en.json
index a54c2eb11253..e2c13a92416c 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.en.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.en.json
@@ -57,7 +57,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup fixture method",
"postActions/restoreNugetPackages/description": "Restore NuGet packages required by this project.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Run 'dotnet restore'",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Opens Test1.cs in the editor"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.es.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.es.json
index af1a5fbe3a76..dafa0d5fcefb 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.es.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.es.json
@@ -57,7 +57,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Método de accesorio TestCleanup",
"postActions/restoreNugetPackages/description": "Restaure los paquetes NuGet necesarios para este proyecto.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Ejecutar \"dotnet restore\"",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Abrir Test1.cs en el editor."
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.fr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.fr.json
index d0f7003d4dd4..a42ccf5c7cde 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.fr.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.fr.json
@@ -57,7 +57,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Méthode de fixture TestCleanup",
"postActions/restoreNugetPackages/description": "Restaurez les packages NuGet requis par ce projet.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Exécutez « dotnet restore »",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Ouvre Test1.cs dans l’éditeur"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.it.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.it.json
index f63295899090..3cfad9d1ecc3 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.it.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.it.json
@@ -57,7 +57,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Metodo fixture TestCleanup",
"postActions/restoreNugetPackages/description": "Ripristina i pacchetti NuGet richiesti da questo progetto.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Esegui 'dotnet restore'",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Apre Test1.cs nell'editor"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.ja.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.ja.json
index 5d545864c785..0cffb118b6ed 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.ja.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.ja.json
@@ -57,7 +57,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup フィクスチャ メソッド",
"postActions/restoreNugetPackages/description": "このプロジェクトに必要な NuGet パッケージを復元します。",
"postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' を実行する",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "エディターで Test1.cs を開きます"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.ko.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.ko.json
index 93670d840378..04e74ff275e0 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.ko.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.ko.json
@@ -57,7 +57,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup fixture 메서드",
"postActions/restoreNugetPackages/description": "이 프로젝트에 필요한 NuGet 패키지를 복원합니다.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "'dotnet restore' 실행",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "편집기에서 Test1.cs 열기"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.pl.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.pl.json
index 91bad70c2d67..7822568a090c 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.pl.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.pl.json
@@ -57,7 +57,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup — metoda początkowa",
"postActions/restoreNugetPackages/description": "Przywróć pakiety NuGet wymagane przez ten projekt.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Uruchom polecenie „dotnet restore”",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Otwiera plik Test1.cs w edytorze"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.pt-BR.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.pt-BR.json
index d04f93134ea9..b16e73aaff84 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.pt-BR.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.pt-BR.json
@@ -57,7 +57,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Método de acessório TestCleanup",
"postActions/restoreNugetPackages/description": "Restaura os pacotes do NuGet exigidos por este projeto.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Executa \"dotnet restore\"",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Abre o Test1.cs no editor"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.ru.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.ru.json
index 8d5a9ba65708..62dd753e1e66 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.ru.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.ru.json
@@ -57,7 +57,7 @@
"symbols/Fixture/choices/TestCleanup/description": "Метод работы со средствами TestCleanup",
"postActions/restoreNugetPackages/description": "Восстановление пакетов NuGet, необходимых для этого проекта.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "Выполнить команду \"dotnet restore\"",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Открывает Test1.cs редакторе"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.tr.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.tr.json
index 30eb317945c4..a0fe5d119211 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.tr.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.tr.json
@@ -57,7 +57,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup düzen yöntemi",
"postActions/restoreNugetPackages/description": "Bu projenin gerektirdiği NuGet paketlerini geri yükleyin.",
"postActions/restoreNugetPackages/manualInstructions/default/text": "\"dotnet restore\" çalıştır",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "Test1.cs'yi düzenleyicide açar"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.zh-Hans.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.zh-Hans.json
index 2b64337eaab6..d3813429eb2c 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.zh-Hans.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.zh-Hans.json
@@ -57,7 +57,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup 固定例程方法",
"postActions/restoreNugetPackages/description": "还原此项目所需的 NuGet 包。",
"postActions/restoreNugetPackages/manualInstructions/default/text": "运行 \"dotnet restore\"",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "在编辑器中打开 Test1.cs"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.zh-Hant.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.zh-Hant.json
index 77d7ab1aac3e..65f448819360 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.zh-Hant.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/localize/templatestrings.zh-Hant.json
@@ -57,7 +57,7 @@
"symbols/Fixture/choices/TestCleanup/description": "TestCleanup 固件方法",
"postActions/restoreNugetPackages/description": "還原此專案所需的 NuGet 套件。",
"postActions/restoreNugetPackages/manualInstructions/default/text": "執行 'dotnet restore'",
- "postActions/createOrUpdateDotnetConfig/description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "postActions/createOrUpdateDotnetConfig/manualInstructions/default/text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform",
+ "postActions/addJsonProperty/description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "postActions/addJsonProperty/manualInstructions/default/text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform",
"postActions/openInEditor/description": "在編輯器中開啟 Test1.cs"
}
\ No newline at end of file
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/template.json b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/template.json
index 303570a8da7a..b55dff5e27a9 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/template.json
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/Playwright-MSTest-CSharp/.template.config/template.json
@@ -249,14 +249,18 @@
},
{
"condition": "(TestRunner == \"Microsoft.Testing.Platform\")",
- "description": "Create or update 'dotnet.config' file required by Microsoft.Testing.Platform.",
- "manualInstructions": [{ "text": "Manually create 'dotnet.config' file setting the test runner to Microsoft.Testing.Platform" }],
- "actionId": "597E7933-0D87-452C-B094-8FA0EEF7FD97",
- "id": "createOrUpdateDotnetConfig",
+ "description": "Create or update 'global.json' file required by Microsoft.Testing.Platform.",
+ "manualInstructions": [{ "text": "Manually update or create 'global.json' file setting the test runner to Microsoft.Testing.Platform" }],
+ "actionId": "695A3659-EB40-4FF5-A6A6-C9C4E629FCB0",
+ "id": "addJsonProperty",
"args": {
- "section": "dotnet.test.runner",
- "key": "name",
- "value": "Microsoft.Testing.Platform",
+ "allowFileCreation": true,
+ "allowPathCreation": true,
+ "jsonFileName": "global.json",
+ "parentPropertyPath": "test",
+ "newJsonPropertyName": "runner",
+ "newJsonPropertyValue": "Microsoft.Testing.Platform",
+ "detectRepositoryRootForFileCreation": true
},
"continueOnError": true
},
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/Company.TestProject1.csproj b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/Company.TestProject1.csproj
index c29acbb86c83..d06cdf2db4f7 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/Company.TestProject1.csproj
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-CSharp/Company.TestProject1.csproj
@@ -13,7 +13,7 @@
-
+
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/Company.TestProject1.fsproj b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/Company.TestProject1.fsproj
index b0475294491f..f692a0f96f8c 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/Company.TestProject1.fsproj
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-FSharp/Company.TestProject1.fsproj
@@ -11,7 +11,7 @@
-
+
diff --git a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/Company.TestProject1.vbproj b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/Company.TestProject1.vbproj
index fa23ca052b6a..12420aa04ea8 100644
--- a/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/Company.TestProject1.vbproj
+++ b/template_feed/Microsoft.DotNet.Common.ProjectTemplates.10.0/content/XUnit-VisualBasic/Company.TestProject1.vbproj
@@ -11,7 +11,7 @@
-
+
diff --git a/test/Microsoft.NET.TestFramework/Utilities/RegexPatternHelper.cs b/test/Microsoft.NET.TestFramework/Utilities/RegexPatternHelper.cs
index a3e1cf015b90..c4c068cfe2e7 100644
--- a/test/Microsoft.NET.TestFramework/Utilities/RegexPatternHelper.cs
+++ b/test/Microsoft.NET.TestFramework/Utilities/RegexPatternHelper.cs
@@ -16,7 +16,7 @@ public static string GenerateProjectRegexPattern(string projectName, string resu
string.Empty;
string exitCodePattern = exitCode == null ? string.Empty : $@"[\s\S]*?Exit\s+code: {exitCode}";
- return $@".+{configuration}{PathUtility.GetDirectorySeparatorChar()}{version}{PathUtility.GetDirectorySeparatorChar()}{runtimeIdentifier}{projectName}(\.dll|\.exe)?\s+\({version}\|[a-zA-Z][1-9]+\)\s{result}{exitCodePattern}";
+ return $@".+{configuration}{PathUtility.GetDirectorySeparatorChar()}{version}{PathUtility.GetDirectorySeparatorChar()}{runtimeIdentifier}{projectName}(\.dll|\.exe)?\s+\({version}\|[a-zA-Z]+[1-9]+\)\s{result}{exitCodePattern}";
}
public static string GenerateProjectRegexPattern(string projectName, bool useCurrentVersion, string configuration, string prefix, List? suffix = null, bool addVersionAndArchPattern = true)
@@ -26,7 +26,7 @@ public static string GenerateProjectRegexPattern(string projectName, bool useCur
if (addVersionAndArchPattern)
{
- pattern += @$"\s+\({version}\|[a-zA-Z][1-9]+\)";
+ pattern += @$"\s+\({version}\|[a-zA-Z]+[1-9]+\)";
}
if (suffix == null)
diff --git a/test/Microsoft.TemplateEngine.Cli.UnitTests/PostActionTests/AddJsonPropertyPostActionTests.cs b/test/Microsoft.TemplateEngine.Cli.UnitTests/PostActionTests/AddJsonPropertyPostActionTests.cs
index 6e43810e538e..23c68bc3ed60 100644
--- a/test/Microsoft.TemplateEngine.Cli.UnitTests/PostActionTests/AddJsonPropertyPostActionTests.cs
+++ b/test/Microsoft.TemplateEngine.Cli.UnitTests/PostActionTests/AddJsonPropertyPostActionTests.cs
@@ -345,6 +345,88 @@ public void FailsWhenFileDoesNotExistAndAllowFileCreationIsSetButAllowPathCreati
Assert.Equal("{}", _engineEnvironmentSettings.Host.FileSystem.ReadAllText(jsonFilePath));
}
+ [Fact]
+ public void RepoRootDetectionShouldPreferGlobalJson_NoSlnInvolved()
+ {
+ var physicalFileSystem = _engineEnvironmentSettings.Host.FileSystem;
+ var tempPath = _engineEnvironmentSettings.GetTempVirtualizedPath();
+ var dirWithGlobalJson = Path.Combine(tempPath, nameof(RepoRootDetectionShouldPreferGlobalJson_NoSlnInvolved));
+ physicalFileSystem.CreateDirectory(dirWithGlobalJson);
+ physicalFileSystem.WriteAllText(Path.Combine(dirWithGlobalJson, "global.json"), "{}");
+ var subDir = Path.Combine(dirWithGlobalJson, "subdir");
+ physicalFileSystem.CreateDirectory(subDir);
+ AddJsonPropertyPostActionProcessor.GetRootDirectory(physicalFileSystem, subDir).Should().Be(dirWithGlobalJson);
+ }
+
+ [Fact]
+ public void RepoRootDetectionShouldPreferGlobalJson_SlnInSubDirectory()
+ {
+ var physicalFileSystem = _engineEnvironmentSettings.Host.FileSystem;
+ var tempPath = _engineEnvironmentSettings.GetTempVirtualizedPath();
+ var dirWithGlobalJson = Path.Combine(tempPath, nameof(RepoRootDetectionShouldPreferGlobalJson_SlnInSubDirectory));
+ physicalFileSystem.CreateDirectory(dirWithGlobalJson);
+ physicalFileSystem.WriteAllText(Path.Combine(dirWithGlobalJson, "global.json"), "{}");
+ var subDir = Path.Combine(dirWithGlobalJson, "subdir");
+ physicalFileSystem.CreateDirectory(subDir);
+ physicalFileSystem.WriteAllText(Path.Combine(subDir, "MySolution.sln"), "{}");
+ AddJsonPropertyPostActionProcessor.GetRootDirectory(physicalFileSystem, subDir).Should().Be(dirWithGlobalJson);
+ }
+
+ [Fact]
+ public void RepoRootDetectionShouldPreferGlobalJson_SlnInParent()
+ {
+ var physicalFileSystem = _engineEnvironmentSettings.Host.FileSystem;
+ var tempPath = _engineEnvironmentSettings.GetTempVirtualizedPath();
+ var dirWithGlobalJson = Path.Combine(tempPath, nameof(RepoRootDetectionShouldPreferGlobalJson_SlnInParent));
+ physicalFileSystem.CreateDirectory(dirWithGlobalJson);
+ physicalFileSystem.WriteAllText(Path.Combine(dirWithGlobalJson, "global.json"), "{}");
+ var subDir = Path.Combine(dirWithGlobalJson, "subdir");
+ physicalFileSystem.CreateDirectory(subDir);
+ physicalFileSystem.WriteAllText(Path.Combine(tempPath, "MySolution.sln"), "{}");
+ AddJsonPropertyPostActionProcessor.GetRootDirectory(physicalFileSystem, subDir).Should().Be(dirWithGlobalJson);
+ }
+
+ [Fact]
+ public void RepoRootDetectionShouldPreferGitDirectory_NoSlnInvolved()
+ {
+ var physicalFileSystem = _engineEnvironmentSettings.Host.FileSystem;
+ var tempPath = _engineEnvironmentSettings.GetTempVirtualizedPath();
+ var dirWithGitDirectory = Path.Combine(tempPath, nameof(RepoRootDetectionShouldPreferGitDirectory_NoSlnInvolved));
+ physicalFileSystem.CreateDirectory(dirWithGitDirectory);
+ physicalFileSystem.CreateDirectory(Path.Combine(dirWithGitDirectory, ".git"));
+ var subDir = Path.Combine(dirWithGitDirectory, "subdir");
+ physicalFileSystem.CreateDirectory(subDir);
+ AddJsonPropertyPostActionProcessor.GetRootDirectory(physicalFileSystem, subDir).Should().Be(dirWithGitDirectory);
+ }
+
+ [Fact]
+ public void RepoRootDetectionShouldPreferGitDirectory_SlnInSubDirectory()
+ {
+ var physicalFileSystem = _engineEnvironmentSettings.Host.FileSystem;
+ var tempPath = _engineEnvironmentSettings.GetTempVirtualizedPath();
+ var dirWithGitDirectory = Path.Combine(tempPath, nameof(RepoRootDetectionShouldPreferGitDirectory_SlnInSubDirectory));
+ physicalFileSystem.CreateDirectory(dirWithGitDirectory);
+ physicalFileSystem.CreateDirectory(Path.Combine(dirWithGitDirectory, ".git"));
+ var subDir = Path.Combine(dirWithGitDirectory, "subdir");
+ physicalFileSystem.CreateDirectory(subDir);
+ physicalFileSystem.WriteAllText(Path.Combine(subDir, "MySolution.sln"), "");
+ AddJsonPropertyPostActionProcessor.GetRootDirectory(physicalFileSystem, subDir).Should().Be(dirWithGitDirectory);
+ }
+
+ [Fact]
+ public void RepoRootDetectionShouldPreferGitDirectory_SlnInParent()
+ {
+ var physicalFileSystem = _engineEnvironmentSettings.Host.FileSystem;
+ var tempPath = _engineEnvironmentSettings.GetTempVirtualizedPath();
+ var dirWithGitDirectory = Path.Combine(tempPath, nameof(RepoRootDetectionShouldPreferGitDirectory_SlnInParent));
+ physicalFileSystem.CreateDirectory(dirWithGitDirectory);
+ physicalFileSystem.CreateDirectory(Path.Combine(dirWithGitDirectory, ".git"));
+ var subDir = Path.Combine(dirWithGitDirectory, "subdir");
+ physicalFileSystem.CreateDirectory(subDir);
+ physicalFileSystem.WriteAllText(Path.Combine(tempPath, "MySolution.sln"), "");
+ AddJsonPropertyPostActionProcessor.GetRootDirectory(physicalFileSystem, subDir).Should().Be(dirWithGitDirectory);
+ }
+
private string CreateJsonFile(string targetBasePath, string fileName, string jsonContent)
{
string jsonFileFullPath = Path.Combine(targetBasePath, fileName);
diff --git a/test/Microsoft.TemplateEngine.Cli.UnitTests/PostActionTests/CreateOrUpdateDotnetConfigPostActionTests.cs b/test/Microsoft.TemplateEngine.Cli.UnitTests/PostActionTests/CreateOrUpdateDotnetConfigPostActionTests.cs
deleted file mode 100644
index 6d66a0c6b895..000000000000
--- a/test/Microsoft.TemplateEngine.Cli.UnitTests/PostActionTests/CreateOrUpdateDotnetConfigPostActionTests.cs
+++ /dev/null
@@ -1,223 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Runtime.CompilerServices;
-using Microsoft.DotNet.Cli.Utils;
-using Microsoft.TemplateEngine.Abstractions;
-using Microsoft.TemplateEngine.Cli.PostActionProcessors;
-using Microsoft.TemplateEngine.Mocks;
-using Microsoft.TemplateEngine.TestHelper;
-
-using Moq;
-
-namespace Microsoft.TemplateEngine.Cli.UnitTests.PostActionTests;
-
-public class CreateOrUpdateDotnetConfigPostActionTests : IClassFixture
-{
- private readonly IEngineEnvironmentSettings _engineEnvironmentSettings;
-
- public CreateOrUpdateDotnetConfigPostActionTests(EnvironmentSettingsHelper environmentSettingsHelper)
- {
- _engineEnvironmentSettings = environmentSettingsHelper.CreateEnvironment(hostIdentifier: GetType().Name, virtualize: true);
- }
-
- [Theory]
- [InlineData("section")]
- [InlineData("key")]
- [InlineData("value")]
- public void MissingArgumentShouldFail(string missingArgumentName)
- {
- string targetBasePath = GetTargetPath();
-
- var dictionary = new Dictionary
- {
- ["section"] = "dotnet.test.runner",
- ["key"] = "name",
- ["value"] = "Microsoft.Testing.Platform"
- };
- dictionary.Remove(missingArgumentName);
-
- IPostAction postAction = new MockPostAction(default, default, default, default, default!)
- {
- ActionId = CreateOrUpdateDotnetConfigPostActionProcessor.ActionProcessorId,
- Args = dictionary,
- };
-
- Mock mockReporter = new();
-
- mockReporter.Setup(r => r.WriteLine(It.IsAny()))
- .Verifiable();
-
- Reporter.SetError(mockReporter.Object);
-
- CreateOrUpdateDotnetConfigPostActionProcessor processor = new();
-
- bool result = processor.Process(
- _engineEnvironmentSettings,
- postAction,
- new MockCreationEffects(),
- new MockCreationResult(),
- targetBasePath);
-
- Assert.False(result);
-
- mockReporter.Verify(r => r.WriteLine(string.Format(LocalizableStrings.PostAction_DotnetConfig_Error_ArgumentNotConfigured, missingArgumentName)), Times.Once);
- }
-
- [Fact]
- public void CreatesDotnetConfigWhenDoesNotExist()
- {
- string targetBasePath = GetTargetPath();
- string dotnetConfigPath = Path.Combine(targetBasePath, "dotnet.config");
-
- IPostAction postAction = CreatePostActionForMTP();
-
- Mock mockReporter = new();
-
- mockReporter.Setup(r => r.WriteLine(It.IsAny()))
- .Verifiable();
-
- Reporter.SetOutput(mockReporter.Object);
-
- CreateOrUpdateDotnetConfigPostActionProcessor processor = new();
-
- _engineEnvironmentSettings.Host.FileSystem.FileExists(dotnetConfigPath).Should().BeFalse();
-
- bool result = processor.Process(
- _engineEnvironmentSettings,
- postAction,
- new MockCreationEffects(),
- new MockCreationResult(),
- targetBasePath);
-
- Assert.True(result);
-
- _engineEnvironmentSettings.Host.FileSystem.FileExists(dotnetConfigPath).Should().BeTrue();
- _engineEnvironmentSettings.Host.FileSystem.ReadAllText(dotnetConfigPath).Should().Be("""
- [dotnet.test.runner]
- name = "Microsoft.Testing.Platform"
-
- """);
-
- mockReporter.Verify(r => r.WriteLine(LocalizableStrings.PostAction_CreateDotnetConfig_Succeeded), Times.Once);
- }
-
- [Fact]
- public void CreatesNewSectionWhenFileExistsButSectionDoesNot()
- {
- string targetBasePath = GetTargetPath();
- string dotnetConfigPath = Path.Combine(targetBasePath, "dotnet.config");
-
- IPostAction postAction = CreatePostActionForMTP();
- CreateDotnetConfig(dotnetConfigPath, "mysection", "mykey", "myvalue");
- Mock mockReporter = new();
-
- mockReporter.Setup(r => r.WriteLine(It.IsAny()))
- .Verifiable();
-
- Reporter.SetOutput(mockReporter.Object);
-
- CreateOrUpdateDotnetConfigPostActionProcessor processor = new();
-
- _engineEnvironmentSettings.Host.FileSystem.FileExists(dotnetConfigPath).Should().BeTrue();
- _engineEnvironmentSettings.Host.FileSystem.ReadAllText(dotnetConfigPath).Should().Be("""
- [mysection]
- mykey = "myvalue"
-
- """);
-
- bool result = processor.Process(
- _engineEnvironmentSettings,
- postAction,
- new MockCreationEffects(),
- new MockCreationResult(),
- targetBasePath);
-
- Assert.True(result);
-
- _engineEnvironmentSettings.Host.FileSystem.FileExists(dotnetConfigPath).Should().BeTrue();
- _engineEnvironmentSettings.Host.FileSystem.ReadAllText(dotnetConfigPath).Should().Be("""
- [mysection]
- mykey = "myvalue"
-
-
- [dotnet.test.runner]
- name = "Microsoft.Testing.Platform"
-
- """);
-
- mockReporter.Verify(r => r.WriteLine(LocalizableStrings.PostAction_CreateDotnetConfig_CreatedNewSection), Times.Once);
- }
-
- [Fact]
- public void DoesNothingIfNoUpdatesNeedToHappen()
- {
- string targetBasePath = GetTargetPath();
- string dotnetConfigPath = Path.Combine(targetBasePath, "dotnet.config");
-
- IPostAction postAction = CreatePostActionForMTP();
- CreateDotnetConfig(dotnetConfigPath, "dotnet.test.runner", "name", "Microsoft.Testing.Platform");
- Mock mockReporter = new();
-
- mockReporter.Setup(r => r.WriteLine(It.IsAny()))
- .Verifiable();
-
- Reporter.SetOutput(mockReporter.Object);
-
- CreateOrUpdateDotnetConfigPostActionProcessor processor = new();
-
- _engineEnvironmentSettings.Host.FileSystem.FileExists(dotnetConfigPath).Should().BeTrue();
- _engineEnvironmentSettings.Host.FileSystem.ReadAllText(dotnetConfigPath).Should().Be("""
- [dotnet.test.runner]
- name = "Microsoft.Testing.Platform"
-
- """);
-
- bool result = processor.Process(
- _engineEnvironmentSettings,
- postAction,
- new MockCreationEffects(),
- new MockCreationResult(),
- targetBasePath);
-
- Assert.True(result);
-
- _engineEnvironmentSettings.Host.FileSystem.FileExists(dotnetConfigPath).Should().BeTrue();
- _engineEnvironmentSettings.Host.FileSystem.ReadAllText(dotnetConfigPath).Should().Be("""
- [dotnet.test.runner]
- name = "Microsoft.Testing.Platform"
-
- """);
-
- mockReporter.Verify(r => r.WriteLine(LocalizableStrings.PostAction_CreateDotnetConfig_ValueAlreadyExist), Times.Once);
- }
-
- private static IPostAction CreatePostActionForMTP()
- => new MockPostAction(default, default, default, default, default!)
- {
- ActionId = CreateOrUpdateDotnetConfigPostActionProcessor.ActionProcessorId,
- Args = new Dictionary
- {
- ["section"] = "dotnet.test.runner",
- ["key"] = "name",
- ["value"] = "Microsoft.Testing.Platform",
- },
- };
-
- private void CreateDotnetConfig(string dotnetConfigPath, string section, string key, string value)
- => _engineEnvironmentSettings.Host.FileSystem.WriteAllText(dotnetConfigPath, $"""
- [{section}]
- {key} = "{value}"
-
- """);
-
- private string GetTargetPath([CallerMemberName] string testName = "")
- {
- string targetBasePath = Path.Combine(_engineEnvironmentSettings.GetTempVirtualizedPath(), testName);
- _engineEnvironmentSettings.Host.FileSystem.CreateDirectory(targetBasePath);
-
- // This is done to not let the preprocessor logic go above our base path directory.
- _engineEnvironmentSettings.Host.FileSystem.CreateDirectory(Path.Combine(targetBasePath, ".git"));
- return targetBasePath;
- }
-}
diff --git a/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/CreateOrUpdateDotnetConfig/AddNewSection/.template.config/template.json b/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/CreateOrUpdateDotnetConfig/AddNewSection/.template.config/template.json
deleted file mode 100644
index 18b058625a93..000000000000
--- a/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/CreateOrUpdateDotnetConfig/AddNewSection/.template.config/template.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "author": "Test Asset",
- "classifications": [ "Test Asset" ],
- "name": "TestAssets.PostActions.CreateOrUpdateDotnetConfig.AddNewSection",
- "generatorVersions": "[1.0.0.0-*)",
- "groupIdentity": "TestAssets.PostActions.CreateOrUpdateDotnetConfig.AddNewSection",
- "precedence": "100",
- "identity": "TestAssets.PostActions.CreateOrUpdateDotnetConfig.AddNewSection",
- "shortName": "TestAssets.PostActions.CreateOrUpdateDotnetConfig.AddNewSection",
- "sourceName": "AddNewSection",
- "primaryOutputs": [
- {
- "path": "AddNewSection.csproj"
- }
- ],
- "postActions": [
- {
- "description": "Add dotnet.config",
- "manualInstructions": [ { "text": "Create dotnet.config manually." } ],
- "args": {
- "section": "SectionFromTemplateJson",
- "key": "KeyFromTemplateJson",
- "value": "ValueFromTemplateJson"
- },
- "actionId": "597E7933-0D87-452C-B094-8FA0EEF7FD97",
- "continueOnError": true
- }
- ]
-}
diff --git a/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/CreateOrUpdateDotnetConfig/AddNewSection/AddNewSection.csproj b/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/CreateOrUpdateDotnetConfig/AddNewSection/AddNewSection.csproj
deleted file mode 100644
index ba7e2d463888..000000000000
--- a/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/CreateOrUpdateDotnetConfig/AddNewSection/AddNewSection.csproj
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
- Exe
- $(CurrentTargetFramework)
-
-
-
diff --git a/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/CreateOrUpdateDotnetConfig/AddNewSection/Program.cs b/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/CreateOrUpdateDotnetConfig/AddNewSection/Program.cs
deleted file mode 100644
index 38a7692a4297..000000000000
--- a/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/CreateOrUpdateDotnetConfig/AddNewSection/Program.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using System;
-using Newtonsoft.Json;
-
-namespace Basic
-{
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Hello World!");
- string result = JsonConvert.SerializeObject(new { a = "test" });
- }
- }
-}
diff --git a/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/CreateOrUpdateDotnetConfig/AddNewSection/dotnet.config b/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/CreateOrUpdateDotnetConfig/AddNewSection/dotnet.config
deleted file mode 100644
index d658b6c3fdd3..000000000000
--- a/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/CreateOrUpdateDotnetConfig/AddNewSection/dotnet.config
+++ /dev/null
@@ -1,2 +0,0 @@
-[existing-section]
-mykey = "myvalue"
\ No newline at end of file
diff --git a/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/CreateOrUpdateDotnetConfig/CreateNonExisting/.template.config/template.json b/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/CreateOrUpdateDotnetConfig/CreateNonExisting/.template.config/template.json
deleted file mode 100644
index 93c23963f8d7..000000000000
--- a/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/CreateOrUpdateDotnetConfig/CreateNonExisting/.template.config/template.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "author": "Test Asset",
- "classifications": [ "Test Asset" ],
- "name": "TestAssets.PostActions.CreateOrUpdateDotnetConfig.CreateNonExisting",
- "generatorVersions": "[1.0.0.0-*)",
- "groupIdentity": "TestAssets.PostActions.CreateOrUpdateDotnetConfig.CreateNonExisting",
- "precedence": "100",
- "identity": "TestAssets.PostActions.CreateOrUpdateDotnetConfig.CreateNonExisting",
- "shortName": "TestAssets.PostActions.CreateOrUpdateDotnetConfig.CreateNonExisting",
- "sourceName": "CreateNonExisting",
- "primaryOutputs": [
- {
- "path": "CreateNonExisting.csproj"
- }
- ],
- "postActions": [
- {
- "description": "Add dotnet.config",
- "manualInstructions": [ { "text": "Create dotnet.config manually." } ],
- "args": {
- "section": "SectionFromTemplateJson",
- "key": "KeyFromTemplateJson",
- "value": "ValueFromTemplateJson"
- },
- "actionId": "597E7933-0D87-452C-B094-8FA0EEF7FD97",
- "continueOnError": true
- }
- ]
-}
diff --git a/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/CreateOrUpdateDotnetConfig/CreateNonExisting/CreateNonExisting.csproj b/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/CreateOrUpdateDotnetConfig/CreateNonExisting/CreateNonExisting.csproj
deleted file mode 100644
index ba7e2d463888..000000000000
--- a/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/CreateOrUpdateDotnetConfig/CreateNonExisting/CreateNonExisting.csproj
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
- Exe
- $(CurrentTargetFramework)
-
-
-
diff --git a/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/CreateOrUpdateDotnetConfig/CreateNonExisting/Program.cs b/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/CreateOrUpdateDotnetConfig/CreateNonExisting/Program.cs
deleted file mode 100644
index 38a7692a4297..000000000000
--- a/test/TestAssets/TestPackages/dotnet-new/test_templates/PostActions/CreateOrUpdateDotnetConfig/CreateNonExisting/Program.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using System;
-using Newtonsoft.Json;
-
-namespace Basic
-{
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Hello World!");
- string result = JsonConvert.SerializeObject(new { a = "test" });
- }
- }
-}
diff --git a/test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/dotnet.config b/test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/dotnet.config
deleted file mode 100644
index 28daa0a28213..000000000000
--- a/test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/dotnet.config
+++ /dev/null
@@ -1,2 +0,0 @@
-[dotnet.test.runner]
-name= "Microsoft.Testing.Platform"
\ No newline at end of file
diff --git a/test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/global.json b/test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/global.json
new file mode 100644
index 000000000000..9009caf0ba8f
--- /dev/null
+++ b/test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/test/TestAssets/TestProjects/ConsoleAppDoesNothing/dotnet.config b/test/TestAssets/TestProjects/ConsoleAppDoesNothing/dotnet.config
deleted file mode 100644
index da0410e32d54..000000000000
--- a/test/TestAssets/TestProjects/ConsoleAppDoesNothing/dotnet.config
+++ /dev/null
@@ -1,2 +0,0 @@
-[dotnet.test.runner]
-name = "Microsoft.Testing.Platform"
diff --git a/test/TestAssets/TestProjects/ConsoleAppDoesNothing/global.json b/test/TestAssets/TestProjects/ConsoleAppDoesNothing/global.json
new file mode 100644
index 000000000000..9009caf0ba8f
--- /dev/null
+++ b/test/TestAssets/TestProjects/ConsoleAppDoesNothing/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/test/TestAssets/TestProjects/EmptyFolder/dotnet.config b/test/TestAssets/TestProjects/EmptyFolder/dotnet.config
deleted file mode 100644
index fcc92b88398e..000000000000
--- a/test/TestAssets/TestProjects/EmptyFolder/dotnet.config
+++ /dev/null
@@ -1,2 +0,0 @@
-[dotnet.test:runner]
-name= "Microsoft.Testing.Platform"
\ No newline at end of file
diff --git a/test/TestAssets/TestProjects/EmptyFolder/global.json b/test/TestAssets/TestProjects/EmptyFolder/global.json
new file mode 100644
index 000000000000..9009caf0ba8f
--- /dev/null
+++ b/test/TestAssets/TestProjects/EmptyFolder/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/test/TestAssets/TestProjects/HybridTestRunnerTestProjects/dotnet.config b/test/TestAssets/TestProjects/HybridTestRunnerTestProjects/dotnet.config
deleted file mode 100644
index 28daa0a28213..000000000000
--- a/test/TestAssets/TestProjects/HybridTestRunnerTestProjects/dotnet.config
+++ /dev/null
@@ -1,2 +0,0 @@
-[dotnet.test.runner]
-name= "Microsoft.Testing.Platform"
\ No newline at end of file
diff --git a/test/TestAssets/TestProjects/HybridTestRunnerTestProjects/global.json b/test/TestAssets/TestProjects/HybridTestRunnerTestProjects/global.json
new file mode 100644
index 000000000000..9009caf0ba8f
--- /dev/null
+++ b/test/TestAssets/TestProjects/HybridTestRunnerTestProjects/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/test/TestAssets/TestProjects/MSTestMetaPackageProjectWithMultipleTFMsSolution/dotnet.config b/test/TestAssets/TestProjects/MSTestMetaPackageProjectWithMultipleTFMsSolution/dotnet.config
deleted file mode 100644
index 28daa0a28213..000000000000
--- a/test/TestAssets/TestProjects/MSTestMetaPackageProjectWithMultipleTFMsSolution/dotnet.config
+++ /dev/null
@@ -1,2 +0,0 @@
-[dotnet.test.runner]
-name= "Microsoft.Testing.Platform"
\ No newline at end of file
diff --git a/test/TestAssets/TestProjects/MSTestMetaPackageProjectWithMultipleTFMsSolution/global.json b/test/TestAssets/TestProjects/MSTestMetaPackageProjectWithMultipleTFMsSolution/global.json
new file mode 100644
index 000000000000..9009caf0ba8f
--- /dev/null
+++ b/test/TestAssets/TestProjects/MSTestMetaPackageProjectWithMultipleTFMsSolution/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/test/TestAssets/TestProjects/MultiTestProjectSolutionWithDifferentFailures/dotnet.config b/test/TestAssets/TestProjects/MultiTestProjectSolutionWithDifferentFailures/dotnet.config
deleted file mode 100644
index 28daa0a28213..000000000000
--- a/test/TestAssets/TestProjects/MultiTestProjectSolutionWithDifferentFailures/dotnet.config
+++ /dev/null
@@ -1,2 +0,0 @@
-[dotnet.test.runner]
-name= "Microsoft.Testing.Platform"
\ No newline at end of file
diff --git a/test/TestAssets/TestProjects/MultiTestProjectSolutionWithDifferentFailures/global.json b/test/TestAssets/TestProjects/MultiTestProjectSolutionWithDifferentFailures/global.json
new file mode 100644
index 000000000000..9009caf0ba8f
--- /dev/null
+++ b/test/TestAssets/TestProjects/MultiTestProjectSolutionWithDifferentFailures/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/test/TestAssets/TestProjects/MultiTestProjectSolutionWithDiscoveredTests/dotnet.config b/test/TestAssets/TestProjects/MultiTestProjectSolutionWithDiscoveredTests/dotnet.config
deleted file mode 100644
index 28daa0a28213..000000000000
--- a/test/TestAssets/TestProjects/MultiTestProjectSolutionWithDiscoveredTests/dotnet.config
+++ /dev/null
@@ -1,2 +0,0 @@
-[dotnet.test.runner]
-name= "Microsoft.Testing.Platform"
\ No newline at end of file
diff --git a/test/TestAssets/TestProjects/MultiTestProjectSolutionWithDiscoveredTests/global.json b/test/TestAssets/TestProjects/MultiTestProjectSolutionWithDiscoveredTests/global.json
new file mode 100644
index 000000000000..9009caf0ba8f
--- /dev/null
+++ b/test/TestAssets/TestProjects/MultiTestProjectSolutionWithDiscoveredTests/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/test/TestAssets/TestProjects/MultiTestProjectSolutionWithTests/dotnet.config b/test/TestAssets/TestProjects/MultiTestProjectSolutionWithTests/dotnet.config
deleted file mode 100644
index 28daa0a28213..000000000000
--- a/test/TestAssets/TestProjects/MultiTestProjectSolutionWithTests/dotnet.config
+++ /dev/null
@@ -1,2 +0,0 @@
-[dotnet.test.runner]
-name= "Microsoft.Testing.Platform"
\ No newline at end of file
diff --git a/test/TestAssets/TestProjects/MultiTestProjectSolutionWithTests/global.json b/test/TestAssets/TestProjects/MultiTestProjectSolutionWithTests/global.json
new file mode 100644
index 000000000000..9009caf0ba8f
--- /dev/null
+++ b/test/TestAssets/TestProjects/MultiTestProjectSolutionWithTests/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/test/TestAssets/TestProjects/MultipleTestProjectSolution/dotnet.config b/test/TestAssets/TestProjects/MultipleTestProjectSolution/dotnet.config
deleted file mode 100644
index 28daa0a28213..000000000000
--- a/test/TestAssets/TestProjects/MultipleTestProjectSolution/dotnet.config
+++ /dev/null
@@ -1,2 +0,0 @@
-[dotnet.test.runner]
-name= "Microsoft.Testing.Platform"
\ No newline at end of file
diff --git a/test/TestAssets/TestProjects/MultipleTestProjectSolution/global.json b/test/TestAssets/TestProjects/MultipleTestProjectSolution/global.json
new file mode 100644
index 000000000000..9009caf0ba8f
--- /dev/null
+++ b/test/TestAssets/TestProjects/MultipleTestProjectSolution/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/test/TestAssets/TestProjects/MultipleTestProjectsWithoutSolution/dotnet.config b/test/TestAssets/TestProjects/MultipleTestProjectsWithoutSolution/dotnet.config
deleted file mode 100644
index 28daa0a28213..000000000000
--- a/test/TestAssets/TestProjects/MultipleTestProjectsWithoutSolution/dotnet.config
+++ /dev/null
@@ -1,2 +0,0 @@
-[dotnet.test.runner]
-name= "Microsoft.Testing.Platform"
\ No newline at end of file
diff --git a/test/TestAssets/TestProjects/MultipleTestProjectsWithoutSolution/global.json b/test/TestAssets/TestProjects/MultipleTestProjectsWithoutSolution/global.json
new file mode 100644
index 000000000000..9009caf0ba8f
--- /dev/null
+++ b/test/TestAssets/TestProjects/MultipleTestProjectsWithoutSolution/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/test/TestAssets/TestProjects/ProjectSolutionForMultipleTFMs/dotnet.config b/test/TestAssets/TestProjects/ProjectSolutionForMultipleTFMs/dotnet.config
deleted file mode 100644
index 28daa0a28213..000000000000
--- a/test/TestAssets/TestProjects/ProjectSolutionForMultipleTFMs/dotnet.config
+++ /dev/null
@@ -1,2 +0,0 @@
-[dotnet.test.runner]
-name= "Microsoft.Testing.Platform"
\ No newline at end of file
diff --git a/test/TestAssets/TestProjects/ProjectSolutionForMultipleTFMs/global.json b/test/TestAssets/TestProjects/ProjectSolutionForMultipleTFMs/global.json
new file mode 100644
index 000000000000..9009caf0ba8f
--- /dev/null
+++ b/test/TestAssets/TestProjects/ProjectSolutionForMultipleTFMs/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/test/TestAssets/TestProjects/TestAppPrintingCommandLineArguments/dotnet.config b/test/TestAssets/TestProjects/TestAppPrintingCommandLineArguments/dotnet.config
deleted file mode 100644
index 28daa0a28213..000000000000
--- a/test/TestAssets/TestProjects/TestAppPrintingCommandLineArguments/dotnet.config
+++ /dev/null
@@ -1,2 +0,0 @@
-[dotnet.test.runner]
-name= "Microsoft.Testing.Platform"
\ No newline at end of file
diff --git a/test/TestAssets/TestProjects/TestAppPrintingCommandLineArguments/global.json b/test/TestAssets/TestProjects/TestAppPrintingCommandLineArguments/global.json
new file mode 100644
index 000000000000..9009caf0ba8f
--- /dev/null
+++ b/test/TestAssets/TestProjects/TestAppPrintingCommandLineArguments/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/test/TestAssets/TestProjects/TestAppSimpleWithRetry/dotnet.config b/test/TestAssets/TestProjects/TestAppSimpleWithRetry/dotnet.config
deleted file mode 100644
index 28daa0a28213..000000000000
--- a/test/TestAssets/TestProjects/TestAppSimpleWithRetry/dotnet.config
+++ /dev/null
@@ -1,2 +0,0 @@
-[dotnet.test.runner]
-name= "Microsoft.Testing.Platform"
\ No newline at end of file
diff --git a/test/TestAssets/TestProjects/TestAppSimpleWithRetry/global.json b/test/TestAssets/TestProjects/TestAppSimpleWithRetry/global.json
new file mode 100644
index 000000000000..9009caf0ba8f
--- /dev/null
+++ b/test/TestAssets/TestProjects/TestAppSimpleWithRetry/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/test/TestAssets/TestProjects/TestProjectMTPCrash/TestProject1/Program.cs b/test/TestAssets/TestProjects/TestProjectMTPCrash/TestProject1/Program.cs
new file mode 100644
index 000000000000..5e36b81a7a0c
--- /dev/null
+++ b/test/TestAssets/TestProjects/TestProjectMTPCrash/TestProject1/Program.cs
@@ -0,0 +1,47 @@
+using Microsoft.Testing.Platform.Builder;
+using Microsoft.Testing.Platform.Capabilities.TestFramework;
+using Microsoft.Testing.Platform.Extensions.Messages;
+using Microsoft.Testing.Platform.Extensions.TestFramework;
+
+var testApplicationBuilder = await TestApplication.CreateBuilderAsync(args);
+
+testApplicationBuilder.RegisterTestFramework(_ => new TestFrameworkCapabilities(), (_, __) => new DummyTestAdapter());
+
+using var testApplication = await testApplicationBuilder.BuildAsync();
+return await testApplication.RunAsync();
+
+public class DummyTestAdapter : ITestFramework, IDataProducer
+{
+ public string Uid => nameof(DummyTestAdapter);
+
+ public string Version => "2.0.0";
+
+ public string DisplayName => nameof(DummyTestAdapter);
+
+ public string Description => nameof(DummyTestAdapter);
+
+ public Task IsEnabledAsync() => Task.FromResult(true);
+
+ public Type[] DataTypesProduced => [typeof(TestNodeUpdateMessage)];
+ public Task CreateTestSessionAsync(CreateTestSessionContext context)
+ => Task.FromResult(new CreateTestSessionResult() { IsSuccess = true });
+
+ public Task CloseTestSessionAsync(CloseTestSessionContext context)
+ => Task.FromResult(new CloseTestSessionResult() { IsSuccess = true });
+
+ public async Task ExecuteRequestAsync(ExecuteRequestContext context)
+ {
+ await context.MessageBus.PublishAsync(this, new TestNodeUpdateMessage(context.Request.Session.SessionUid, new TestNode()
+ {
+ Uid = $"Test1",
+ DisplayName = $"Test1",
+ Properties = new PropertyBag(PassedTestNodeStateProperty.CachedInstance),
+ }));
+
+ await Task.Delay(1000);
+
+ Environment.Exit(0);
+
+ context.Complete();
+ }
+}
\ No newline at end of file
diff --git a/test/TestAssets/TestProjects/TestProjectMTPCrash/TestProject1/TestProject1.csproj b/test/TestAssets/TestProjects/TestProjectMTPCrash/TestProject1/TestProject1.csproj
new file mode 100644
index 000000000000..9857918867b1
--- /dev/null
+++ b/test/TestAssets/TestProjects/TestProjectMTPCrash/TestProject1/TestProject1.csproj
@@ -0,0 +1,17 @@
+
+
+
+
+ $(CurrentTargetFramework)
+ Exe
+
+ enable
+ enable
+
+ false
+
+
+
+
+
+
diff --git a/test/TestAssets/TestProjects/TestProjectMTPCrash/TestProjectMTPCrash.sln b/test/TestAssets/TestProjects/TestProjectMTPCrash/TestProjectMTPCrash.sln
new file mode 100644
index 000000000000..aaee5bd7dc36
--- /dev/null
+++ b/test/TestAssets/TestProjects/TestProjectMTPCrash/TestProjectMTPCrash.sln
@@ -0,0 +1,34 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.0.31903.59
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestProject1", "TestProject1\TestProject1.csproj", "{3E834ED1-92D9-4454-BBB4-B1A2463E5726}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {3E834ED1-92D9-4454-BBB4-B1A2463E5726}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3E834ED1-92D9-4454-BBB4-B1A2463E5726}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3E834ED1-92D9-4454-BBB4-B1A2463E5726}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {3E834ED1-92D9-4454-BBB4-B1A2463E5726}.Debug|x64.Build.0 = Debug|Any CPU
+ {3E834ED1-92D9-4454-BBB4-B1A2463E5726}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {3E834ED1-92D9-4454-BBB4-B1A2463E5726}.Debug|x86.Build.0 = Debug|Any CPU
+ {3E834ED1-92D9-4454-BBB4-B1A2463E5726}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3E834ED1-92D9-4454-BBB4-B1A2463E5726}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3E834ED1-92D9-4454-BBB4-B1A2463E5726}.Release|x64.ActiveCfg = Release|Any CPU
+ {3E834ED1-92D9-4454-BBB4-B1A2463E5726}.Release|x64.Build.0 = Release|Any CPU
+ {3E834ED1-92D9-4454-BBB4-B1A2463E5726}.Release|x86.ActiveCfg = Release|Any CPU
+ {3E834ED1-92D9-4454-BBB4-B1A2463E5726}.Release|x86.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/test/TestAssets/TestProjects/TestProjectMTPCrash/global.json b/test/TestAssets/TestProjects/TestProjectMTPCrash/global.json
new file mode 100644
index 000000000000..9009caf0ba8f
--- /dev/null
+++ b/test/TestAssets/TestProjects/TestProjectMTPCrash/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/test/TestAssets/TestProjects/TestProjectMTPWithUseAppHostFalse/dotnet.config b/test/TestAssets/TestProjects/TestProjectMTPWithUseAppHostFalse/dotnet.config
deleted file mode 100644
index da0410e32d54..000000000000
--- a/test/TestAssets/TestProjects/TestProjectMTPWithUseAppHostFalse/dotnet.config
+++ /dev/null
@@ -1,2 +0,0 @@
-[dotnet.test.runner]
-name = "Microsoft.Testing.Platform"
diff --git a/test/TestAssets/TestProjects/TestProjectMTPWithUseAppHostFalse/global.json b/test/TestAssets/TestProjects/TestProjectMTPWithUseAppHostFalse/global.json
new file mode 100644
index 000000000000..9009caf0ba8f
--- /dev/null
+++ b/test/TestAssets/TestProjects/TestProjectMTPWithUseAppHostFalse/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/test/TestAssets/TestProjects/TestProjectSolution/dotnet.config b/test/TestAssets/TestProjects/TestProjectSolution/dotnet.config
deleted file mode 100644
index 28daa0a28213..000000000000
--- a/test/TestAssets/TestProjects/TestProjectSolution/dotnet.config
+++ /dev/null
@@ -1,2 +0,0 @@
-[dotnet.test.runner]
-name= "Microsoft.Testing.Platform"
\ No newline at end of file
diff --git a/test/TestAssets/TestProjects/TestProjectSolution/global.json b/test/TestAssets/TestProjects/TestProjectSolution/global.json
new file mode 100644
index 000000000000..9009caf0ba8f
--- /dev/null
+++ b/test/TestAssets/TestProjects/TestProjectSolution/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/test/TestAssets/TestProjects/TestProjectSolutionTestingMinimumExpectedTests/dotnet.config b/test/TestAssets/TestProjects/TestProjectSolutionTestingMinimumExpectedTests/dotnet.config
deleted file mode 100644
index 28daa0a28213..000000000000
--- a/test/TestAssets/TestProjects/TestProjectSolutionTestingMinimumExpectedTests/dotnet.config
+++ /dev/null
@@ -1,2 +0,0 @@
-[dotnet.test.runner]
-name= "Microsoft.Testing.Platform"
\ No newline at end of file
diff --git a/test/TestAssets/TestProjects/TestProjectSolutionTestingMinimumExpectedTests/global.json b/test/TestAssets/TestProjects/TestProjectSolutionTestingMinimumExpectedTests/global.json
new file mode 100644
index 000000000000..9009caf0ba8f
--- /dev/null
+++ b/test/TestAssets/TestProjects/TestProjectSolutionTestingMinimumExpectedTests/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/test/TestAssets/TestProjects/TestProjectSolutionWithCodeCoverage/dotnet.config b/test/TestAssets/TestProjects/TestProjectSolutionWithCodeCoverage/dotnet.config
deleted file mode 100644
index 28daa0a28213..000000000000
--- a/test/TestAssets/TestProjects/TestProjectSolutionWithCodeCoverage/dotnet.config
+++ /dev/null
@@ -1,2 +0,0 @@
-[dotnet.test.runner]
-name= "Microsoft.Testing.Platform"
\ No newline at end of file
diff --git a/test/TestAssets/TestProjects/TestProjectSolutionWithCodeCoverage/global.json b/test/TestAssets/TestProjects/TestProjectSolutionWithCodeCoverage/global.json
new file mode 100644
index 000000000000..9009caf0ba8f
--- /dev/null
+++ b/test/TestAssets/TestProjects/TestProjectSolutionWithCodeCoverage/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/test/TestAssets/TestProjects/TestProjectSolutionWithTestsAndArtifacts/dotnet.config b/test/TestAssets/TestProjects/TestProjectSolutionWithTestsAndArtifacts/dotnet.config
deleted file mode 100644
index 28daa0a28213..000000000000
--- a/test/TestAssets/TestProjects/TestProjectSolutionWithTestsAndArtifacts/dotnet.config
+++ /dev/null
@@ -1,2 +0,0 @@
-[dotnet.test.runner]
-name= "Microsoft.Testing.Platform"
\ No newline at end of file
diff --git a/test/TestAssets/TestProjects/TestProjectSolutionWithTestsAndArtifacts/global.json b/test/TestAssets/TestProjects/TestProjectSolutionWithTestsAndArtifacts/global.json
new file mode 100644
index 000000000000..9009caf0ba8f
--- /dev/null
+++ b/test/TestAssets/TestProjects/TestProjectSolutionWithTestsAndArtifacts/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/test/TestAssets/TestProjects/TestProjectWithClassLibrary/dotnet.config b/test/TestAssets/TestProjects/TestProjectWithClassLibrary/dotnet.config
deleted file mode 100644
index 28daa0a28213..000000000000
--- a/test/TestAssets/TestProjects/TestProjectWithClassLibrary/dotnet.config
+++ /dev/null
@@ -1,2 +0,0 @@
-[dotnet.test.runner]
-name= "Microsoft.Testing.Platform"
\ No newline at end of file
diff --git a/test/TestAssets/TestProjects/TestProjectWithClassLibrary/global.json b/test/TestAssets/TestProjects/TestProjectWithClassLibrary/global.json
new file mode 100644
index 000000000000..9009caf0ba8f
--- /dev/null
+++ b/test/TestAssets/TestProjects/TestProjectWithClassLibrary/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/test/TestAssets/TestProjects/TestProjectWithClassLibraryDifferentTFMs/dotnet.config b/test/TestAssets/TestProjects/TestProjectWithClassLibraryDifferentTFMs/dotnet.config
deleted file mode 100644
index 28daa0a28213..000000000000
--- a/test/TestAssets/TestProjects/TestProjectWithClassLibraryDifferentTFMs/dotnet.config
+++ /dev/null
@@ -1,2 +0,0 @@
-[dotnet.test.runner]
-name= "Microsoft.Testing.Platform"
\ No newline at end of file
diff --git a/test/TestAssets/TestProjects/TestProjectWithClassLibraryDifferentTFMs/global.json b/test/TestAssets/TestProjects/TestProjectWithClassLibraryDifferentTFMs/global.json
new file mode 100644
index 000000000000..9009caf0ba8f
--- /dev/null
+++ b/test/TestAssets/TestProjects/TestProjectWithClassLibraryDifferentTFMs/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/test/TestAssets/TestProjects/TestProjectWithConditionOnGlobalProperty/dotnet.config b/test/TestAssets/TestProjects/TestProjectWithConditionOnGlobalProperty/dotnet.config
deleted file mode 100644
index 28daa0a28213..000000000000
--- a/test/TestAssets/TestProjects/TestProjectWithConditionOnGlobalProperty/dotnet.config
+++ /dev/null
@@ -1,2 +0,0 @@
-[dotnet.test.runner]
-name= "Microsoft.Testing.Platform"
\ No newline at end of file
diff --git a/test/TestAssets/TestProjects/TestProjectWithConditionOnGlobalProperty/global.json b/test/TestAssets/TestProjects/TestProjectWithConditionOnGlobalProperty/global.json
new file mode 100644
index 000000000000..9009caf0ba8f
--- /dev/null
+++ b/test/TestAssets/TestProjects/TestProjectWithConditionOnGlobalProperty/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/test/TestAssets/TestProjects/TestProjectWithDiscoveredTests/dotnet.config b/test/TestAssets/TestProjects/TestProjectWithDiscoveredTests/dotnet.config
deleted file mode 100644
index 28daa0a28213..000000000000
--- a/test/TestAssets/TestProjects/TestProjectWithDiscoveredTests/dotnet.config
+++ /dev/null
@@ -1,2 +0,0 @@
-[dotnet.test.runner]
-name= "Microsoft.Testing.Platform"
\ No newline at end of file
diff --git a/test/TestAssets/TestProjects/TestProjectWithDiscoveredTests/global.json b/test/TestAssets/TestProjects/TestProjectWithDiscoveredTests/global.json
new file mode 100644
index 000000000000..9009caf0ba8f
--- /dev/null
+++ b/test/TestAssets/TestProjects/TestProjectWithDiscoveredTests/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/test/TestAssets/TestProjects/TestProjectWithLaunchSettings/dotnet.config b/test/TestAssets/TestProjects/TestProjectWithLaunchSettings/dotnet.config
deleted file mode 100644
index 28daa0a28213..000000000000
--- a/test/TestAssets/TestProjects/TestProjectWithLaunchSettings/dotnet.config
+++ /dev/null
@@ -1,2 +0,0 @@
-[dotnet.test.runner]
-name= "Microsoft.Testing.Platform"
\ No newline at end of file
diff --git a/test/TestAssets/TestProjects/TestProjectWithLaunchSettings/global.json b/test/TestAssets/TestProjects/TestProjectWithLaunchSettings/global.json
new file mode 100644
index 000000000000..9009caf0ba8f
--- /dev/null
+++ b/test/TestAssets/TestProjects/TestProjectWithLaunchSettings/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/test/TestAssets/TestProjects/TestProjectWithMultipleTFMsParallelization/dotnet.config b/test/TestAssets/TestProjects/TestProjectWithMultipleTFMsParallelization/dotnet.config
deleted file mode 100644
index 28daa0a28213..000000000000
--- a/test/TestAssets/TestProjects/TestProjectWithMultipleTFMsParallelization/dotnet.config
+++ /dev/null
@@ -1,2 +0,0 @@
-[dotnet.test.runner]
-name= "Microsoft.Testing.Platform"
\ No newline at end of file
diff --git a/test/TestAssets/TestProjects/TestProjectWithMultipleTFMsParallelization/global.json b/test/TestAssets/TestProjects/TestProjectWithMultipleTFMsParallelization/global.json
new file mode 100644
index 000000000000..9009caf0ba8f
--- /dev/null
+++ b/test/TestAssets/TestProjects/TestProjectWithMultipleTFMsParallelization/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/test/TestAssets/TestProjects/TestProjectWithMultipleTFMsSolution/dotnet.config b/test/TestAssets/TestProjects/TestProjectWithMultipleTFMsSolution/dotnet.config
deleted file mode 100644
index 28daa0a28213..000000000000
--- a/test/TestAssets/TestProjects/TestProjectWithMultipleTFMsSolution/dotnet.config
+++ /dev/null
@@ -1,2 +0,0 @@
-[dotnet.test.runner]
-name= "Microsoft.Testing.Platform"
\ No newline at end of file
diff --git a/test/TestAssets/TestProjects/TestProjectWithMultipleTFMsSolution/global.json b/test/TestAssets/TestProjects/TestProjectWithMultipleTFMsSolution/global.json
new file mode 100644
index 000000000000..9009caf0ba8f
--- /dev/null
+++ b/test/TestAssets/TestProjects/TestProjectWithMultipleTFMsSolution/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/test/TestAssets/TestProjects/TestProjectWithTests/dotnet.config b/test/TestAssets/TestProjects/TestProjectWithTests/dotnet.config
deleted file mode 100644
index 28daa0a28213..000000000000
--- a/test/TestAssets/TestProjects/TestProjectWithTests/dotnet.config
+++ /dev/null
@@ -1,2 +0,0 @@
-[dotnet.test.runner]
-name= "Microsoft.Testing.Platform"
\ No newline at end of file
diff --git a/test/TestAssets/TestProjects/TestProjectWithTests/global.json b/test/TestAssets/TestProjects/TestProjectWithTests/global.json
new file mode 100644
index 000000000000..9009caf0ba8f
--- /dev/null
+++ b/test/TestAssets/TestProjects/TestProjectWithTests/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
diff --git a/test/dotnet-new.IntegrationTests/Approvals/DotnetNewDetailsTest.CanDisplayDetails_InstalledPackage_LocalPackage.Linux.verified.txt b/test/dotnet-new.IntegrationTests/Approvals/DotnetNewDetailsTest.CanDisplayDetails_InstalledPackage_LocalPackage.Linux.verified.txt
index c69514a6ee7b..948efa0f8d7b 100644
--- a/test/dotnet-new.IntegrationTests/Approvals/DotnetNewDetailsTest.CanDisplayDetails_InstalledPackage_LocalPackage.Linux.verified.txt
+++ b/test/dotnet-new.IntegrationTests/Approvals/DotnetNewDetailsTest.CanDisplayDetails_InstalledPackage_LocalPackage.Linux.verified.txt
@@ -31,8 +31,6 @@
TestAssets.PostActions.AddProjectToSolution.... TestAssets.PostActions.AddProjectToSolution.BasicInSolutionRoot Test Asset
TestAssets.PostActions.AddProjectToSolution.... TestAssets.PostActions.AddProjectToSolution.BasicWithFiles Test Asset
TestAssets.PostActions.AddProjectToSolution.... TestAssets.PostActions.AddProjectToSolution.BasicWithIndexes Test Asset
- TestAssets.PostActions.CreateOrUpdateDotnetC... TestAssets.PostActions.CreateOrUpdateDotnetConfig.AddNewSection Test Asset
- TestAssets.PostActions.CreateOrUpdateDotnetC... TestAssets.PostActions.CreateOrUpdateDotnetConfig.CreateNonExisting Test Asset
TestAssets.PostActions.Instructions.Basic TestAssets.PostActions.Instructions.Basic Test Asset
TestAssets.PostActions.RestoreNuGet.Basic TestAssets.PostActions.RestoreNuGet.Basic Test Asset
TestAssets.PostActions.RestoreNuGet.BasicWit... TestAssets.PostActions.RestoreNuGet.BasicWithFiles Test Asset
diff --git a/test/dotnet-new.IntegrationTests/Approvals/DotnetNewDetailsTest.CanDisplayDetails_InstalledPackage_LocalPackage.OSX.verified.txt b/test/dotnet-new.IntegrationTests/Approvals/DotnetNewDetailsTest.CanDisplayDetails_InstalledPackage_LocalPackage.OSX.verified.txt
index c69514a6ee7b..948efa0f8d7b 100644
--- a/test/dotnet-new.IntegrationTests/Approvals/DotnetNewDetailsTest.CanDisplayDetails_InstalledPackage_LocalPackage.OSX.verified.txt
+++ b/test/dotnet-new.IntegrationTests/Approvals/DotnetNewDetailsTest.CanDisplayDetails_InstalledPackage_LocalPackage.OSX.verified.txt
@@ -31,8 +31,6 @@
TestAssets.PostActions.AddProjectToSolution.... TestAssets.PostActions.AddProjectToSolution.BasicInSolutionRoot Test Asset
TestAssets.PostActions.AddProjectToSolution.... TestAssets.PostActions.AddProjectToSolution.BasicWithFiles Test Asset
TestAssets.PostActions.AddProjectToSolution.... TestAssets.PostActions.AddProjectToSolution.BasicWithIndexes Test Asset
- TestAssets.PostActions.CreateOrUpdateDotnetC... TestAssets.PostActions.CreateOrUpdateDotnetConfig.AddNewSection Test Asset
- TestAssets.PostActions.CreateOrUpdateDotnetC... TestAssets.PostActions.CreateOrUpdateDotnetConfig.CreateNonExisting Test Asset
TestAssets.PostActions.Instructions.Basic TestAssets.PostActions.Instructions.Basic Test Asset
TestAssets.PostActions.RestoreNuGet.Basic TestAssets.PostActions.RestoreNuGet.Basic Test Asset
TestAssets.PostActions.RestoreNuGet.BasicWit... TestAssets.PostActions.RestoreNuGet.BasicWithFiles Test Asset
diff --git a/test/dotnet-new.IntegrationTests/Approvals/DotnetNewDetailsTest.CanDisplayDetails_InstalledPackage_LocalPackage.Windows.verified.txt b/test/dotnet-new.IntegrationTests/Approvals/DotnetNewDetailsTest.CanDisplayDetails_InstalledPackage_LocalPackage.Windows.verified.txt
index f2c16d05d10d..8f48b106823e 100644
--- a/test/dotnet-new.IntegrationTests/Approvals/DotnetNewDetailsTest.CanDisplayDetails_InstalledPackage_LocalPackage.Windows.verified.txt
+++ b/test/dotnet-new.IntegrationTests/Approvals/DotnetNewDetailsTest.CanDisplayDetails_InstalledPackage_LocalPackage.Windows.verified.txt
@@ -31,8 +31,6 @@
TestAssets.PostActions.AddProjectToSolution.... TestAssets.PostActions.AddProjectToSolution.BasicWithFiles Test Asset
TestAssets.PostActions.AddProjectToSolution.... TestAssets.PostActions.AddProjectToSolution.BasicWithIndexes Test Asset
TestAssets.PostActions.AddProjectToSolution.... TestAssets.PostActions.AddProjectToSolution.Basic Test Asset
- TestAssets.PostActions.CreateOrUpdateDotnetC... TestAssets.PostActions.CreateOrUpdateDotnetConfig.AddNewSection Test Asset
- TestAssets.PostActions.CreateOrUpdateDotnetC... TestAssets.PostActions.CreateOrUpdateDotnetConfig.CreateNonExisting Test Asset
TestAssets.PostActions.Instructions.Basic TestAssets.PostActions.Instructions.Basic Test Asset
TestAssets.PostActions.RestoreNuGet.BasicWit... TestAssets.PostActions.RestoreNuGet.BasicWithFiles Test Asset
TestAssets.PostActions.RestoreNuGet.Basic TestAssets.PostActions.RestoreNuGet.Basic Test Asset
diff --git a/test/dotnet-new.IntegrationTests/Approvals/DotnetNewDetailsTest.CanDisplayDetails_InstalledPackage_LocalPackage.verified.txt b/test/dotnet-new.IntegrationTests/Approvals/DotnetNewDetailsTest.CanDisplayDetails_InstalledPackage_LocalPackage.verified.txt
index 0a6b5d625e43..3264f4ecfdd7 100644
--- a/test/dotnet-new.IntegrationTests/Approvals/DotnetNewDetailsTest.CanDisplayDetails_InstalledPackage_LocalPackage.verified.txt
+++ b/test/dotnet-new.IntegrationTests/Approvals/DotnetNewDetailsTest.CanDisplayDetails_InstalledPackage_LocalPackage.verified.txt
@@ -31,8 +31,6 @@
TestAssets.PostActions.AddProjectToSolution.... TestAssets.PostActions.AddProjectToSolution.BasicWithFiles Test Asset
TestAssets.PostActions.AddProjectToSolution.... TestAssets.PostActions.AddProjectToSolution.BasicWithIndexes Test Asset
TestAssets.PostActions.AddProjectToSolution.... TestAssets.PostActions.AddProjectToSolution.Basic Test Asset
- TestAssets.PostActions.CreateOrUpdateDotnetC... TestAssets.PostActions.CreateOrUpdateDotnetConfig.AddNewSection Test Asset
- TestAssets.PostActions.CreateOrUpdateDotnetC... TestAssets.PostActions.CreateOrUpdateDotnetConfig.CreateNonExisting Test Asset
TestAssets.PostActions.Instructions.Basic TestAssets.PostActions.Instructions.Basic Test Asset
TestAssets.PostActions.RestoreNuGet.BasicWit... TestAssets.PostActions.RestoreNuGet.BasicWithFiles Test Asset
TestAssets.PostActions.RestoreNuGet.Basic TestAssets.PostActions.RestoreNuGet.Basic Test Asset
diff --git a/test/dotnet-new.IntegrationTests/DotnetNewTestTemplatesTests.cs b/test/dotnet-new.IntegrationTests/DotnetNewTestTemplatesTests.cs
index b50ea3706216..28d6cb6754e6 100644
--- a/test/dotnet-new.IntegrationTests/DotnetNewTestTemplatesTests.cs
+++ b/test/dotnet-new.IntegrationTests/DotnetNewTestTemplatesTests.cs
@@ -181,7 +181,7 @@ public void MSTestAndPlaywrightProjectTemplate_WithCoverageToolAndTestRunner_Can
string testProjectName = GenerateTestProjectName();
string outputDirectory = CreateTemporaryFolder(folderName: "Home");
- // Prevent the dotnet.config post action from walking up the directory parents up to our own solution root, which would affect other tests.
+ // Prevent the global.json post action from walking up the directory parents up to our own solution root, which would affect other tests.
Directory.CreateDirectory(Path.Combine(outputDirectory, ".git"));
string workingDirectory = CreateTemporaryFolder();
@@ -200,7 +200,7 @@ public void MSTestAndPlaywrightProjectTemplate_WithCoverageToolAndTestRunner_Can
var isMTP = testRunner == "Microsoft.Testing.Platform";
if (isMTP)
{
- File.Exists(Path.Combine(outputDirectory, "dotnet.config")).Should().BeTrue();
+ File.Exists(Path.Combine(outputDirectory, "global.json")).Should().BeTrue();
}
var result = new DotnetTestCommand(_log, false)
diff --git a/test/dotnet-new.IntegrationTests/PostActionTests.cs b/test/dotnet-new.IntegrationTests/PostActionTests.cs
index 3acada973357..3e9c6a391914 100644
--- a/test/dotnet-new.IntegrationTests/PostActionTests.cs
+++ b/test/dotnet-new.IntegrationTests/PostActionTests.cs
@@ -3,7 +3,6 @@
using System.Text.Json.Nodes;
using Microsoft.DotNet.Cli.Utils;
-using Microsoft.TemplateEngine.TestHelper;
using Microsoft.TemplateEngine.Utils;
namespace Microsoft.DotNet.Cli.New.IntegrationTests
@@ -1216,72 +1215,5 @@ public void AddJsonProperty_FailsWhenJsonFileNotFoundInEligableDirectories()
File.Delete(jsonFileLocation);
}
-
- [Fact]
- public void CreateOrUpdateDotnetConfig_CreateNonExisting()
- {
- string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/CreateOrUpdateDotnetConfig/CreateNonExisting", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path;
- string expectedTemplateName = "TestAssets.PostActions.CreateOrUpdateDotnetConfig.CreateNonExisting";
- string home = CreateTemporaryFolder(folderName: "Home");
- string workingDirectory = CreateTemporaryFolder();
- string outputDirectory = TestUtils.CreateTemporaryFolder();
- InstallTestTemplate(templateLocation, _log, home, workingDirectory);
-
- var commandResult = new DotnetNewCommand(_log, expectedTemplateName, "-n", "MyProject", "-o", outputDirectory)
- .WithCustomHive(home)
- .WithWorkingDirectory(workingDirectory)
- .Execute();
-
- commandResult
- .Should()
- .ExitWith(0)
- .And.NotHaveStdErr()
- .And.HaveStdOutContaining($"The template \"{expectedTemplateName}\" was created successfully.")
- .And.HaveStdOutContaining("Successfully created 'dotnet.config' file.")
- .And.NotHaveStdOutContaining("Manual instructions");
-
- Assert.Equal(
- """
- [SectionFromTemplateJson]
- KeyFromTemplateJson = "ValueFromTemplateJson"
-
- """,
- File.ReadAllText(Path.Combine(outputDirectory, "dotnet.config")));
- }
-
- [Fact]
- public void CreateOrUpdateDotnetConfig_AddNewSection()
- {
- string templateLocation = _testAssetsManager.CopyTestAsset("PostActions/CreateOrUpdateDotnetConfig/AddNewSection", testAssetSubdirectory: DotnetNewTestTemplatesBasePath).WithSource().Path;
- string expectedTemplateName = "TestAssets.PostActions.CreateOrUpdateDotnetConfig.AddNewSection";
- string home = CreateTemporaryFolder(folderName: "Home");
- string workingDirectory = CreateTemporaryFolder();
- string outputDirectory = TestUtils.CreateTemporaryFolder();
- InstallTestTemplate(templateLocation, _log, home, workingDirectory);
-
- var commandResult = new DotnetNewCommand(_log, expectedTemplateName, "-n", "MyProject", "-o", outputDirectory)
- .WithCustomHive(home)
- .WithWorkingDirectory(workingDirectory)
- .Execute();
-
- commandResult
- .Should()
- .ExitWith(0)
- .And.NotHaveStdErr()
- .And.HaveStdOutContaining($"The template \"{expectedTemplateName}\" was created successfully.")
- .And.HaveStdOutContaining("Created new section in 'dotnet.config' file")
- .And.NotHaveStdOutContaining("Manual instructions");
-
- Assert.Equal(
- """
- [existing-section]
- mykey = "myvalue"
-
- [SectionFromTemplateJson]
- KeyFromTemplateJson = "ValueFromTemplateJson"
-
- """,
- File.ReadAllText(Path.Combine(outputDirectory, "dotnet.config")));
- }
}
}
diff --git a/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndDiscoversTests.cs b/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndDiscoversTests.cs
index 4026f994dece..08e5ef2c95fa 100644
--- a/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndDiscoversTests.cs
+++ b/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndDiscoversTests.cs
@@ -14,10 +14,9 @@ public GivenDotnetTestBuildsAndDiscoversTests(ITestOutputHelper log) : base(log)
{
}
- // https://github.com/dotnet/sdk/issues/49665
[InlineData(TestingConstants.Debug)]
[InlineData(TestingConstants.Release)]
- [PlatformSpecificTheory(TestPlatforms.Any & ~TestPlatforms.OSX)]
+ [Theory]
public void DiscoverTestProjectWithNoTests_ShouldReturnExitCodeGenericFailure(string configuration)
{
TestAsset testInstance = _testAssetsManager.CopyTestAsset("TestProjectSolution", Guid.NewGuid().ToString())
@@ -38,10 +37,9 @@ public void DiscoverTestProjectWithNoTests_ShouldReturnExitCodeGenericFailure(st
result.ExitCode.Should().Be(ExitCodes.ZeroTests);
}
- // https://github.com/dotnet/sdk/issues/49665
[InlineData(TestingConstants.Debug)]
[InlineData(TestingConstants.Release)]
- [PlatformSpecificTheory(TestPlatforms.Any & ~TestPlatforms.OSX)]
+ [Theory]
public void DiscoverMultipleTestProjectsWithNoTests_ShouldReturnExitCodeGenericFailure(string configuration)
{
TestAsset testInstance = _testAssetsManager.CopyTestAsset("MultipleTestProjectSolution", Guid.NewGuid().ToString())
@@ -62,10 +60,9 @@ public void DiscoverMultipleTestProjectsWithNoTests_ShouldReturnExitCodeGenericF
result.ExitCode.Should().Be(ExitCodes.ZeroTests);
}
- // https://github.com/dotnet/sdk/issues/49665
[InlineData(TestingConstants.Debug)]
[InlineData(TestingConstants.Release)]
- [PlatformSpecificTheory(TestPlatforms.Any & ~TestPlatforms.OSX)]
+ [Theory]
public void DiscoverTestProjectWithTests_ShouldReturnExitCodeSuccess(string configuration)
{
TestAsset testInstance = _testAssetsManager.CopyTestAsset("TestProjectWithDiscoveredTests", Guid.NewGuid().ToString())
@@ -84,10 +81,9 @@ public void DiscoverTestProjectWithTests_ShouldReturnExitCodeSuccess(string conf
result.ExitCode.Should().Be(ExitCodes.Success);
}
- // https://github.com/dotnet/sdk/issues/49665
[InlineData(TestingConstants.Debug)]
[InlineData(TestingConstants.Release)]
- [PlatformSpecificTheory(TestPlatforms.Any & ~TestPlatforms.OSX)]
+ [Theory]
public void DiscoverMultipleTestProjectsWithTests_ShouldReturnExitCodeSuccess(string configuration)
{
TestAsset testInstance = _testAssetsManager.CopyTestAsset("MultiTestProjectSolutionWithDiscoveredTests", Guid.NewGuid().ToString())
diff --git a/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTestBasedOnGlobbingFilter.cs b/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTestBasedOnGlobbingFilter.cs
index f795b1ca9f06..2a82eca0a169 100644
--- a/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTestBasedOnGlobbingFilter.cs
+++ b/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTestBasedOnGlobbingFilter.cs
@@ -13,8 +13,7 @@ public GivenDotnetTestBuildsAndRunsTestBasedOnGlobbingFilter(ITestOutputHelper l
{
}
- // https://github.com/dotnet/sdk/issues/49665
- [PlatformSpecificFact(TestPlatforms.Any & ~TestPlatforms.OSX)]
+ [Fact]
public void RunTestProjectWithFilterOfDll_ShouldReturnExitCodeSuccess()
{
TestAsset testInstance = _testAssetsManager.CopyTestAsset("TestProjectWithTests", Guid.NewGuid().ToString())
@@ -50,8 +49,7 @@ public void RunTestProjectWithFilterOfDll_ShouldReturnExitCodeSuccess()
result.ExitCode.Should().Be(ExitCodes.Success);
}
- // https://github.com/dotnet/sdk/issues/49665
- [PlatformSpecificFact(TestPlatforms.Any & ~TestPlatforms.OSX)]
+ [Fact]
public void RunTestProjectsWithFilterOfDll_ShouldReturnExitCodeGenericFailure()
{
TestAsset testInstance = _testAssetsManager.CopyTestAsset("MultiTestProjectSolutionWithTests", Guid.NewGuid().ToString())
@@ -97,8 +95,7 @@ public void RunTestProjectsWithFilterOfDll_ShouldReturnExitCodeGenericFailure()
}
- // https://github.com/dotnet/sdk/issues/49665
- [PlatformSpecificFact(TestPlatforms.Any & ~TestPlatforms.OSX)]
+ [Fact]
public void RunTestProjectWithFilterOfDllWithRootDirectory_ShouldReturnExitCodeSuccess()
{
TestAsset testInstance = _testAssetsManager.CopyTestAsset("TestProjectWithTests", Guid.NewGuid().ToString())
diff --git a/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTests.cs b/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTests.cs
index 279751a643fa..25735f54c6aa 100644
--- a/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTests.cs
+++ b/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTests.cs
@@ -17,7 +17,7 @@ public GivenDotnetTestBuildsAndRunsTests(ITestOutputHelper log) : base(log)
[InlineData(TestingConstants.Debug)]
[InlineData(TestingConstants.Release)]
[Theory]
- public void RunTestProjectWithNoTests_ShouldReturnExitCodeGenericFailure(string configuration)
+ public void RunTestProjectWithNoTests_ShouldReturnExitCodeZeroTests(string configuration)
{
TestAsset testInstance = _testAssetsManager.CopyTestAsset("TestProjectSolution", Guid.NewGuid().ToString())
.WithSource();
@@ -69,7 +69,7 @@ public void RunTestProjectWithWithRetryFeature_ShouldSucceed(string configuratio
[InlineData(TestingConstants.Debug)]
[InlineData(TestingConstants.Release)]
[Theory]
- public void RunMultipleTestProjectsWithNoTests_ShouldReturnExitCodeGenericFailure(string configuration)
+ public void RunMultipleTestProjectsWithNoTests_ShouldReturnExitCodeZeroTests(string configuration)
{
TestAsset testInstance = _testAssetsManager.CopyTestAsset("MultipleTestProjectSolution", Guid.NewGuid().ToString())
.WithSource();
@@ -192,7 +192,7 @@ public void RunTestProjectWithTestsAndNoLaunchSettingsArguments_ShouldReturnExit
[InlineData(TestingConstants.Debug)]
[InlineData(TestingConstants.Release)]
[Theory]
- public void RunMultipleTestProjectsWithFailingTests_ShouldReturnExitCodeGenericFailure(string configuration)
+ public void RunMultipleTestProjectsWithFailingTests_ShouldReturnExitCodeAtLeastOneTestFailed(string configuration)
{
TestAsset testInstance = _testAssetsManager.CopyTestAsset("MultiTestProjectSolutionWithTests", Guid.NewGuid().ToString())
.WithSource();
@@ -214,10 +214,9 @@ public void RunMultipleTestProjectsWithFailingTests_ShouldReturnExitCodeGenericF
result.ExitCode.Should().Be(ExitCodes.AtLeastOneTestFailed);
}
- // https://github.com/dotnet/sdk/issues/49665
[InlineData(TestingConstants.Debug)]
[InlineData(TestingConstants.Release)]
- [PlatformSpecificTheory(TestPlatforms.Any & ~TestPlatforms.OSX)]
+ [Theory]
public void RunMultipleTestProjectsWithDifferentFailures_ShouldReturnExitCodeGenericFailure(string configuration)
{
TestAsset testInstance = _testAssetsManager.CopyTestAsset("MultiTestProjectSolutionWithDifferentFailures", Guid.NewGuid().ToString())
@@ -418,7 +417,7 @@ public void RunMTPProjectWithUseAppHostFalse_ShouldWork()
.Execute();
// Verify the test runs successfully with UseAppHost=false
- result.ExitCode.Should().Be(0);
+ result.ExitCode.Should().Be(ExitCodes.Success);
}
[Theory]
@@ -439,5 +438,43 @@ public void RunMTPSolutionWithMinimumExpectedTests(string value, int expectedExi
result.ExitCode.Should().Be(expectedExitCode);
}
+
+ [Fact]
+ public void RunMTPProjectThatCrashesWithExitCodeZero_ShouldFail()
+ {
+ // The solution has two test projects. Each reports 5 tests. So, total 10 tests.
+ TestAsset testInstance = _testAssetsManager.CopyTestAsset("TestProjectMTPCrash", Guid.NewGuid().ToString())
+ .WithSource();
+
+ CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false)
+ .WithWorkingDirectory(testInstance.Path)
+ .Execute();
+
+ result.ExitCode.Should().NotBe(ExitCodes.Success);
+ if (!TestContext.IsLocalized())
+ {
+ /*
+ The following exception occurred when running the test module with RunCommand 'C:\Users\ygerges\Desktop\sdk\artifacts\tmp\Debug\testing\19cefafa-91c4---0D0799BD\TestProject1\bin\Debug\net10.0\TestProject1.exe' and RunArguments ' ':
+ System.InvalidOperationException: A test session start event was received without a corresponding test session end.
+ at Microsoft.DotNet.Cli.Commands.Test.TestApplication.RunAsync() in C:\Users\ygerges\Desktop\sdk\src\Cli\dotnet\Commands\Test\MTP\TestApplication.cs:line 55
+ at Microsoft.DotNet.Cli.Commands.Test.TestApplicationActionQueue.Read(BuildOptions buildOptions, TestOptions testOptions, TerminalTestReporter output, Action`1 onHelpRequested) in C:\Users\ygerges\Desktop\sdk\src\Cli\dotnet\Commands\Test\MTP\TestApplicationActionQueue.cs:line 68
+ */
+ result.StdErr.Should().MatchRegex("""
+ The following exception occurred when running the test module with RunCommand '.+?TestProject1(\..+?)?' and RunArguments ' ':
+ """);
+
+ result.StdErr.Should().Contain("System.InvalidOperationException: A test session start event was received without a corresponding test session end.");
+
+ // TODO: It's much better to introduce a new kind of "summary" indicating
+ // that the test app exited with zero exit code before sending test session end event
+ result.StdOut.Should().Contain("Test run summary: Passed!")
+ .And.Contain("total: 1")
+ .And.Contain("succeeded: 1")
+ .And.Contain("failed: 0")
+ .And.Contain("skipped: 0");
+
+ result.StdOut.Contains("Test run completed with non-success exit code: 1 (see: https://aka.ms/testingplatform/exitcodes)");
+ }
+ }
}
}
diff --git a/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTestsForMultipleTFMs.cs b/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTestsForMultipleTFMs.cs
index bc3f0e909b1d..ee143e52bce3 100644
--- a/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTestsForMultipleTFMs.cs
+++ b/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTestsForMultipleTFMs.cs
@@ -55,6 +55,7 @@ public void RunMultipleProjectWithDifferentTFMs_ShouldReturnExitCodeGenericFailu
}
// https://github.com/dotnet/sdk/issues/49665
+ // Failed to load /private/tmp/helix/working/A83B08FB/p/d/shared/Microsoft.NETCore.App/9.0.0/libhostpolicy.dylib, error: dlopen(/private/tmp/helix/working/A83B08FB/p/d/shared/Microsoft.NETCore.App/9.0.0/libhostpolicy.dylib, 0x0001): tried: '/private/tmp/helix/working/A83B08FB/p/d/shared/Microsoft.NETCore.App/9.0.0/libhostpolicy.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/private/tmp/helix/working/A83B08FB/p/d/shared/Microsoft.NETCore.App/9.0.0/libhostpolicy.dylib' (no such file), '/private/tmp/helix/working/A83B08FB/p/d/shared/Microsoft.NETCore.App/9.0.0/libhostpolicy.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
[InlineData(TestingConstants.Debug)]
[InlineData(TestingConstants.Release)]
[PlatformSpecificTheory(TestPlatforms.Any & ~TestPlatforms.OSX)]
@@ -142,11 +143,9 @@ public void RunProjectWithMultipleTFMs_ParallelizationTest_RunInParallelShouldFa
}
}
- // https://github.com/dotnet/sdk/issues/49665
- // Error output: Failed to load /private/tmp/helix/working/A452091E/p/d/shared/Microsoft.NETCore.App/9.0.0/libhostpolicy.dylib, error: dlopen(/private/tmp/helix/working/A452091E/p/d/shared/Microsoft.NETCore.App/9.0.0/libhostpolicy.dylib, 0x0001): tried: '/private/tmp/helix/working/A452091E/p/d/shared/Microsoft.NETCore.App/9.0.0/libhostpolicy.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')),
[InlineData(TestingConstants.Debug)]
[InlineData(TestingConstants.Release)]
- [PlatformSpecificTheory(TestPlatforms.Any & ~TestPlatforms.OSX)]
+ [Theory]
public void RunProjectWithMultipleTFMsWithArchOption_ShouldReturnExitCodeGenericFailure(string configuration)
{
TestAsset testInstance = _testAssetsManager.CopyTestAsset("TestProjectWithMultipleTFMsSolution", Guid.NewGuid().ToString())
diff --git a/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTestsWithDifferentOptions.cs b/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTestsWithDifferentOptions.cs
index 141eceae2710..dc1f77b4d357 100644
--- a/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTestsWithDifferentOptions.cs
+++ b/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTestsWithDifferentOptions.cs
@@ -34,10 +34,9 @@ public void RunWithProjectPathWithFailingTests_ShouldReturnExitCodeGenericFailur
result.ExitCode.Should().Be(ExitCodes.AtLeastOneTestFailed);
}
- // https://github.com/dotnet/sdk/issues/49665
[InlineData(TestingConstants.Debug)]
[InlineData(TestingConstants.Release)]
- [PlatformSpecificTheory(TestPlatforms.Any & ~TestPlatforms.OSX)]
+ [Theory]
public void RunWithSolutionPathWithFailingTests_ShouldReturnExitCodeGenericFailure(string configuration)
{
TestAsset testInstance = _testAssetsManager.CopyTestAsset("MultiTestProjectSolutionWithTests", Guid.NewGuid().ToString()).WithSource();
@@ -55,10 +54,9 @@ public void RunWithSolutionPathWithFailingTests_ShouldReturnExitCodeGenericFailu
result.ExitCode.Should().Be(ExitCodes.AtLeastOneTestFailed);
}
- // https://github.com/dotnet/sdk/issues/49665
[InlineData(TestingConstants.Debug)]
[InlineData(TestingConstants.Release)]
- [PlatformSpecificTheory(TestPlatforms.Any & ~TestPlatforms.OSX)]
+ [Theory]
public void RunWithSolutionFilterPathWithFailingTests_ShouldReturnExitCodeGenericFailure(string configuration)
{
TestAsset testInstance = _testAssetsManager.CopyTestAsset("MultiTestProjectSolutionWithTests", Guid.NewGuid().ToString()).WithSource();
@@ -76,10 +74,9 @@ public void RunWithSolutionFilterPathWithFailingTests_ShouldReturnExitCodeGeneri
result.ExitCode.Should().Be(ExitCodes.AtLeastOneTestFailed);
}
- // https://github.com/dotnet/sdk/issues/49665
[InlineData(TestingConstants.Debug)]
[InlineData(TestingConstants.Release)]
- [PlatformSpecificTheory(TestPlatforms.Any & ~TestPlatforms.OSX)]
+ [Theory]
public void RunWithSolutionFilterPathInOtherDirectory_ShouldReturnExitCodeGenericFailure(string configuration)
{
TestAsset testInstance = _testAssetsManager.CopyTestAsset("MultiTestProjectSolutionWithTests", Guid.NewGuid().ToString()).WithSource();
@@ -115,7 +112,7 @@ public void RunWithInvalidProjectExtension_ShouldReturnExitCodeGenericFailure(st
[InlineData(TestingConstants.Debug)]
[InlineData(TestingConstants.Release)]
- [PlatformSpecificTheory(TestPlatforms.Any & ~TestPlatforms.OSX)]
+ [Theory]
public void RunWithDirectoryAsProjectOption_ShouldReturnExitCodeGenericFailure(string configuration)
{
TestAsset testInstance = _testAssetsManager.CopyTestAsset("MultiTestProjectSolutionWithTests", Guid.NewGuid().ToString()).WithSource();
@@ -214,10 +211,9 @@ public void RunWithNonExistentSolutionPath_ShouldReturnExitCodeGenericFailure(st
result.ExitCode.Should().Be(ExitCodes.GenericFailure);
}
- // https://github.com/dotnet/sdk/issues/49665
[InlineData(TestingConstants.Debug)]
[InlineData(TestingConstants.Release)]
- [PlatformSpecificTheory(TestPlatforms.Any & ~TestPlatforms.OSX)]
+ [Theory]
public void RunTestProjectWithArchOption_ShouldReturnExitCodeSuccess(string configuration)
{
TestAsset testInstance = _testAssetsManager.CopyTestAsset("TestProjectWithTests", Guid.NewGuid().ToString()).WithSource();
@@ -235,10 +231,9 @@ public void RunTestProjectWithArchOption_ShouldReturnExitCodeSuccess(string conf
result.ExitCode.Should().Be(ExitCodes.Success);
}
- // https://github.com/dotnet/sdk/issues/49665
[InlineData(TestingConstants.Debug)]
[InlineData(TestingConstants.Release)]
- [PlatformSpecificTheory(TestPlatforms.Any & ~TestPlatforms.OSX)]
+ [Theory]
public void RunTestProjectSolutionWithArchOption_NotSupported(string configuration)
{
TestAsset testInstance = _testAssetsManager.CopyTestAsset("TestProjectSolution", Guid.NewGuid().ToString()).WithSource();
@@ -262,6 +257,7 @@ public void RunTestProjectSolutionWithArchOption_NotSupported(string configurati
}
// https://github.com/dotnet/sdk/issues/49665
+ // Failed to load /private/tmp/helix/working/A83B08FB/p/d/host/fxr/10.0.0-rc.2.25427.104/libhostfxr.dylib, error: dlopen(/private/tmp/helix/working/A83B08FB/p/d/host/fxr/10.0.0-rc.2.25427.104/libhostfxr.dylib, 0x0001): tried: '/private/tmp/helix/working/A83B08FB/p/d/host/fxr/10.0.0-rc.2.25427.104/libhostfxr.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/private/tmp/helix/working/A83B08FB/p/d/host/fxr/10.0.0-rc.2.25427.104/libhostfxr.dylib' (no such file), '/private/tmp/helix/working/A83B08FB/p/d/host/fxr/10.0.0-rc.2.25427.104/libhostfxr.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
[InlineData(TestingConstants.Debug)]
[InlineData(TestingConstants.Release)]
[PlatformSpecificTheory(TestPlatforms.Any & ~TestPlatforms.OSX)]
@@ -300,10 +296,9 @@ public void RunTestProjectSolutionWithArchAndRuntimeOptions_ShouldReturnExitCode
result.ExitCode.Should().Be(ExitCodes.GenericFailure);
}
- // https://github.com/dotnet/sdk/issues/49665
[InlineData(TestingConstants.Debug)]
[InlineData(TestingConstants.Release)]
- [PlatformSpecificTheory(TestPlatforms.Any & ~TestPlatforms.OSX)]
+ [Theory]
public void RunTestProjectSolutionWithOSOption_ShouldReturnExitCodeSuccess(string configuration)
{
TestAsset testInstance = _testAssetsManager.CopyTestAsset("TestProjectWithTests", Guid.NewGuid().ToString()).WithSource();
@@ -320,10 +315,9 @@ public void RunTestProjectSolutionWithOSOption_ShouldReturnExitCodeSuccess(strin
result.ExitCode.Should().Be(ExitCodes.Success);
}
- // https://github.com/dotnet/sdk/issues/49665
[InlineData(TestingConstants.Debug)]
[InlineData(TestingConstants.Release)]
- [PlatformSpecificTheory(TestPlatforms.Any & ~TestPlatforms.OSX)]
+ [Theory]
public void RunTestProjectSolutionWithArchAndOSOptions_ShouldReturnExitCodeSuccess(string configuration)
{
TestAsset testInstance = _testAssetsManager.CopyTestAsset("TestProjectWithTests", Guid.NewGuid().ToString()).WithSource();
@@ -436,10 +430,9 @@ public void RunOnSolutionWithMSBuildArgs_ShouldReturnExitCodeGenericFailure(stri
result.ExitCode.Should().Be(ExitCodes.AtLeastOneTestFailed);
}
- // https://github.com/dotnet/sdk/issues/49665
[InlineData(TestingConstants.Debug)]
[InlineData(TestingConstants.Release)]
- [PlatformSpecificTheory(TestPlatforms.Any & ~TestPlatforms.OSX)]
+ [Theory]
public void RunTestProjectSolutionWithFrameworkOption_ShouldReturnExitCodeSuccess(string configuration)
{
TestAsset testInstance = _testAssetsManager.CopyTestAsset("TestProjectWithTests", Guid.NewGuid().ToString()).WithSource();
@@ -511,11 +504,9 @@ public void RunMultiTFMsProjectSolutionWithPreviousFramework_ShouldReturnExitCod
result.ExitCode.Should().Be(ExitCodes.GenericFailure);
}
-
- // https://github.com/dotnet/sdk/issues/49665
[InlineData(TestingConstants.Debug)]
[InlineData(TestingConstants.Release)]
- [PlatformSpecificTheory(TestPlatforms.Any & ~TestPlatforms.OSX)]
+ [Theory]
public void RunMultiTFMsProjectSolutionWithCurrentFramework_ShouldReturnExitCodeGenericFailure(string configuration)
{
TestAsset testInstance = _testAssetsManager.CopyTestAsset("TestProjectWithMultipleTFMsSolution", Guid.NewGuid().ToString()).WithSource();
diff --git a/test/dotnet.Tests/CommandTests/Test/IPCTests.cs b/test/dotnet.Tests/CommandTests/Test/IPCTests.cs
new file mode 100644
index 000000000000..124580f0f64f
--- /dev/null
+++ b/test/dotnet.Tests/CommandTests/Test/IPCTests.cs
@@ -0,0 +1,255 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.IO.Pipes;
+using Microsoft.DotNet.Cli.Commands.Test.IPC;
+using Microsoft.DotNet.Cli.Commands.Test.IPC.Models;
+using Microsoft.DotNet.Cli.Commands.Test.IPC.Serializers;
+
+namespace dotnet.Tests.CommandTests.Test;
+
+public class IPCTests
+{
+ [Fact]
+ public async Task SingleConnectionNamedPipeServer_MultipleConnection_Fails()
+ {
+ string pipeName = NamedPipeServer.GetPipeName(Guid.NewGuid().ToString("N"));
+
+ List openedPipes = [];
+ List exceptions = [];
+
+ ManualResetEventSlim waitException = new(false);
+ var waitTask = Task.Run(
+ async () =>
+ {
+ try
+ {
+ while (true)
+ {
+ var singleConnectionNamedPipeServer = new NamedPipeServer(
+ pipeName,
+ (_, _) => Task.FromResult(VoidResponse.CachedInstance),
+ maxNumberOfServerInstances: 1,
+ CancellationToken.None,
+ skipUnknownMessages: false);
+
+ await singleConnectionNamedPipeServer.WaitConnectionAsync(CancellationToken.None);
+ openedPipes.Add(singleConnectionNamedPipeServer);
+ }
+ }
+ catch (Exception ex)
+ {
+ exceptions.Add(ex);
+ waitException.Set();
+ }
+ });
+
+ var namedPipeClient1 = new NamedPipeClient(pipeName);
+ await namedPipeClient1.ConnectAsync(CancellationToken.None);
+ waitException.Wait();
+
+ var openedPipe = Assert.Single(openedPipes);
+ var exception = Assert.Single(exceptions);
+ Assert.Equal(typeof(IOException), exception.GetType());
+ Assert.Contains("All pipe instances are busy.", exception.Message);
+
+ await waitTask;
+ namedPipeClient1.Dispose();
+ openedPipe.Dispose();
+
+ // Verify double dispose
+ namedPipeClient1.Dispose();
+ openedPipe.Dispose();
+ }
+
+ // CAREFUL: This test produces random test cases.
+ // So, flakiness in this test might be an indicator to a serious product bug.
+ [Fact]
+ public async Task SingleConnectionNamedPipeServer_RequestReplySerialization_Succeeded()
+ {
+ Queue receivedMessages = new();
+ string pipeName = NamedPipeServer.GetPipeName(Guid.NewGuid().ToString("N"));
+ NamedPipeClient namedPipeClient = new(pipeName);
+ namedPipeClient.RegisterSerializer(new VoidResponseSerializer(), typeof(VoidResponse));
+ namedPipeClient.RegisterSerializer(new TextMessageSerializer(), typeof(TextMessage));
+ namedPipeClient.RegisterSerializer(new IntMessageSerializer(), typeof(IntMessage));
+ namedPipeClient.RegisterSerializer(new LongMessageSerializer(), typeof(LongMessage));
+
+ ManualResetEventSlim manualResetEventSlim = new(false);
+ var clientConnected = Task.Run(
+ async () =>
+ {
+ while (true)
+ {
+ try
+ {
+ await namedPipeClient.ConnectAsync(CancellationToken.None);
+ manualResetEventSlim.Set();
+ break;
+ }
+ catch (OperationCanceledException)
+ {
+ throw new OperationCanceledException("SingleConnectionNamedPipeServer_RequestReplySerialization_Succeeded cancellation during connect");
+ }
+ catch (Exception)
+ {
+ }
+ }
+ }, CancellationToken.None);
+ NamedPipeServer singleConnectionNamedPipeServer = new(
+ pipeName,
+ (_, request) =>
+ {
+ receivedMessages.Enqueue((BaseMessage)request);
+ return Task.FromResult(VoidResponse.CachedInstance);
+ },
+ NamedPipeServerStream.MaxAllowedServerInstances,
+ CancellationToken.None,
+ skipUnknownMessages: false);
+ singleConnectionNamedPipeServer.RegisterSerializer(new VoidResponseSerializer(), typeof(VoidResponse));
+ singleConnectionNamedPipeServer.RegisterSerializer(new TextMessageSerializer(), typeof(TextMessage));
+ singleConnectionNamedPipeServer.RegisterSerializer(new IntMessageSerializer(), typeof(IntMessage));
+ singleConnectionNamedPipeServer.RegisterSerializer(new LongMessageSerializer(), typeof(LongMessage));
+ await singleConnectionNamedPipeServer.WaitConnectionAsync(CancellationToken.None);
+ manualResetEventSlim.Wait();
+
+ await clientConnected;
+
+ await namedPipeClient.RequestReplyAsync(new IntMessage(10), CancellationToken.None);
+ Assert.Equal(new IntMessage(10), receivedMessages.Dequeue());
+
+ await namedPipeClient.RequestReplyAsync(new LongMessage(11), CancellationToken.None);
+ Assert.Equal(new LongMessage(11), receivedMessages.Dequeue());
+
+ for (int i = 0; i < 100; i++)
+ {
+ await AssertWithLengthAsync(Random.Shared.Next(1024, 1024 * 1024 * 2));
+ }
+
+ // NOTE: 250000 is the buffer size of NamedPipeServer.
+ // We explicitly test around this size (and multiple of it) as most potential bugs can be around it.
+ for (int multiple = 1; multiple <= 3; multiple++)
+ {
+ const int namedPipeServerBufferSize = 250000;
+ int minLength = namedPipeServerBufferSize * multiple - 1000;
+ int maxLength = namedPipeServerBufferSize * multiple + 1000;
+ for (int randomLength = minLength; randomLength <= maxLength; randomLength++)
+ {
+ await AssertWithLengthAsync(randomLength);
+ }
+ }
+
+ namedPipeClient.Dispose();
+ singleConnectionNamedPipeServer.Dispose();
+
+ async Task AssertWithLengthAsync(int length)
+ {
+ string currentString = RandomString(length);
+ await namedPipeClient.RequestReplyAsync(new TextMessage(currentString), CancellationToken.None);
+ Assert.Single(receivedMessages);
+ Assert.Equal(new TextMessage(currentString), receivedMessages.Dequeue());
+ }
+ }
+
+ [Fact]
+ public async Task ConnectionNamedPipeServer_MultipleConnection_Succeeds()
+ {
+ string pipeName = NamedPipeServer.GetPipeName(Guid.NewGuid().ToString("N"));
+
+ List pipes = [];
+ for (int i = 0; i < 3; i++)
+ {
+ pipes.Add(new NamedPipeServer(
+ pipeName,
+ (_, _) => Task.FromResult(VoidResponse.CachedInstance),
+ maxNumberOfServerInstances: 3,
+ CancellationToken.None,
+ skipUnknownMessages: false));
+ }
+
+ IOException exception = Assert.Throws(() =>
+ new NamedPipeServer(
+ pipeName,
+ (_, _) => Task.FromResult(VoidResponse.CachedInstance),
+ maxNumberOfServerInstances: 3,
+ CancellationToken.None,
+ skipUnknownMessages: false));
+ Assert.Contains("All pipe instances are busy.", exception.Message);
+
+ List waitConnectionTask = [];
+ int connectionCompleted = 0;
+ foreach (NamedPipeServer namedPipeServer in pipes)
+ {
+ waitConnectionTask.Add(Task.Run(
+ async () =>
+ {
+ await namedPipeServer.WaitConnectionAsync(CancellationToken.None);
+ Interlocked.Increment(ref connectionCompleted);
+ }, CancellationToken.None));
+ }
+
+ List connectedClients = [];
+ for (int i = 0; i < waitConnectionTask.Count; i++)
+ {
+ var namedPipeClient = new NamedPipeClient(pipeName);
+ connectedClients.Add(namedPipeClient);
+ await namedPipeClient.ConnectAsync(CancellationToken.None);
+ }
+
+ await Task.WhenAll([.. waitConnectionTask]);
+
+ Assert.Equal(3, connectionCompleted);
+
+ foreach (NamedPipeClient namedPipeClient in connectedClients)
+ {
+ namedPipeClient.Dispose();
+ }
+
+ foreach (NamedPipeServer namedPipeServer in pipes)
+ {
+ namedPipeServer.Dispose();
+ }
+ }
+
+ private static string RandomString(int length)
+ {
+ const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
+ return new string([.. Enumerable.Repeat(chars, length).Select(s => s[Random.Shared.Next(s.Length)])]);
+ }
+
+ private abstract record BaseMessage : IRequest;
+
+ private sealed record TextMessage(string Text) : BaseMessage;
+
+ private sealed class TextMessageSerializer : BaseSerializer, INamedPipeSerializer
+ {
+ public int Id => 2;
+
+ public object Deserialize(Stream stream) => new TextMessage(ReadString(stream));
+
+ public void Serialize(object objectToSerialize, Stream stream) => WriteString(stream, ((TextMessage)objectToSerialize).Text);
+ }
+
+ private sealed record IntMessage(int Integer) : BaseMessage;
+
+ private sealed class IntMessageSerializer : BaseSerializer, INamedPipeSerializer
+ {
+ public int Id => 3;
+
+ public object Deserialize(Stream stream) => new IntMessage(ReadInt(stream));
+
+ public void Serialize(object objectToSerialize, Stream stream) => WriteInt(stream, ((IntMessage)objectToSerialize).Integer);
+ }
+
+ private sealed record LongMessage(long Long) : BaseMessage;
+
+ private sealed class LongMessageSerializer : BaseSerializer, INamedPipeSerializer
+ {
+ public int Id => 4;
+
+ public object Deserialize(Stream stream) => new LongMessage(ReadInt(stream));
+
+ public void Serialize(object objectToSerialize, Stream stream) => WriteLong(stream, ((LongMessage)objectToSerialize).Long);
+ }
+
+}
diff --git a/test/dotnet.Tests/CommandTests/Test/NamedPipeClient.cs b/test/dotnet.Tests/CommandTests/Test/NamedPipeClient.cs
new file mode 100644
index 000000000000..531ba8d08163
--- /dev/null
+++ b/test/dotnet.Tests/CommandTests/Test/NamedPipeClient.cs
@@ -0,0 +1,190 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+namespace dotnet.Tests.CommandTests.Test;
+
+using System.Buffers;
+using System.IO.Pipes;
+using Microsoft.DotNet.Cli.Commands.Test.IPC;
+
+internal sealed class NamedPipeClient : NamedPipeBase
+{
+ private readonly NamedPipeClientStream _namedPipeClientStream;
+ private readonly SemaphoreSlim _lock = new(1, 1);
+
+ private readonly MemoryStream _serializationBuffer = new();
+ private readonly MemoryStream _messageBuffer = new();
+ private readonly byte[] _readBuffer = new byte[250000];
+
+ private bool _disposed;
+
+ public NamedPipeClient(string name)
+ {
+ _namedPipeClientStream = new(".", name, PipeDirection.InOut, PipeOptions.CurrentUserOnly);
+ PipeName = name;
+ }
+
+ public string PipeName { get; }
+
+ public async Task ConnectAsync(CancellationToken cancellationToken)
+ => await _namedPipeClientStream.ConnectAsync(cancellationToken).ConfigureAwait(false);
+
+ public async Task RequestReplyAsync(TRequest request, CancellationToken cancellationToken)
+ where TRequest : IRequest
+ where TResponse : IResponse
+ {
+ await _lock.WaitAsync(cancellationToken).ConfigureAwait(false);
+ try
+ {
+ INamedPipeSerializer requestNamedPipeSerializer = GetSerializer(typeof(TRequest));
+
+ // Ask to serialize the body
+ _serializationBuffer.Position = 0;
+ requestNamedPipeSerializer.Serialize(request, _serializationBuffer);
+
+ // Write the message size
+ _messageBuffer.Position = 0;
+
+ // The length of the message is the size of the message plus one byte to store the serializer id
+ // Space for the message
+ int sizeOfTheWholeMessage = (int)_serializationBuffer.Position;
+
+ // Space for the serializer id
+ sizeOfTheWholeMessage += sizeof(int);
+
+ // Write the message size
+ byte[] bytes = ArrayPool.Shared.Rent(sizeof(int));
+ try
+ {
+ BitConverter.TryWriteBytes(bytes, sizeOfTheWholeMessage);
+ await _messageBuffer.WriteAsync(bytes.AsMemory(0, sizeof(int)), cancellationToken).ConfigureAwait(false);
+ }
+ finally
+ {
+ ArrayPool.Shared.Return(bytes);
+ }
+
+ // Write the serializer id
+ bytes = ArrayPool.Shared.Rent(sizeof(int));
+ try
+ {
+ BitConverter.TryWriteBytes(bytes, requestNamedPipeSerializer.Id);
+ await _messageBuffer.WriteAsync(bytes.AsMemory(0, sizeof(int)), cancellationToken).ConfigureAwait(false);
+ }
+ finally
+ {
+ ArrayPool.Shared.Return(bytes);
+ }
+
+ try
+ {
+ // Write the message
+ await _messageBuffer.WriteAsync(_serializationBuffer.GetBuffer().AsMemory(0, (int)_serializationBuffer.Position), cancellationToken).ConfigureAwait(false);
+ }
+ finally
+ {
+ // Reset the serialization buffer
+ _serializationBuffer.Position = 0;
+ }
+
+ // Send the message
+ try
+ {
+ await _namedPipeClientStream.WriteAsync(_messageBuffer.GetBuffer().AsMemory(0, (int)_messageBuffer.Position), cancellationToken).ConfigureAwait(false);
+ await _namedPipeClientStream.FlushAsync(cancellationToken).ConfigureAwait(false);
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ {
+ _namedPipeClientStream.WaitForPipeDrain();
+ }
+ }
+ finally
+ {
+ // Reset the buffers
+ _messageBuffer.Position = 0;
+ _serializationBuffer.Position = 0;
+ }
+
+ // Read the response
+ int currentMessageSize = 0;
+ int missingBytesToReadOfWholeMessage = 0;
+ while (true)
+ {
+ int currentReadIndex = 0;
+ int currentReadBytes = await _namedPipeClientStream.ReadAsync(_readBuffer.AsMemory(currentReadIndex, _readBuffer.Length), cancellationToken).ConfigureAwait(false);
+
+ if (currentReadBytes == 0)
+ {
+ // We are reading a message response.
+ // If we cannot get a response, there is no way we can recover and continue executing.
+ // This can happen if the other processes gets killed or crashes while while it's sending the response.
+ // This is especially important for 'dotnet test', where the user can simply kill the dotnet.exe process themselves.
+ // In that case, we want the MTP process to also die.
+ Environment.FailFast("[NamedPipeClient] Connection lost with the other side.");
+ }
+
+ // Reset the current chunk size
+ int missingBytesToReadOfCurrentChunk = currentReadBytes;
+
+ // If currentRequestSize is 0, we need to read the message size
+ if (currentMessageSize == 0)
+ {
+ // We need to read the message size, first 4 bytes
+ currentMessageSize = BitConverter.ToInt32(_readBuffer, 0);
+ missingBytesToReadOfCurrentChunk = currentReadBytes - sizeof(int);
+ missingBytesToReadOfWholeMessage = currentMessageSize;
+ currentReadIndex = sizeof(int);
+ }
+
+ if (missingBytesToReadOfCurrentChunk > 0)
+ {
+ // We need to read the rest of the message
+ await _messageBuffer.WriteAsync(_readBuffer.AsMemory(currentReadIndex, missingBytesToReadOfCurrentChunk), cancellationToken).ConfigureAwait(false);
+ missingBytesToReadOfWholeMessage -= missingBytesToReadOfCurrentChunk;
+ }
+
+ // If we have read all the message, we can deserialize it
+ if (missingBytesToReadOfWholeMessage == 0)
+ {
+ // Deserialize the message
+ _messageBuffer.Position = 0;
+
+ // Get the serializer id
+ int serializerId = BitConverter.ToInt32(_messageBuffer.GetBuffer(), 0);
+
+ // Get the serializer
+ _messageBuffer.Position += sizeof(int); // Skip the serializer id
+ INamedPipeSerializer responseNamedPipeSerializer = GetSerializer(serializerId);
+
+ // Deserialize the message
+ try
+ {
+ return (TResponse)responseNamedPipeSerializer.Deserialize(_messageBuffer);
+ }
+ finally
+ {
+ // Reset the message buffer
+ _messageBuffer.Position = 0;
+ }
+ }
+ }
+ }
+ finally
+ {
+ _lock.Release();
+ }
+ }
+
+ public void Dispose()
+ {
+ if (_disposed)
+ {
+ return;
+ }
+
+ _lock.Dispose();
+ _serializationBuffer.Dispose();
+ _messageBuffer.Dispose();
+ _namedPipeClientStream.Dispose();
+ _disposed = true;
+ }
+}
diff --git a/test/dotnet.Tests/CommandTests/Test/TestCommandValidationTests.cs b/test/dotnet.Tests/CommandTests/Test/TestCommandValidationTests.cs
index d9bc689cecf5..4c8a746eebc4 100644
--- a/test/dotnet.Tests/CommandTests/Test/TestCommandValidationTests.cs
+++ b/test/dotnet.Tests/CommandTests/Test/TestCommandValidationTests.cs
@@ -21,10 +21,13 @@ public void TestCommandShouldValidateFileArgumentsAndProvideHelpfulMessages(stri
// Create the test file
var testFilePath = Path.Combine(testDir.Path, filename);
File.WriteAllText(testFilePath, "dummy content");
- File.WriteAllText(Path.Combine(testDir.Path, "dotnet.config"),
+ File.WriteAllText(Path.Combine(testDir.Path, "global.json"),
"""
- [dotnet.test.runner]
- name = Microsoft.Testing.Platform
+ {
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+ }
""");
var result = new DotnetTestCommand(Log, disableNewOutput: false)
@@ -44,10 +47,13 @@ public void TestCommandShouldValidateDirectoryArgumentAndProvideHelpfulMessage()
var testDir = _testAssetsManager.CreateTestDirectory();
var subDir = Path.Combine(testDir.Path, "test_directory");
Directory.CreateDirectory(subDir);
- File.WriteAllText(Path.Combine(testDir.Path, "dotnet.config"),
+ File.WriteAllText(Path.Combine(testDir.Path, "global.json"),
"""
- [dotnet.test.runner]
- name = Microsoft.Testing.Platform
+ {
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+ }
""");
var result = new DotnetTestCommand(Log, disableNewOutput: false)
@@ -69,10 +75,13 @@ public void TestCommandShouldValidateDllArgumentAndProvideHelpfulMessage()
// Create a dummy dll file
var dllPath = Path.Combine(testDir.Path, "test.dll");
File.WriteAllText(dllPath, "dummy dll content");
- File.WriteAllText(Path.Combine(testDir.Path, "dotnet.config"),
+ File.WriteAllText(Path.Combine(testDir.Path, "global.json"),
"""
- [dotnet.test.runner]
- name = Microsoft.Testing.Platform
+ {
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+ }
""");
var result = new DotnetTestCommand(Log, disableNewOutput: false)