From aabd8830ae41264dfe5ed6f123c63840890f9476 Mon Sep 17 00:00:00 2001 From: mariam-abdulla Date: Wed, 20 Aug 2025 16:12:55 +0200 Subject: [PATCH 1/6] Fix error message --- .../Test/SolutionAndProjectUtility.cs | 39 ++++++++++++------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/src/Cli/dotnet/Commands/Test/SolutionAndProjectUtility.cs b/src/Cli/dotnet/Commands/Test/SolutionAndProjectUtility.cs index b12dbccb0b07..11df6f7abae1 100644 --- a/src/Cli/dotnet/Commands/Test/SolutionAndProjectUtility.cs +++ b/src/Cli/dotnet/Commands/Test/SolutionAndProjectUtility.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.CommandLine; using System.Diagnostics; using Microsoft.Build.Evaluation; using Microsoft.Build.Execution; @@ -230,20 +229,34 @@ public static IEnumerable Date: Wed, 20 Aug 2025 16:22:51 +0200 Subject: [PATCH 2/6] Replace dotnet run with dotnet test for some error message --- .../dotnet/Commands/CliCommandStrings.resx | 6 +++ src/Cli/dotnet/Commands/Run/RunProperties.cs | 40 +++++++++++++++++++ .../Test/SolutionAndProjectUtility.cs | 11 ++--- .../Commands/xlf/CliCommandStrings.cs.xlf | 11 +++++ .../Commands/xlf/CliCommandStrings.de.xlf | 11 +++++ .../Commands/xlf/CliCommandStrings.es.xlf | 11 +++++ .../Commands/xlf/CliCommandStrings.fr.xlf | 11 +++++ .../Commands/xlf/CliCommandStrings.it.xlf | 11 +++++ .../Commands/xlf/CliCommandStrings.ja.xlf | 11 +++++ .../Commands/xlf/CliCommandStrings.ko.xlf | 11 +++++ .../Commands/xlf/CliCommandStrings.pl.xlf | 11 +++++ .../Commands/xlf/CliCommandStrings.pt-BR.xlf | 11 +++++ .../Commands/xlf/CliCommandStrings.ru.xlf | 11 +++++ .../Commands/xlf/CliCommandStrings.tr.xlf | 11 +++++ .../xlf/CliCommandStrings.zh-Hans.xlf | 11 +++++ .../xlf/CliCommandStrings.zh-Hant.xlf | 11 +++++ 16 files changed, 195 insertions(+), 5 deletions(-) diff --git a/src/Cli/dotnet/Commands/CliCommandStrings.resx b/src/Cli/dotnet/Commands/CliCommandStrings.resx index 4ccb8be3fdef..a00452578f09 100644 --- a/src/Cli/dotnet/Commands/CliCommandStrings.resx +++ b/src/Cli/dotnet/Commands/CliCommandStrings.resx @@ -1784,6 +1784,12 @@ The default is to publish a framework-dependent application. Ensure you have a runnable project type and ensure '{0}' supports this project. A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. The current {1} is '{2}'. + + + Unable to proceed with project '{0}'. +Ensure you have a runnable project type and ensure '{1}' supports this project. +A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. +The current {2} is '{3}'. Unable to run your project diff --git a/src/Cli/dotnet/Commands/Run/RunProperties.cs b/src/Cli/dotnet/Commands/Run/RunProperties.cs index 81e92cb88315..b8d1b6c4080f 100644 --- a/src/Cli/dotnet/Commands/Run/RunProperties.cs +++ b/src/Cli/dotnet/Commands/Run/RunProperties.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using Microsoft.Build.Execution; +using Microsoft.DotNet.Cli.Commands.Test; using Microsoft.DotNet.Cli.Utils; namespace Microsoft.DotNet.Cli.Commands.Run; @@ -46,4 +47,43 @@ internal RunProperties WithApplicationArguments(string[] applicationArgs) return this; } + + internal static RunProperties GetPropsFromProject(ProjectInstance project) + { + var result = new RunProperties( + Command: project.GetPropertyValue("RunCommand"), + Arguments: project.GetPropertyValue("RunArguments"), + WorkingDirectory: project.GetPropertyValue("RunWorkingDirectory"), + RuntimeIdentifier: project.GetPropertyValue("RuntimeIdentifier"), + DefaultAppHostRuntimeIdentifier: project.GetPropertyValue("DefaultAppHostRuntimeIdentifier"), + TargetFrameworkVersion: project.GetPropertyValue("TargetFrameworkVersion")); + + if (string.IsNullOrEmpty(result.Command)) + { + ThrowUnableToRunError(project); + } + + return result; + } + + internal static void ThrowUnableToRunError(ProjectInstance project) + { + string targetFrameworks = project.GetPropertyValue("TargetFrameworks"); + if (!string.IsNullOrEmpty(targetFrameworks)) + { + string targetFramework = project.GetPropertyValue("TargetFramework"); + if (string.IsNullOrEmpty(targetFramework)) + { + throw new GracefulException(CliCommandStrings.RunCommandExceptionUnableToRunSpecifyFramework, "--framework"); + } + } + + throw new GracefulException( + string.Format( + CliCommandStrings.TestCommandExceptionUnableToRun, + project.GetPropertyValue(ProjectProperties.ProjectFullPath), + "dotnet test", + "OutputType", + project.GetPropertyValue("OutputType"))); + } } diff --git a/src/Cli/dotnet/Commands/Test/SolutionAndProjectUtility.cs b/src/Cli/dotnet/Commands/Test/SolutionAndProjectUtility.cs index 11df6f7abae1..75db62e1884e 100644 --- a/src/Cli/dotnet/Commands/Test/SolutionAndProjectUtility.cs +++ b/src/Cli/dotnet/Commands/Test/SolutionAndProjectUtility.cs @@ -229,6 +229,8 @@ public static IEnumerableOUTPUT_DIR + + Unable to proceed with project '{0}'. +Ensure you have a runnable project type and ensure '{1}' supports this project. +A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. +The current {2} is '{3}'. + Unable to proceed with project '{0}'. +Ensure you have a runnable project type and ensure '{1}' supports this project. +A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. +The current {2} is '{3}'. + + Specifying a directory for 'dotnet test' should be via '--directory'. Zadání adresáře pro dotnet test by mělo být prostřednictvím --directory. diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf index 2e0e53e3fe2c..995dc24aa693 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf @@ -3052,6 +3052,17 @@ Ihr Projekt verwendet mehrere Zielframeworks. Geben Sie über "{0}" an, welches OUTPUT_DIR + + Unable to proceed with project '{0}'. +Ensure you have a runnable project type and ensure '{1}' supports this project. +A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. +The current {2} is '{3}'. + Unable to proceed with project '{0}'. +Ensure you have a runnable project type and ensure '{1}' supports this project. +A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. +The current {2} is '{3}'. + + Specifying a directory for 'dotnet test' should be via '--directory'. Die Angabe eines Verzeichnisses für „dotnet test“ sollte über „--directory“ erfolgen. diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.es.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.es.xlf index 0c969ba4bc2f..762511b574a4 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.es.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.es.xlf @@ -3052,6 +3052,17 @@ Su proyecto tiene como destino varias plataformas. Especifique la que quiere usa OUTPUT_DIR + + Unable to proceed with project '{0}'. +Ensure you have a runnable project type and ensure '{1}' supports this project. +A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. +The current {2} is '{3}'. + Unable to proceed with project '{0}'. +Ensure you have a runnable project type and ensure '{1}' supports this project. +A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. +The current {2} is '{3}'. + + Specifying a directory for 'dotnet test' should be via '--directory'. La especificación de un directorio para 'dotnet test' debe hacerse mediante '--directory'. diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.fr.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.fr.xlf index 0036e9a7783d..7cc6cadedae7 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.fr.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.fr.xlf @@ -3052,6 +3052,17 @@ Votre projet cible plusieurs frameworks. Spécifiez le framework à exécuter à OUTPUT_DIR + + Unable to proceed with project '{0}'. +Ensure you have a runnable project type and ensure '{1}' supports this project. +A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. +The current {2} is '{3}'. + Unable to proceed with project '{0}'. +Ensure you have a runnable project type and ensure '{1}' supports this project. +A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. +The current {2} is '{3}'. + + Specifying a directory for 'dotnet test' should be via '--directory'. La spécification d’un répertoire pour « dotnet test » doit se faire via « --directory ». diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.it.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.it.xlf index 21dc5fc1219b..6301ba82302e 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.it.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.it.xlf @@ -3052,6 +3052,17 @@ Il progetto è destinato a più framework. Specificare il framework da eseguire OUTPUT_DIR + + Unable to proceed with project '{0}'. +Ensure you have a runnable project type and ensure '{1}' supports this project. +A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. +The current {2} is '{3}'. + Unable to proceed with project '{0}'. +Ensure you have a runnable project type and ensure '{1}' supports this project. +A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. +The current {2} is '{3}'. + + Specifying a directory for 'dotnet test' should be via '--directory'. La specifica di una directory per 'dotnet test' deve avvenire tramite '--directory'. diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ja.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ja.xlf index 77dcdaf35f33..6789eecef026 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ja.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ja.xlf @@ -3052,6 +3052,17 @@ Your project targets multiple frameworks. Specify which framework to run using ' OUTPUT_DIR + + Unable to proceed with project '{0}'. +Ensure you have a runnable project type and ensure '{1}' supports this project. +A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. +The current {2} is '{3}'. + Unable to proceed with project '{0}'. +Ensure you have a runnable project type and ensure '{1}' supports this project. +A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. +The current {2} is '{3}'. + + Specifying a directory for 'dotnet test' should be via '--directory'. 'dotnet test' のディレクトリを指定するには、'--directory' を使用する必要があります。 diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ko.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ko.xlf index 4bdbdc893d6e..a7dde8214126 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ko.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ko.xlf @@ -3052,6 +3052,17 @@ Your project targets multiple frameworks. Specify which framework to run using ' OUTPUT_DIR + + Unable to proceed with project '{0}'. +Ensure you have a runnable project type and ensure '{1}' supports this project. +A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. +The current {2} is '{3}'. + Unable to proceed with project '{0}'. +Ensure you have a runnable project type and ensure '{1}' supports this project. +A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. +The current {2} is '{3}'. + + Specifying a directory for 'dotnet test' should be via '--directory'. 'dotnet test'에 대한 디렉터리를 지정하려면 '--directory'를 통해 지정해야 합니다. diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pl.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pl.xlf index 9b31c34eec71..987bdd0b2a74 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pl.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pl.xlf @@ -3052,6 +3052,17 @@ Projekt ma wiele platform docelowych. Określ platformę do uruchomienia przy u OUTPUT_DIR + + Unable to proceed with project '{0}'. +Ensure you have a runnable project type and ensure '{1}' supports this project. +A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. +The current {2} is '{3}'. + Unable to proceed with project '{0}'. +Ensure you have a runnable project type and ensure '{1}' supports this project. +A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. +The current {2} is '{3}'. + + Specifying a directory for 'dotnet test' should be via '--directory'. Określenie katalogu dla elementu „dotnet test” powinno być za pomocą katalogu „--directory”. diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pt-BR.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pt-BR.xlf index 145efc893f31..709e0cad36e5 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pt-BR.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pt-BR.xlf @@ -3052,6 +3052,17 @@ Ele tem diversas estruturas como destino. Especifique que estrutura executar usa OUTPUT_DIR + + Unable to proceed with project '{0}'. +Ensure you have a runnable project type and ensure '{1}' supports this project. +A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. +The current {2} is '{3}'. + Unable to proceed with project '{0}'. +Ensure you have a runnable project type and ensure '{1}' supports this project. +A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. +The current {2} is '{3}'. + + Specifying a directory for 'dotnet test' should be via '--directory'. A especificação de um diretório para 'dotnet test' deve ser feita por meio de '--directory'. diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ru.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ru.xlf index da246f7a9139..8a379c3201f4 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ru.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ru.xlf @@ -3052,6 +3052,17 @@ Your project targets multiple frameworks. Specify which framework to run using ' OUTPUT_DIR + + Unable to proceed with project '{0}'. +Ensure you have a runnable project type and ensure '{1}' supports this project. +A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. +The current {2} is '{3}'. + Unable to proceed with project '{0}'. +Ensure you have a runnable project type and ensure '{1}' supports this project. +A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. +The current {2} is '{3}'. + + Specifying a directory for 'dotnet test' should be via '--directory'. Указание каталога для "dotnet test" следует выполнять через "--directory". diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.tr.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.tr.xlf index 5971a8b29633..a082e7949a46 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.tr.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.tr.xlf @@ -3052,6 +3052,17 @@ Projeniz birden fazla Framework'ü hedefliyor. '{0}' kullanarak hangi Framework' OUTPUT_DIR + + Unable to proceed with project '{0}'. +Ensure you have a runnable project type and ensure '{1}' supports this project. +A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. +The current {2} is '{3}'. + Unable to proceed with project '{0}'. +Ensure you have a runnable project type and ensure '{1}' supports this project. +A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. +The current {2} is '{3}'. + + Specifying a directory for 'dotnet test' should be via '--directory'. ‘dotnet test’ için bir dizin belirtmek ‘--directory’ ile yapılmalıdır. diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hans.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hans.xlf index 38c1c296d2e6..25037649cef1 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hans.xlf @@ -3052,6 +3052,17 @@ Your project targets multiple frameworks. Specify which framework to run using ' OUTPUT_DIR + + Unable to proceed with project '{0}'. +Ensure you have a runnable project type and ensure '{1}' supports this project. +A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. +The current {2} is '{3}'. + Unable to proceed with project '{0}'. +Ensure you have a runnable project type and ensure '{1}' supports this project. +A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. +The current {2} is '{3}'. + + Specifying a directory for 'dotnet test' should be via '--directory'. 应通过 "--directory" 为 "dotnet test" 指定目录。 diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hant.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hant.xlf index 17da2429390b..52f6b5d0e634 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hant.xlf @@ -3052,6 +3052,17 @@ Your project targets multiple frameworks. Specify which framework to run using ' OUTPUT_DIR + + Unable to proceed with project '{0}'. +Ensure you have a runnable project type and ensure '{1}' supports this project. +A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. +The current {2} is '{3}'. + Unable to proceed with project '{0}'. +Ensure you have a runnable project type and ensure '{1}' supports this project. +A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. +The current {2} is '{3}'. + + Specifying a directory for 'dotnet test' should be via '--directory'. 指定 'dotnet test' 的目錄應透過 '--directory'。 From 1cb785babff2a649540927d6a2d048770097ddf0 Mon Sep 17 00:00:00 2001 From: mariam-abdulla Date: Wed, 20 Aug 2025 17:01:03 +0200 Subject: [PATCH 3/6] Add a test --- .../AnotherTestProject.csproj | 11 ++ .../AnotherTestProject/Operations.cs | 9 ++ ...yWithIsTestProjectAndOtherTestProjects.sln | 28 +++++ .../OtherTestProject/OtherTestProject.csproj | 20 ++++ .../OtherTestProject/Program.cs | 105 ++++++++++++++++++ .../dotnet.config | 2 + .../Test/GivenDotnetTestBuildsAndRunsTests.cs | 20 ++++ 7 files changed, 195 insertions(+) create mode 100644 test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/AnotherTestProject/AnotherTestProject.csproj create mode 100644 test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/AnotherTestProject/Operations.cs create mode 100644 test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects.sln create mode 100644 test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/OtherTestProject/OtherTestProject.csproj create mode 100644 test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/OtherTestProject/Program.cs create mode 100644 test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/dotnet.config diff --git a/test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/AnotherTestProject/AnotherTestProject.csproj b/test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/AnotherTestProject/AnotherTestProject.csproj new file mode 100644 index 000000000000..b1a47ffa11df --- /dev/null +++ b/test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/AnotherTestProject/AnotherTestProject.csproj @@ -0,0 +1,11 @@ + + + + + $(CurrentTargetFramework) + enable + enable + true + + + \ No newline at end of file diff --git a/test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/AnotherTestProject/Operations.cs b/test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/AnotherTestProject/Operations.cs new file mode 100644 index 000000000000..549c1916e76d --- /dev/null +++ b/test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/AnotherTestProject/Operations.cs @@ -0,0 +1,9 @@ +namespace Calculator.Core; + +public class Operations +{ + public double Add(double a, double b) => a + b; + public double Subtract(double a, double b) => a - b; + public double Multiply(double a, double b) => a * b; + public double Divide(double a, double b) => a / b; +} \ No newline at end of file diff --git a/test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects.sln b/test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects.sln new file mode 100644 index 000000000000..027f72f15fbe --- /dev/null +++ b/test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.13.35415.258 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OtherTestProject", "OtherTestProject\OtherTestProject.csproj", "{8683AE78-764B-46C2-98D4-8A3031CBA27E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AnotherTestProject", "AnotherTestProject\AnotherTestProject.csproj", "{2604B2BA-D36A-461D-9BB3-207E4253051C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8683AE78-764B-46C2-98D4-8A3031CBA27E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8683AE78-764B-46C2-98D4-8A3031CBA27E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8683AE78-764B-46C2-98D4-8A3031CBA27E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8683AE78-764B-46C2-98D4-8A3031CBA27E}.Release|Any CPU.Build.0 = Release|Any CPU + {2604B2BA-D36A-461D-9BB3-207E4253051C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2604B2BA-D36A-461D-9BB3-207E4253051C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2604B2BA-D36A-461D-9BB3-207E4253051C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2604B2BA-D36A-461D-9BB3-207E4253051C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/OtherTestProject/OtherTestProject.csproj b/test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/OtherTestProject/OtherTestProject.csproj new file mode 100644 index 000000000000..661f82496256 --- /dev/null +++ b/test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/OtherTestProject/OtherTestProject.csproj @@ -0,0 +1,20 @@ + + + + + Exe + $(CurrentTargetFramework) + enable + enable + true + + + + + + + + + + + diff --git a/test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/OtherTestProject/Program.cs b/test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/OtherTestProject/Program.cs new file mode 100644 index 000000000000..5785dc473c5b --- /dev/null +++ b/test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/OtherTestProject/Program.cs @@ -0,0 +1,105 @@ +//See https://aka.ms/new-console-template for more information + +//Opt -out telemetry + +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.AddMSTest(() => new[] { Assembly.GetEntryAssembly()! }); +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 => new[] { + typeof(TestNodeUpdateMessage), + typeof(SessionFileArtifact), + typeof(FileArtifact), }; + + 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 = "Test0", + DisplayName = "Test0", + Properties = new PropertyBag(new DiscoveredTestNodeStateProperty()), + })); + + await context.MessageBus.PublishAsync(this, new TestNodeUpdateMessage(context.Request.Session.SessionUid, new TestNode() + { + Uid = "Test0", + DisplayName = "Test0", + Properties = new PropertyBag(new PassedTestNodeStateProperty("OK")), + })); + + await context.MessageBus.PublishAsync(this, new TestNodeUpdateMessage(context.Request.Session.SessionUid, new TestNode() + { + Uid = "Test1", + DisplayName = "Test1", + Properties = new PropertyBag(new SkippedTestNodeStateProperty("OK skipped!")), + })); + + await context.MessageBus.PublishAsync(this, new TestNodeUpdateMessage(context.Request.Session.SessionUid, new TestNode() + { + Uid = "Test2", + DisplayName = "Test2", + Properties = new PropertyBag(new FailedTestNodeStateProperty(new Exception("this is a failed test"), "not OK")), + })); + + await context.MessageBus.PublishAsync(this, new TestNodeUpdateMessage(context.Request.Session.SessionUid, new TestNode() + { + Uid = "Test3", + DisplayName = "Test3", + Properties = new PropertyBag(new TimeoutTestNodeStateProperty(new Exception("this is a timeout exception"), "not OK")), + })); + + await context.MessageBus.PublishAsync(this, new TestNodeUpdateMessage(context.Request.Session.SessionUid, new TestNode() + { + Uid = "Test4", + DisplayName = "Test4", + Properties = new PropertyBag(new ErrorTestNodeStateProperty(new Exception("this is an exception"), "not OK")), + })); + + await context.MessageBus.PublishAsync(this, new TestNodeUpdateMessage(context.Request.Session.SessionUid, new TestNode() + { + Uid = "Test5", + DisplayName = "Test5", + Properties = new PropertyBag(new CancelledTestNodeStateProperty(new Exception("this is a cancelled exception"), "not OK")), + })); + + await context.MessageBus.PublishAsync(this, new FileArtifact(new FileInfo("file.txt"), "file", "file description")); + + await context.MessageBus.PublishAsync(this, new SessionFileArtifact(context.Request.Session.SessionUid, new FileInfo("sessionFile.txt"), "sessionFile", "description")); + + await context.MessageBus.PublishAsync(this, new TestNodeUpdateMessage(context.Request.Session.SessionUid, new TestNode() + { + Uid = "Test6 id", + DisplayName = "Test6", + Properties = new PropertyBag(new PassedTestNodeStateProperty("OK"), new FileArtifactProperty(new FileInfo("testNodeFile.txt"), "testNodeFile", "description")), + })); + + context.Complete(); + } +} diff --git a/test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/dotnet.config b/test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/dotnet.config new file mode 100644 index 000000000000..28daa0a28213 --- /dev/null +++ b/test/TestAssets/TestProjects/ClassLibraryWithIsTestProjectAndOtherTestProjects/dotnet.config @@ -0,0 +1,2 @@ +[dotnet.test.runner] +name= "Microsoft.Testing.Platform" \ No newline at end of file diff --git a/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTests.cs b/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTests.cs index 54476f213d0d..059d1ea06800 100644 --- a/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTests.cs +++ b/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTests.cs @@ -265,6 +265,26 @@ public void RunTestProjectsWithHybridModeTestRunners_ShouldReturnExitCodeGeneric result.ExitCode.Should().Be(ExitCodes.GenericFailure); } + [InlineData(TestingConstants.Debug)] + [InlineData(TestingConstants.Release)] + [Theory] + public void RunTestProjectsWithClassLibraryHavingIsTestProjectAndMTPProject_ShouldReturnExitCodeGenericFailure(string configuration) + { + TestAsset testInstance = _testAssetsManager.CopyTestAsset("ClassLibraryWithIsTestProjectAndOtherTestProjects", Guid.NewGuid().ToString()) + .WithSource(); + + CommandResult result = new DotnetTestCommand(Log, disableNewOutput: false) + .WithWorkingDirectory(testInstance.Path) + .Execute(TestingPlatformOptions.ConfigurationOption.Name, configuration); + + if (!TestContext.IsLocalized()) + { + result.StdOut.Should().Contain(string.Format(CliCommandStrings.CmdUnsupportedVSTestTestApplicationsDescription, "AnotherTestProject.csproj")); + } + + result.ExitCode.Should().Be(ExitCodes.GenericFailure); + } + [InlineData(TestingConstants.Debug)] [InlineData(TestingConstants.Release)] [Theory] From bf2316b843fcb5a870df902022096ea1aedd898a Mon Sep 17 00:00:00 2001 From: mariam-abdulla Date: Thu, 21 Aug 2025 13:30:07 +0200 Subject: [PATCH 4/6] Apply comments --- .../dotnet/Commands/CliCommandStrings.resx | 15 +++---- src/Cli/dotnet/Commands/Run/RunCommand.cs | 4 +- src/Cli/dotnet/Commands/Run/RunProperties.cs | 40 ------------------- .../Test/SolutionAndProjectUtility.cs | 11 +++-- .../Commands/xlf/CliCommandStrings.cs.xlf | 23 +++-------- .../Commands/xlf/CliCommandStrings.de.xlf | 23 +++-------- .../Commands/xlf/CliCommandStrings.es.xlf | 23 +++-------- .../Commands/xlf/CliCommandStrings.fr.xlf | 23 +++-------- .../Commands/xlf/CliCommandStrings.it.xlf | 23 +++-------- .../Commands/xlf/CliCommandStrings.ja.xlf | 23 +++-------- .../Commands/xlf/CliCommandStrings.ko.xlf | 23 +++-------- .../Commands/xlf/CliCommandStrings.pl.xlf | 23 +++-------- .../Commands/xlf/CliCommandStrings.pt-BR.xlf | 23 +++-------- .../Commands/xlf/CliCommandStrings.ru.xlf | 23 +++-------- .../Commands/xlf/CliCommandStrings.tr.xlf | 23 +++-------- .../xlf/CliCommandStrings.zh-Hans.xlf | 23 +++-------- .../xlf/CliCommandStrings.zh-Hant.xlf | 23 +++-------- 17 files changed, 91 insertions(+), 278 deletions(-) diff --git a/src/Cli/dotnet/Commands/CliCommandStrings.resx b/src/Cli/dotnet/Commands/CliCommandStrings.resx index a00452578f09..aa26eb501289 100644 --- a/src/Cli/dotnet/Commands/CliCommandStrings.resx +++ b/src/Cli/dotnet/Commands/CliCommandStrings.resx @@ -1780,16 +1780,13 @@ The default is to publish a framework-dependent application. Couldn't find a project to run. Ensure a project exists in {0}, or pass the path to the project using {1}. - Unable to run your project. -Ensure you have a runnable project type and ensure '{0}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {1} is '{2}'. - - Unable to proceed with project '{0}'. -Ensure you have a runnable project type and ensure '{1}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {2} is '{3}'. +Ensure you have a runnable project type. +A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +The current OutputType is '{2}'. + {0} is project file path. + {1} is dotnet framework version. + {2} is the project output type. Unable to run your project diff --git a/src/Cli/dotnet/Commands/Run/RunCommand.cs b/src/Cli/dotnet/Commands/Run/RunCommand.cs index b87c16bc78fc..d0991769c546 100644 --- a/src/Cli/dotnet/Commands/Run/RunCommand.cs +++ b/src/Cli/dotnet/Commands/Run/RunCommand.cs @@ -511,8 +511,8 @@ internal static void ThrowUnableToRunError(ProjectInstance project) throw new GracefulException( string.Format( CliCommandStrings.RunCommandExceptionUnableToRun, - "dotnet run", - "OutputType", + project.GetPropertyValue("MSBuildProjectFullPath"), + Product.TargetFrameworkVersion, project.GetPropertyValue("OutputType"))); } diff --git a/src/Cli/dotnet/Commands/Run/RunProperties.cs b/src/Cli/dotnet/Commands/Run/RunProperties.cs index b8d1b6c4080f..81e92cb88315 100644 --- a/src/Cli/dotnet/Commands/Run/RunProperties.cs +++ b/src/Cli/dotnet/Commands/Run/RunProperties.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. using Microsoft.Build.Execution; -using Microsoft.DotNet.Cli.Commands.Test; using Microsoft.DotNet.Cli.Utils; namespace Microsoft.DotNet.Cli.Commands.Run; @@ -47,43 +46,4 @@ internal RunProperties WithApplicationArguments(string[] applicationArgs) return this; } - - internal static RunProperties GetPropsFromProject(ProjectInstance project) - { - var result = new RunProperties( - Command: project.GetPropertyValue("RunCommand"), - Arguments: project.GetPropertyValue("RunArguments"), - WorkingDirectory: project.GetPropertyValue("RunWorkingDirectory"), - RuntimeIdentifier: project.GetPropertyValue("RuntimeIdentifier"), - DefaultAppHostRuntimeIdentifier: project.GetPropertyValue("DefaultAppHostRuntimeIdentifier"), - TargetFrameworkVersion: project.GetPropertyValue("TargetFrameworkVersion")); - - if (string.IsNullOrEmpty(result.Command)) - { - ThrowUnableToRunError(project); - } - - return result; - } - - internal static void ThrowUnableToRunError(ProjectInstance project) - { - string targetFrameworks = project.GetPropertyValue("TargetFrameworks"); - if (!string.IsNullOrEmpty(targetFrameworks)) - { - string targetFramework = project.GetPropertyValue("TargetFramework"); - if (string.IsNullOrEmpty(targetFramework)) - { - throw new GracefulException(CliCommandStrings.RunCommandExceptionUnableToRunSpecifyFramework, "--framework"); - } - } - - throw new GracefulException( - string.Format( - CliCommandStrings.TestCommandExceptionUnableToRun, - project.GetPropertyValue(ProjectProperties.ProjectFullPath), - "dotnet test", - "OutputType", - project.GetPropertyValue("OutputType"))); - } } diff --git a/src/Cli/dotnet/Commands/Test/SolutionAndProjectUtility.cs b/src/Cli/dotnet/Commands/Test/SolutionAndProjectUtility.cs index 75db62e1884e..37c257687e1e 100644 --- a/src/Cli/dotnet/Commands/Test/SolutionAndProjectUtility.cs +++ b/src/Cli/dotnet/Commands/Test/SolutionAndProjectUtility.cs @@ -229,7 +229,7 @@ public static IEnumerable - Unable to run your project. -Ensure you have a runnable project type and ensure '{0}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {1} is '{2}'. - Projekt se nedá spustit. + Unable to proceed with project '{0}'. +Ensure you have a runnable project type. +A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +The current OutputType is '{2}'. + Projekt se nedá spustit. Ověřte prosím, že máte spustitelný typ projektu, a zajistěte, aby tento projekt podporoval {0}. Cílem spustitelného projektu by mělo být TFM (například net5.0) a jeho OutputType by měl být Exe. Aktuální {1} je {2}. - + {0} is project file path. Unable to run your project @@ -3052,17 +3052,6 @@ Cílem projektu je více architektur. Pomocí parametru {0} určete, která arch OUTPUT_DIR - - Unable to proceed with project '{0}'. -Ensure you have a runnable project type and ensure '{1}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {2} is '{3}'. - Unable to proceed with project '{0}'. -Ensure you have a runnable project type and ensure '{1}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {2} is '{3}'. - - Specifying a directory for 'dotnet test' should be via '--directory'. Zadání adresáře pro dotnet test by mělo být prostřednictvím --directory. diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf index 995dc24aa693..3c46a1e0565d 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf @@ -2678,15 +2678,15 @@ Standardmäßig wird eine Framework-abhängige Anwendung veröffentlicht. - Unable to run your project. -Ensure you have a runnable project type and ensure '{0}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {1} is '{2}'. - Ihr Projekt kann nicht ausgeführt werden. + Unable to proceed with project '{0}'. +Ensure you have a runnable project type. +A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +The current OutputType is '{2}'. + Ihr Projekt kann nicht ausgeführt werden. Stellen Sie sicher, dass der Projekttyp ausführbar ist und "{0}" dieses Projekt unterstützt. Ein ausführbares Projekt muss ein ausführbares TFM (z. B. net5.0) und den OutputType "Exe" verwenden. {1} lautet aktuell "{2}". - + {0} is project file path. Unable to run your project @@ -3052,17 +3052,6 @@ Ihr Projekt verwendet mehrere Zielframeworks. Geben Sie über "{0}" an, welches OUTPUT_DIR - - Unable to proceed with project '{0}'. -Ensure you have a runnable project type and ensure '{1}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {2} is '{3}'. - Unable to proceed with project '{0}'. -Ensure you have a runnable project type and ensure '{1}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {2} is '{3}'. - - Specifying a directory for 'dotnet test' should be via '--directory'. Die Angabe eines Verzeichnisses für „dotnet test“ sollte über „--directory“ erfolgen. diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.es.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.es.xlf index 762511b574a4..689071439093 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.es.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.es.xlf @@ -2678,15 +2678,15 @@ El valor predeterminado es publicar una aplicación dependiente del marco. - Unable to run your project. -Ensure you have a runnable project type and ensure '{0}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {1} is '{2}'. - No se puede ejecutar el proyecto. + Unable to proceed with project '{0}'. +Ensure you have a runnable project type. +A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +The current OutputType is '{2}'. + No se puede ejecutar el proyecto. Asegúrese de tener un tipo de proyecto ejecutable y asegúrese de que "{0}" admita este proyecto. Un proyecto ejecutable debe tener como destino un TFM ejecutable (por ejemplo, net5.0) y tener como OutputType "Exe". El valor actual de {1} es "{2}". - + {0} is project file path. Unable to run your project @@ -3052,17 +3052,6 @@ Su proyecto tiene como destino varias plataformas. Especifique la que quiere usa OUTPUT_DIR - - Unable to proceed with project '{0}'. -Ensure you have a runnable project type and ensure '{1}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {2} is '{3}'. - Unable to proceed with project '{0}'. -Ensure you have a runnable project type and ensure '{1}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {2} is '{3}'. - - Specifying a directory for 'dotnet test' should be via '--directory'. La especificación de un directorio para 'dotnet test' debe hacerse mediante '--directory'. diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.fr.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.fr.xlf index 7cc6cadedae7..831be117ded3 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.fr.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.fr.xlf @@ -2678,15 +2678,15 @@ La valeur par défaut est de publier une application dépendante du framework. - Unable to run your project. -Ensure you have a runnable project type and ensure '{0}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {1} is '{2}'. - Impossible d'exécuter votre projet. + Unable to proceed with project '{0}'. +Ensure you have a runnable project type. +A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +The current OutputType is '{2}'. + Impossible d'exécuter votre projet. Vérifiez que vous avez un type de projet exécutable et que '{0}' prend en charge ce projet. Un projet exécutable doit cibler un TFM exécutable (par exemple, net5.0) et avoir OutputType 'Exe'. Le {1} actuel est '{2}'. - + {0} is project file path. Unable to run your project @@ -3052,17 +3052,6 @@ Votre projet cible plusieurs frameworks. Spécifiez le framework à exécuter à OUTPUT_DIR - - Unable to proceed with project '{0}'. -Ensure you have a runnable project type and ensure '{1}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {2} is '{3}'. - Unable to proceed with project '{0}'. -Ensure you have a runnable project type and ensure '{1}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {2} is '{3}'. - - Specifying a directory for 'dotnet test' should be via '--directory'. La spécification d’un répertoire pour « dotnet test » doit se faire via « --directory ». diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.it.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.it.xlf index 6301ba82302e..b1bb612e9ae0 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.it.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.it.xlf @@ -2678,15 +2678,15 @@ Per impostazione predefinita, viene generato un pacchetto dipendente dal framewo - Unable to run your project. -Ensure you have a runnable project type and ensure '{0}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {1} is '{2}'. - Non è possibile eseguire il progetto. + Unable to proceed with project '{0}'. +Ensure you have a runnable project type. +A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +The current OutputType is '{2}'. + Non è possibile eseguire il progetto. Assicurarsi che sia presente un tipo di progetto eseguibile e che '{0}' supporti tale progetto. Un progetto eseguibile deve essere destinato a un TFM eseguibile, ad esempio net5.0, inoltre OutputType deve essere impostato su 'Exe'. Il valore corrente di {1} è '{2}'. - + {0} is project file path. Unable to run your project @@ -3052,17 +3052,6 @@ Il progetto è destinato a più framework. Specificare il framework da eseguire OUTPUT_DIR - - Unable to proceed with project '{0}'. -Ensure you have a runnable project type and ensure '{1}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {2} is '{3}'. - Unable to proceed with project '{0}'. -Ensure you have a runnable project type and ensure '{1}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {2} is '{3}'. - - Specifying a directory for 'dotnet test' should be via '--directory'. La specifica di una directory per 'dotnet test' deve avvenire tramite '--directory'. diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ja.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ja.xlf index 6789eecef026..b14e42fc046b 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ja.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ja.xlf @@ -2678,15 +2678,15 @@ The default is to publish a framework-dependent application. - Unable to run your project. -Ensure you have a runnable project type and ensure '{0}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {1} is '{2}'. - プロジェクトを実行できません。 + Unable to proceed with project '{0}'. +Ensure you have a runnable project type. +A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +The current OutputType is '{2}'. + プロジェクトを実行できません。 プロジェクト タイプが実行可能であること、このプロジェクトが '{0}' でサポートされていることを確認してください。 実行可能なプロジェクトは実行可能な TFM (たとえば、net5.0) を対象としている必要があり、OutputType 'Exe' が必要です。 現在の {1} は '{2}' です。 - + {0} is project file path. Unable to run your project @@ -3052,17 +3052,6 @@ Your project targets multiple frameworks. Specify which framework to run using ' OUTPUT_DIR - - Unable to proceed with project '{0}'. -Ensure you have a runnable project type and ensure '{1}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {2} is '{3}'. - Unable to proceed with project '{0}'. -Ensure you have a runnable project type and ensure '{1}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {2} is '{3}'. - - Specifying a directory for 'dotnet test' should be via '--directory'. 'dotnet test' のディレクトリを指定するには、'--directory' を使用する必要があります。 diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ko.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ko.xlf index a7dde8214126..c31da4cf1598 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ko.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ko.xlf @@ -2678,15 +2678,15 @@ The default is to publish a framework-dependent application. - Unable to run your project. -Ensure you have a runnable project type and ensure '{0}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {1} is '{2}'. - 프로젝트를 실행할 수 없습니다. + Unable to proceed with project '{0}'. +Ensure you have a runnable project type. +A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +The current OutputType is '{2}'. + 프로젝트를 실행할 수 없습니다. 실행 가능한 프로젝트 형식이 있고 '{0}'에서 이 프로젝트를 지원하는지 확인하세요. 실행 가능한 프로젝트는 실행 가능한 TFM(예: net5.0)을 대상으로 하고 OutputType 'Exe'가 있어야 합니다. 현재 {1}은(는) '{2}'입니다. - + {0} is project file path. Unable to run your project @@ -3052,17 +3052,6 @@ Your project targets multiple frameworks. Specify which framework to run using ' OUTPUT_DIR - - Unable to proceed with project '{0}'. -Ensure you have a runnable project type and ensure '{1}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {2} is '{3}'. - Unable to proceed with project '{0}'. -Ensure you have a runnable project type and ensure '{1}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {2} is '{3}'. - - Specifying a directory for 'dotnet test' should be via '--directory'. 'dotnet test'에 대한 디렉터리를 지정하려면 '--directory'를 통해 지정해야 합니다. diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pl.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pl.xlf index 987bdd0b2a74..cbf0b5f138c8 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pl.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pl.xlf @@ -2678,15 +2678,15 @@ Domyślnie publikowana jest aplikacja zależna od struktury. - Unable to run your project. -Ensure you have a runnable project type and ensure '{0}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {1} is '{2}'. - Nie można uruchomić projektu. + Unable to proceed with project '{0}'. +Ensure you have a runnable project type. +A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +The current OutputType is '{2}'. + Nie można uruchomić projektu. Upewnij się, że używany typ projektu umożliwia uruchamianie oraz że element „{0}” obsługuje ten projekt. Projekt z możliwością uruchamiania musi mieć moniker TFM z możliwością uruchomienia (np. net5.0) i typ OutputType „Exe”. Bieżący element {1}: „{2}”. - + {0} is project file path. Unable to run your project @@ -3052,17 +3052,6 @@ Projekt ma wiele platform docelowych. Określ platformę do uruchomienia przy u OUTPUT_DIR - - Unable to proceed with project '{0}'. -Ensure you have a runnable project type and ensure '{1}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {2} is '{3}'. - Unable to proceed with project '{0}'. -Ensure you have a runnable project type and ensure '{1}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {2} is '{3}'. - - Specifying a directory for 'dotnet test' should be via '--directory'. Określenie katalogu dla elementu „dotnet test” powinno być za pomocą katalogu „--directory”. diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pt-BR.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pt-BR.xlf index 709e0cad36e5..8fceaf8d68d8 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pt-BR.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pt-BR.xlf @@ -2678,15 +2678,15 @@ O padrão é publicar uma aplicação dependente de framework. - Unable to run your project. -Ensure you have a runnable project type and ensure '{0}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {1} is '{2}'. - Não é possível executar o projeto. + Unable to proceed with project '{0}'. +Ensure you have a runnable project type. +A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +The current OutputType is '{2}'. + Não é possível executar o projeto. Verifique se você tem um tipo de projeto executável e se '{0}' dá suporte a esse projeto. Um projeto executável deve ter como destino um TFM executável (por exemplo, o net5.0) e ter o OutputType 'Exe'. O {1} atual é '{2}'. - + {0} is project file path. Unable to run your project @@ -3052,17 +3052,6 @@ Ele tem diversas estruturas como destino. Especifique que estrutura executar usa OUTPUT_DIR - - Unable to proceed with project '{0}'. -Ensure you have a runnable project type and ensure '{1}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {2} is '{3}'. - Unable to proceed with project '{0}'. -Ensure you have a runnable project type and ensure '{1}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {2} is '{3}'. - - Specifying a directory for 'dotnet test' should be via '--directory'. A especificação de um diretório para 'dotnet test' deve ser feita por meio de '--directory'. diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ru.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ru.xlf index 8a379c3201f4..bb85af480ebc 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ru.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ru.xlf @@ -2678,15 +2678,15 @@ The default is to publish a framework-dependent application. - Unable to run your project. -Ensure you have a runnable project type and ensure '{0}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {1} is '{2}'. - Не удалось запустить проект. + Unable to proceed with project '{0}'. +Ensure you have a runnable project type. +A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +The current OutputType is '{2}'. + Не удалось запустить проект. Убедитесь, что тип проекта поддерживает запуск и что "{0}" поддерживает этот проект. Запускаемый проект должен быть предназначен для TFM с поддержкой запуска (например, net5.0) и иметь тип выходных данных "EXE". Текущий {1} — "{2}". - + {0} is project file path. Unable to run your project @@ -3052,17 +3052,6 @@ Your project targets multiple frameworks. Specify which framework to run using ' OUTPUT_DIR - - Unable to proceed with project '{0}'. -Ensure you have a runnable project type and ensure '{1}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {2} is '{3}'. - Unable to proceed with project '{0}'. -Ensure you have a runnable project type and ensure '{1}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {2} is '{3}'. - - Specifying a directory for 'dotnet test' should be via '--directory'. Указание каталога для "dotnet test" следует выполнять через "--directory". diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.tr.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.tr.xlf index a082e7949a46..1f42753d04e5 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.tr.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.tr.xlf @@ -2678,15 +2678,15 @@ Varsayılan durum, çerçeveye bağımlı bir uygulama yayımlamaktır. - Unable to run your project. -Ensure you have a runnable project type and ensure '{0}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {1} is '{2}'. - Projeniz çalıştırılamıyor. + Unable to proceed with project '{0}'. +Ensure you have a runnable project type. +A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +The current OutputType is '{2}'. + Projeniz çalıştırılamıyor. Çalıştırılabilir bir proje türüne sahip olduğunuzdan ve bu projenin '{0}' tarafından desteklendiğinden emin olun. Çalıştırılabilir proje, çalıştırılabilir bir TFM’yi (örneğin, net5.0) hedeflemeli ve OutputType değeri 'Exe' olmalıdır. Geçerli {1}: '{2}'. - + {0} is project file path. Unable to run your project @@ -3052,17 +3052,6 @@ Projeniz birden fazla Framework'ü hedefliyor. '{0}' kullanarak hangi Framework' OUTPUT_DIR - - Unable to proceed with project '{0}'. -Ensure you have a runnable project type and ensure '{1}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {2} is '{3}'. - Unable to proceed with project '{0}'. -Ensure you have a runnable project type and ensure '{1}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {2} is '{3}'. - - Specifying a directory for 'dotnet test' should be via '--directory'. ‘dotnet test’ için bir dizin belirtmek ‘--directory’ ile yapılmalıdır. diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hans.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hans.xlf index 25037649cef1..cafb0d29aa20 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hans.xlf @@ -2678,15 +2678,15 @@ The default is to publish a framework-dependent application. - Unable to run your project. -Ensure you have a runnable project type and ensure '{0}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {1} is '{2}'. - 无法运行项目。 + Unable to proceed with project '{0}'. +Ensure you have a runnable project type. +A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +The current OutputType is '{2}'. + 无法运行项目。 请确保你具有可运行的项目类型且“{0}”支持此项目。 可运行的项目应面向可运行的 TFM (例如 net5.0)且其 OutputType 为 "Exe"。 当前的 {1} 为“{2}”。 - + {0} is project file path. Unable to run your project @@ -3052,17 +3052,6 @@ Your project targets multiple frameworks. Specify which framework to run using ' OUTPUT_DIR - - Unable to proceed with project '{0}'. -Ensure you have a runnable project type and ensure '{1}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {2} is '{3}'. - Unable to proceed with project '{0}'. -Ensure you have a runnable project type and ensure '{1}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {2} is '{3}'. - - Specifying a directory for 'dotnet test' should be via '--directory'. 应通过 "--directory" 为 "dotnet test" 指定目录。 diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hant.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hant.xlf index 52f6b5d0e634..ee0164042cbb 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hant.xlf @@ -2678,15 +2678,15 @@ The default is to publish a framework-dependent application. - Unable to run your project. -Ensure you have a runnable project type and ensure '{0}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {1} is '{2}'. - 無法執行您的專案。 + Unable to proceed with project '{0}'. +Ensure you have a runnable project type. +A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +The current OutputType is '{2}'. + 無法執行您的專案。 請確定您有可執行的專案類型,並確定 '{0}' 支援此專案。 可執行的專案應以可執行的 TFM (例如 net5.0) 為目標,且 OutputType 應為 'Exe'。 目前的 {1} 為 '{2}'。 - + {0} is project file path. Unable to run your project @@ -3052,17 +3052,6 @@ Your project targets multiple frameworks. Specify which framework to run using ' OUTPUT_DIR - - Unable to proceed with project '{0}'. -Ensure you have a runnable project type and ensure '{1}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {2} is '{3}'. - Unable to proceed with project '{0}'. -Ensure you have a runnable project type and ensure '{1}' supports this project. -A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'. -The current {2} is '{3}'. - - Specifying a directory for 'dotnet test' should be via '--directory'. 指定 'dotnet test' 的目錄應透過 '--directory'。 From 8c05ac9d794371adca6a144c74923e66975e666f Mon Sep 17 00:00:00 2001 From: mariam-abdulla Date: Thu, 21 Aug 2025 13:46:32 +0200 Subject: [PATCH 5/6] Update error message --- src/Cli/dotnet/Commands/CliCommandStrings.resx | 4 +++- src/Cli/dotnet/Commands/xlf/CliCommandStrings.cs.xlf | 2 +- src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf | 2 +- src/Cli/dotnet/Commands/xlf/CliCommandStrings.es.xlf | 2 +- src/Cli/dotnet/Commands/xlf/CliCommandStrings.fr.xlf | 2 +- src/Cli/dotnet/Commands/xlf/CliCommandStrings.it.xlf | 2 +- src/Cli/dotnet/Commands/xlf/CliCommandStrings.ja.xlf | 2 +- src/Cli/dotnet/Commands/xlf/CliCommandStrings.ko.xlf | 2 +- src/Cli/dotnet/Commands/xlf/CliCommandStrings.pl.xlf | 2 +- src/Cli/dotnet/Commands/xlf/CliCommandStrings.pt-BR.xlf | 2 +- src/Cli/dotnet/Commands/xlf/CliCommandStrings.ru.xlf | 2 +- src/Cli/dotnet/Commands/xlf/CliCommandStrings.tr.xlf | 2 +- src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hans.xlf | 2 +- src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hant.xlf | 2 +- 14 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/Cli/dotnet/Commands/CliCommandStrings.resx b/src/Cli/dotnet/Commands/CliCommandStrings.resx index aa26eb501289..aae0905ce5bc 100644 --- a/src/Cli/dotnet/Commands/CliCommandStrings.resx +++ b/src/Cli/dotnet/Commands/CliCommandStrings.resx @@ -1782,11 +1782,13 @@ The default is to publish a framework-dependent application. Unable to proceed with project '{0}'. Ensure you have a runnable project type. -A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +A runnable project should target a runnable TFM (for instance, net{1}) and have OutputType 'Exe'. The current OutputType is '{2}'. {0} is project file path. {1} is dotnet framework version. {2} is the project output type. + {Locked="OutputType"} + {Locked="Exe"} Unable to run your project diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.cs.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.cs.xlf index 94d81db69ad6..c6c01bcfd623 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.cs.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.cs.xlf @@ -2680,7 +2680,7 @@ Ve výchozím nastavení je publikována aplikace závislá na architektuře. Unable to proceed with project '{0}'. Ensure you have a runnable project type. -A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +A runnable project should target a runnable TFM (for instance, net{1}) and have OutputType 'Exe'. The current OutputType is '{2}'. Projekt se nedá spustit. Ověřte prosím, že máte spustitelný typ projektu, a zajistěte, aby tento projekt podporoval {0}. diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf index 3c46a1e0565d..13e36828f541 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf @@ -2680,7 +2680,7 @@ Standardmäßig wird eine Framework-abhängige Anwendung veröffentlicht. Unable to proceed with project '{0}'. Ensure you have a runnable project type. -A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +A runnable project should target a runnable TFM (for instance, net{1}) and have OutputType 'Exe'. The current OutputType is '{2}'. Ihr Projekt kann nicht ausgeführt werden. Stellen Sie sicher, dass der Projekttyp ausführbar ist und "{0}" dieses Projekt unterstützt. diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.es.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.es.xlf index 689071439093..09a806a6d627 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.es.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.es.xlf @@ -2680,7 +2680,7 @@ El valor predeterminado es publicar una aplicación dependiente del marco. Unable to proceed with project '{0}'. Ensure you have a runnable project type. -A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +A runnable project should target a runnable TFM (for instance, net{1}) and have OutputType 'Exe'. The current OutputType is '{2}'. No se puede ejecutar el proyecto. Asegúrese de tener un tipo de proyecto ejecutable y asegúrese de que "{0}" admita este proyecto. diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.fr.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.fr.xlf index 831be117ded3..8dd3683cf82b 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.fr.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.fr.xlf @@ -2680,7 +2680,7 @@ La valeur par défaut est de publier une application dépendante du framework. Unable to proceed with project '{0}'. Ensure you have a runnable project type. -A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +A runnable project should target a runnable TFM (for instance, net{1}) and have OutputType 'Exe'. The current OutputType is '{2}'. Impossible d'exécuter votre projet. Vérifiez que vous avez un type de projet exécutable et que '{0}' prend en charge ce projet. diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.it.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.it.xlf index b1bb612e9ae0..6e8c1ad4c550 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.it.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.it.xlf @@ -2680,7 +2680,7 @@ Per impostazione predefinita, viene generato un pacchetto dipendente dal framewo Unable to proceed with project '{0}'. Ensure you have a runnable project type. -A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +A runnable project should target a runnable TFM (for instance, net{1}) and have OutputType 'Exe'. The current OutputType is '{2}'. Non è possibile eseguire il progetto. Assicurarsi che sia presente un tipo di progetto eseguibile e che '{0}' supporti tale progetto. diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ja.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ja.xlf index b14e42fc046b..74ba61c8a9e5 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ja.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ja.xlf @@ -2680,7 +2680,7 @@ The default is to publish a framework-dependent application. Unable to proceed with project '{0}'. Ensure you have a runnable project type. -A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +A runnable project should target a runnable TFM (for instance, net{1}) and have OutputType 'Exe'. The current OutputType is '{2}'. プロジェクトを実行できません。 プロジェクト タイプが実行可能であること、このプロジェクトが '{0}' でサポートされていることを確認してください。 diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ko.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ko.xlf index c31da4cf1598..e1fb27156028 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ko.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ko.xlf @@ -2680,7 +2680,7 @@ The default is to publish a framework-dependent application. Unable to proceed with project '{0}'. Ensure you have a runnable project type. -A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +A runnable project should target a runnable TFM (for instance, net{1}) and have OutputType 'Exe'. The current OutputType is '{2}'. 프로젝트를 실행할 수 없습니다. 실행 가능한 프로젝트 형식이 있고 '{0}'에서 이 프로젝트를 지원하는지 확인하세요. diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pl.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pl.xlf index cbf0b5f138c8..398eb8fa309e 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pl.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pl.xlf @@ -2680,7 +2680,7 @@ Domyślnie publikowana jest aplikacja zależna od struktury. Unable to proceed with project '{0}'. Ensure you have a runnable project type. -A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +A runnable project should target a runnable TFM (for instance, net{1}) and have OutputType 'Exe'. The current OutputType is '{2}'. Nie można uruchomić projektu. Upewnij się, że używany typ projektu umożliwia uruchamianie oraz że element „{0}” obsługuje ten projekt. diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pt-BR.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pt-BR.xlf index 8fceaf8d68d8..11ec07add7b3 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pt-BR.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pt-BR.xlf @@ -2680,7 +2680,7 @@ O padrão é publicar uma aplicação dependente de framework. Unable to proceed with project '{0}'. Ensure you have a runnable project type. -A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +A runnable project should target a runnable TFM (for instance, net{1}) and have OutputType 'Exe'. The current OutputType is '{2}'. Não é possível executar o projeto. Verifique se você tem um tipo de projeto executável e se '{0}' dá suporte a esse projeto. diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ru.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ru.xlf index bb85af480ebc..50a5230607a0 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ru.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ru.xlf @@ -2680,7 +2680,7 @@ The default is to publish a framework-dependent application. Unable to proceed with project '{0}'. Ensure you have a runnable project type. -A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +A runnable project should target a runnable TFM (for instance, net{1}) and have OutputType 'Exe'. The current OutputType is '{2}'. Не удалось запустить проект. Убедитесь, что тип проекта поддерживает запуск и что "{0}" поддерживает этот проект. diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.tr.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.tr.xlf index 1f42753d04e5..ec80b598ae14 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.tr.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.tr.xlf @@ -2680,7 +2680,7 @@ Varsayılan durum, çerçeveye bağımlı bir uygulama yayımlamaktır. Unable to proceed with project '{0}'. Ensure you have a runnable project type. -A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +A runnable project should target a runnable TFM (for instance, net{1}) and have OutputType 'Exe'. The current OutputType is '{2}'. Projeniz çalıştırılamıyor. Çalıştırılabilir bir proje türüne sahip olduğunuzdan ve bu projenin '{0}' tarafından desteklendiğinden emin olun. diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hans.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hans.xlf index cafb0d29aa20..3305033a27ad 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hans.xlf @@ -2680,7 +2680,7 @@ The default is to publish a framework-dependent application. Unable to proceed with project '{0}'. Ensure you have a runnable project type. -A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +A runnable project should target a runnable TFM (for instance, net{1}) and have OutputType 'Exe'. The current OutputType is '{2}'. 无法运行项目。 请确保你具有可运行的项目类型且“{0}”支持此项目。 diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hant.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hant.xlf index ee0164042cbb..c94ba3125fa9 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hant.xlf @@ -2680,7 +2680,7 @@ The default is to publish a framework-dependent application. Unable to proceed with project '{0}'. Ensure you have a runnable project type. -A runnable project should target a runnable TFM (for instance, {1}) and have OutputType 'Exe'. +A runnable project should target a runnable TFM (for instance, net{1}) and have OutputType 'Exe'. The current OutputType is '{2}'. 無法執行您的專案。 請確定您有可執行的專案類型,並確定 '{0}' 支援此專案。 From eab5c5a0680046a76422db17a4c34e6eeb3c06cd Mon Sep 17 00:00:00 2001 From: mariam-abdulla Date: Thu, 21 Aug 2025 13:52:49 +0200 Subject: [PATCH 6/6] Apply comments --- src/Cli/dotnet/Commands/CliCommandStrings.resx | 6 +----- src/Cli/dotnet/Commands/xlf/CliCommandStrings.cs.xlf | 2 +- src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf | 2 +- src/Cli/dotnet/Commands/xlf/CliCommandStrings.es.xlf | 2 +- src/Cli/dotnet/Commands/xlf/CliCommandStrings.fr.xlf | 2 +- src/Cli/dotnet/Commands/xlf/CliCommandStrings.it.xlf | 2 +- src/Cli/dotnet/Commands/xlf/CliCommandStrings.ja.xlf | 2 +- src/Cli/dotnet/Commands/xlf/CliCommandStrings.ko.xlf | 2 +- src/Cli/dotnet/Commands/xlf/CliCommandStrings.pl.xlf | 2 +- src/Cli/dotnet/Commands/xlf/CliCommandStrings.pt-BR.xlf | 2 +- src/Cli/dotnet/Commands/xlf/CliCommandStrings.ru.xlf | 2 +- src/Cli/dotnet/Commands/xlf/CliCommandStrings.tr.xlf | 2 +- src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hans.xlf | 2 +- src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hant.xlf | 2 +- 14 files changed, 14 insertions(+), 18 deletions(-) diff --git a/src/Cli/dotnet/Commands/CliCommandStrings.resx b/src/Cli/dotnet/Commands/CliCommandStrings.resx index aae0905ce5bc..57ff930425bb 100644 --- a/src/Cli/dotnet/Commands/CliCommandStrings.resx +++ b/src/Cli/dotnet/Commands/CliCommandStrings.resx @@ -1784,11 +1784,7 @@ The default is to publish a framework-dependent application. Ensure you have a runnable project type. A runnable project should target a runnable TFM (for instance, net{1}) and have OutputType 'Exe'. The current OutputType is '{2}'. - {0} is project file path. - {1} is dotnet framework version. - {2} is the project output type. - {Locked="OutputType"} - {Locked="Exe"} + {0} is project file path. {1} is dotnet framework version. {2} is the project output type.{Locked="OutputType"}{Locked="Exe"} Unable to run your project diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.cs.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.cs.xlf index c6c01bcfd623..eaf8cd31edad 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.cs.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.cs.xlf @@ -2686,7 +2686,7 @@ The current OutputType is '{2}'. Ověřte prosím, že máte spustitelný typ projektu, a zajistěte, aby tento projekt podporoval {0}. Cílem spustitelného projektu by mělo být TFM (například net5.0) a jeho OutputType by měl být Exe. Aktuální {1} je {2}. - {0} is project file path. + {0} is project file path. {1} is dotnet framework version. {2} is the project output type.{Locked="OutputType"}{Locked="Exe"} Unable to run your project diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf index 13e36828f541..a0b1c3ebeaa8 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf @@ -2686,7 +2686,7 @@ The current OutputType is '{2}'. Stellen Sie sicher, dass der Projekttyp ausführbar ist und "{0}" dieses Projekt unterstützt. Ein ausführbares Projekt muss ein ausführbares TFM (z. B. net5.0) und den OutputType "Exe" verwenden. {1} lautet aktuell "{2}". - {0} is project file path. + {0} is project file path. {1} is dotnet framework version. {2} is the project output type.{Locked="OutputType"}{Locked="Exe"} Unable to run your project diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.es.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.es.xlf index 09a806a6d627..2bf662a64efc 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.es.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.es.xlf @@ -2686,7 +2686,7 @@ The current OutputType is '{2}'. Asegúrese de tener un tipo de proyecto ejecutable y asegúrese de que "{0}" admita este proyecto. Un proyecto ejecutable debe tener como destino un TFM ejecutable (por ejemplo, net5.0) y tener como OutputType "Exe". El valor actual de {1} es "{2}". - {0} is project file path. + {0} is project file path. {1} is dotnet framework version. {2} is the project output type.{Locked="OutputType"}{Locked="Exe"} Unable to run your project diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.fr.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.fr.xlf index 8dd3683cf82b..ca0c097690b5 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.fr.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.fr.xlf @@ -2686,7 +2686,7 @@ The current OutputType is '{2}'. Vérifiez que vous avez un type de projet exécutable et que '{0}' prend en charge ce projet. Un projet exécutable doit cibler un TFM exécutable (par exemple, net5.0) et avoir OutputType 'Exe'. Le {1} actuel est '{2}'. - {0} is project file path. + {0} is project file path. {1} is dotnet framework version. {2} is the project output type.{Locked="OutputType"}{Locked="Exe"} Unable to run your project diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.it.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.it.xlf index 6e8c1ad4c550..fa88be776c0f 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.it.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.it.xlf @@ -2686,7 +2686,7 @@ The current OutputType is '{2}'. Assicurarsi che sia presente un tipo di progetto eseguibile e che '{0}' supporti tale progetto. Un progetto eseguibile deve essere destinato a un TFM eseguibile, ad esempio net5.0, inoltre OutputType deve essere impostato su 'Exe'. Il valore corrente di {1} è '{2}'. - {0} is project file path. + {0} is project file path. {1} is dotnet framework version. {2} is the project output type.{Locked="OutputType"}{Locked="Exe"} Unable to run your project diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ja.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ja.xlf index 74ba61c8a9e5..a397be34a753 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ja.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ja.xlf @@ -2686,7 +2686,7 @@ The current OutputType is '{2}'. プロジェクト タイプが実行可能であること、このプロジェクトが '{0}' でサポートされていることを確認してください。 実行可能なプロジェクトは実行可能な TFM (たとえば、net5.0) を対象としている必要があり、OutputType 'Exe' が必要です。 現在の {1} は '{2}' です。 - {0} is project file path. + {0} is project file path. {1} is dotnet framework version. {2} is the project output type.{Locked="OutputType"}{Locked="Exe"} Unable to run your project diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ko.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ko.xlf index e1fb27156028..77dbc5cd4035 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ko.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ko.xlf @@ -2686,7 +2686,7 @@ The current OutputType is '{2}'. 실행 가능한 프로젝트 형식이 있고 '{0}'에서 이 프로젝트를 지원하는지 확인하세요. 실행 가능한 프로젝트는 실행 가능한 TFM(예: net5.0)을 대상으로 하고 OutputType 'Exe'가 있어야 합니다. 현재 {1}은(는) '{2}'입니다. - {0} is project file path. + {0} is project file path. {1} is dotnet framework version. {2} is the project output type.{Locked="OutputType"}{Locked="Exe"} Unable to run your project diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pl.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pl.xlf index 398eb8fa309e..2381e5e688e2 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pl.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pl.xlf @@ -2686,7 +2686,7 @@ The current OutputType is '{2}'. Upewnij się, że używany typ projektu umożliwia uruchamianie oraz że element „{0}” obsługuje ten projekt. Projekt z możliwością uruchamiania musi mieć moniker TFM z możliwością uruchomienia (np. net5.0) i typ OutputType „Exe”. Bieżący element {1}: „{2}”. - {0} is project file path. + {0} is project file path. {1} is dotnet framework version. {2} is the project output type.{Locked="OutputType"}{Locked="Exe"} Unable to run your project diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pt-BR.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pt-BR.xlf index 11ec07add7b3..eed3ed439948 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pt-BR.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.pt-BR.xlf @@ -2686,7 +2686,7 @@ The current OutputType is '{2}'. Verifique se você tem um tipo de projeto executável e se '{0}' dá suporte a esse projeto. Um projeto executável deve ter como destino um TFM executável (por exemplo, o net5.0) e ter o OutputType 'Exe'. O {1} atual é '{2}'. - {0} is project file path. + {0} is project file path. {1} is dotnet framework version. {2} is the project output type.{Locked="OutputType"}{Locked="Exe"} Unable to run your project diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ru.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ru.xlf index 50a5230607a0..1a19f4af1ac3 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ru.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.ru.xlf @@ -2686,7 +2686,7 @@ The current OutputType is '{2}'. Убедитесь, что тип проекта поддерживает запуск и что "{0}" поддерживает этот проект. Запускаемый проект должен быть предназначен для TFM с поддержкой запуска (например, net5.0) и иметь тип выходных данных "EXE". Текущий {1} — "{2}". - {0} is project file path. + {0} is project file path. {1} is dotnet framework version. {2} is the project output type.{Locked="OutputType"}{Locked="Exe"} Unable to run your project diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.tr.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.tr.xlf index ec80b598ae14..681c47f5b6b9 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.tr.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.tr.xlf @@ -2686,7 +2686,7 @@ The current OutputType is '{2}'. Çalıştırılabilir bir proje türüne sahip olduğunuzdan ve bu projenin '{0}' tarafından desteklendiğinden emin olun. Çalıştırılabilir proje, çalıştırılabilir bir TFM’yi (örneğin, net5.0) hedeflemeli ve OutputType değeri 'Exe' olmalıdır. Geçerli {1}: '{2}'. - {0} is project file path. + {0} is project file path. {1} is dotnet framework version. {2} is the project output type.{Locked="OutputType"}{Locked="Exe"} Unable to run your project diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hans.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hans.xlf index 3305033a27ad..7c1088c5e9c0 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hans.xlf @@ -2686,7 +2686,7 @@ The current OutputType is '{2}'. 请确保你具有可运行的项目类型且“{0}”支持此项目。 可运行的项目应面向可运行的 TFM (例如 net5.0)且其 OutputType 为 "Exe"。 当前的 {1} 为“{2}”。 - {0} is project file path. + {0} is project file path. {1} is dotnet framework version. {2} is the project output type.{Locked="OutputType"}{Locked="Exe"} Unable to run your project diff --git a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hant.xlf b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hant.xlf index c94ba3125fa9..90d8aab0149c 100644 --- a/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/Commands/xlf/CliCommandStrings.zh-Hant.xlf @@ -2686,7 +2686,7 @@ The current OutputType is '{2}'. 請確定您有可執行的專案類型,並確定 '{0}' 支援此專案。 可執行的專案應以可執行的 TFM (例如 net5.0) 為目標,且 OutputType 應為 'Exe'。 目前的 {1} 為 '{2}'。 - {0} is project file path. + {0} is project file path. {1} is dotnet framework version. {2} is the project output type.{Locked="OutputType"}{Locked="Exe"} Unable to run your project