Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move ProjectLaunchSettingsParser to ProjectTools
  • Loading branch information
tmat committed Dec 11, 2025
commit f61a0790f758f7fa4ae891eeae31bdf96119f326
33 changes: 0 additions & 33 deletions src/Cli/dotnet/Commands/CliCommandStrings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -744,9 +744,6 @@ See https://aka.ms/dotnet-test/mtp for more information.</value>
<data name="Date" xml:space="preserve">
<value>Date</value>
</data>
<data name="DefaultLaunchProfileDisplayName" xml:space="preserve">
<value>(Default)</value>
</data>
<data name="DeletingWorkloadManifest" xml:space="preserve">
<value>Uninstalling workload manifest {0} version {1}...</value>
</data>
Expand All @@ -766,10 +763,6 @@ See https://aka.ms/dotnet-test/mtp for more information.</value>
<data name="DescriptionColumnName" xml:space="preserve">
<value>Description</value>
</data>
<data name="DeserializationExceptionMessage" xml:space="preserve">
<value>An error was encountered when reading '{0}': {1}</value>
<comment>{0} is file path. {1} is exception message.</comment>
</data>
<data name="DetailDescription" xml:space="preserve">
<value>Show detail result of the query.</value>
</data>
Expand Down Expand Up @@ -812,11 +805,6 @@ See https://aka.ms/dotnet-test/mtp for more information.</value>
<data name="DownloadToCacheOptionDescription" xml:space="preserve">
<value>Download packages needed to install a workload to a folder that can be used for offline installation.</value>
</data>
<data name="DuplicateCaseInsensitiveLaunchProfileNames" xml:space="preserve">
<value>There are several launch profiles with case-sensitive names, which isn't permitted:
{0}
Make the profile names distinct.</value>
</data>
<data name="ExactMatchDescription" xml:space="preserve">
<value>Require that the search term exactly match the name of the package. Causes `--take` and `--skip` options to be ignored.</value>
</data>
Expand Down Expand Up @@ -1033,21 +1021,6 @@ Make the profile names distinct.</value>
<value>Latest Version</value>
<comment>Table lable</comment>
</data>
<data name="LaunchProfileDoesNotExist" xml:space="preserve">
<value>A launch profile with the name '{0}' doesn't exist.</value>
</data>
<data name="LaunchProfileHandlerCannotBeLocated" xml:space="preserve">
<value>The launch profile type '{0}' is not supported.</value>
</data>
<data name="LaunchProfileIsNotAJsonObject" xml:space="preserve">
<value>A profile with the specified name isn't a valid JSON object.</value>
</data>
<data name="LaunchProfile0IsMissingProperty1" xml:space="preserve">
<value>Launch profile '{0}' is missing property '{1}'</value>
</data>
<data name="LaunchProfilesCollectionIsNotAJsonObject" xml:space="preserve">
<value>The 'profiles' property of the launch settings document is not a JSON object.</value>
</data>
<data name="ListAppFullName" xml:space="preserve">
<value>List all projects in a solution file.</value>
</data>
Expand Down Expand Up @@ -1764,9 +1737,6 @@ Your project targets multiple frameworks. Specify which framework to run using '
<data name="RunCommandSpecifiedFileIsNotAValidProject" xml:space="preserve">
<value>'{0}' is not a valid project file.</value>
</data>
<data name="Path0SpecifiedIn1IsInvalid" xml:space="preserve">
<value>Path '{0}' specified in '{1}' is invalid.</value>
</data>
<data name="RunConfigurationOptionDescription" xml:space="preserve">
<value>The configuration to run for. The default for most projects is 'Debug'.</value>
</data>
Expand Down Expand Up @@ -2272,9 +2242,6 @@ and the corresponding package Ids for installed tools using the command
<data name="UpdateToolFailed" xml:space="preserve">
<value>Tool '{0}' failed to update due to the following:</value>
</data>
<data name="UsableLaunchProfileCannotBeLocated" xml:space="preserve">
<value>A usable launch profile could not be located.</value>
</data>
<data name="Usage" xml:space="preserve">
<value>Usage</value>
</data>
Expand Down
10 changes: 2 additions & 8 deletions src/Cli/dotnet/Commands/Run/RunCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,14 @@
using Microsoft.Build.Exceptions;
using Microsoft.Build.Execution;
using Microsoft.Build.Framework;
using Microsoft.Build.Logging;
using Microsoft.DotNet.Cli.CommandFactory;
using Microsoft.DotNet.Cli.Commands.Restore;
using Microsoft.DotNet.Cli.Commands.Run.LaunchSettings;
using Microsoft.DotNet.Cli.CommandLine;
using Microsoft.DotNet.Cli.Commands.Restore;
using Microsoft.DotNet.Cli.Extensions;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.Cli.Utils.Extensions;
using Microsoft.DotNet.FileBasedPrograms;
using Microsoft.DotNet.ProjectTools;
using Microsoft.Extensions.Primitives;

namespace Microsoft.DotNet.Cli.Commands.Run;

Expand Down Expand Up @@ -126,9 +123,6 @@ public RunCommand(
RestoreProperties = msbuildRestoreProperties;
}

internal static string GetLaunchProfileDisplayName(string? launchProfile)
=> string.IsNullOrEmpty(launchProfile) ? CliCommandStrings.DefaultLaunchProfileDisplayName : launchProfile;

public int Execute()
{
if (NoBuild && NoCache)
Expand All @@ -151,7 +145,7 @@ public int Execute()
var launchProfileSettings = ReadLaunchProfileSettings();
if (launchProfileSettings.FailureReason != null)
{
Reporter.Error.WriteLine(string.Format(CliCommandStrings.RunCommandExceptionCouldNotApplyLaunchSettings, GetLaunchProfileDisplayName(LaunchProfile), launchProfileSettings.FailureReason).Bold().Red());
Reporter.Error.WriteLine(string.Format(CliCommandStrings.RunCommandExceptionCouldNotApplyLaunchSettings, LaunchProfileParser.GetLaunchProfileDisplayName(LaunchProfile), launchProfileSettings.FailureReason).Bold().Red());
}

Func<ProjectCollection, ProjectInstance>? projectFactory = null;
Expand Down
3 changes: 1 addition & 2 deletions src/Cli/dotnet/Commands/Run/RunTelemetry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System.Collections.Immutable;
using Microsoft.Build.Evaluation;
using Microsoft.Build.Execution;
using Microsoft.DotNet.Cli.Commands.Run.LaunchSettings;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.FileBasedPrograms;
using Microsoft.DotNet.ProjectTools;

namespace Microsoft.DotNet.Cli.Commands.Run;

Expand Down
2 changes: 1 addition & 1 deletion src/Cli/dotnet/Commands/Test/MTP/Models.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Collections;
using System.Diagnostics;
using Microsoft.DotNet.Cli.Commands.Run;
using Microsoft.DotNet.Cli.Commands.Run.LaunchSettings;
using Microsoft.DotNet.ProjectTools;

namespace Microsoft.DotNet.Cli.Commands.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using Microsoft.Build.Evaluation.Context;
using Microsoft.Build.Execution;
using Microsoft.DotNet.Cli.Commands.Run;
using Microsoft.DotNet.Cli.Commands.Run.LaunchSettings;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.Cli.Utils.Extensions;
using Microsoft.DotNet.ProjectTools;
Expand Down
2 changes: 1 addition & 1 deletion src/Cli/dotnet/Commands/Test/MTP/TestApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
using System.Globalization;
using System.IO.Pipes;
using System.Threading;
using Microsoft.DotNet.Cli.Commands.Run.LaunchSettings;
using Microsoft.DotNet.Cli.Commands.Test.IPC;
using Microsoft.DotNet.Cli.Commands.Test.IPC.Models;
using Microsoft.DotNet.Cli.Commands.Test.IPC.Serializers;
using Microsoft.DotNet.Cli.Commands.Test.Terminal;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.ProjectTools;

namespace Microsoft.DotNet.Cli.Commands.Test;

Expand Down
54 changes: 0 additions & 54 deletions src/Cli/dotnet/Commands/xlf/CliCommandStrings.cs.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 0 additions & 54 deletions src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading