Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion src/Cli/dotnet/Commands/Run/RunCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ internal LaunchProfileParseResult ReadLaunchProfileSettings()

if (!RunCommandVerbosity.IsQuiet())
{
Reporter.Output.WriteLine(string.Format(CliCommandStrings.UsingLaunchSettingsFromMessage, launchSettingsPath));
Reporter.Error.WriteLine(string.Format(CliCommandStrings.UsingLaunchSettingsFromMessage, launchSettingsPath));
}

return LaunchSettings.ReadProfileSettingsFromFile(launchSettingsPath, LaunchProfile);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ static RunProperties GetRunProperties(ProjectInstance project)
// If buildOptions.Verbosity is null, we still want to print the message.
if (buildOptions.Verbosity != VerbosityOptions.quiet)
{
Reporter.Output.WriteLine(string.Format(CliCommandStrings.UsingLaunchSettingsFromMessage, launchSettingsPath));
Reporter.Error.WriteLine(string.Format(CliCommandStrings.UsingLaunchSettingsFromMessage, launchSettingsPath));
}

var result = LaunchSettings.ReadProfileSettingsFromFile(launchSettingsPath, profileName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,12 @@ public void RunTestProjectWithTestsAndLaunchSettings_ShouldReturnExitCodeSuccess

if (!SdkTestContext.IsLocalized())
{
result.StdOut
result.StdErr
.Should().Contain("Using launch settings from")
.And.Contain(runJson ? "TestProjectWithLaunchSettings.run.json..." : $"Properties{Path.DirectorySeparatorChar}launchSettings.json...")
.And.Contain("Test run summary: Passed!")
.And.Contain(runJson ? "TestProjectWithLaunchSettings.run.json..." : $"Properties{Path.DirectorySeparatorChar}launchSettings.json...");

result.StdOut
.Should().Contain("Test run summary: Passed!")
.And.Contain("MY_VARIABLE_FROM_LAUNCH_SETTINGS=TestValue1")
.And.Contain("skipped Test1")
.And.Contain("total: 2")
Expand Down Expand Up @@ -217,10 +219,12 @@ public void RunTestProjectWithTestsAndLaunchSettingsAndExecutableProfile()
.Execute(
"-c", TestingConstants.Debug);

result.StdOut.Should()
result.StdErr.Should()
.Contain("Using launch settings from")
.And.Contain($"Properties{Path.DirectorySeparatorChar}launchSettings.json...")
.And.Contain("FAILED to find argument from launchSettings.json");
.And.Contain($"Properties{Path.DirectorySeparatorChar}launchSettings.json...");

result.StdOut.Should()
.Contain("FAILED to find argument from launchSettings.json");
}

[InlineData(TestingConstants.Debug)]
Expand All @@ -237,10 +241,12 @@ public void RunTestProjectWithTestsAndNoLaunchSettingsArguments_ShouldReturnExit
"-c", configuration,
"--no-launch-profile-arguments", "true");

result.StdOut.Should()
result.StdErr.Should()
.Contain("Using launch settings from")
.And.Contain($"Properties{Path.DirectorySeparatorChar}launchSettings.json...")
.And.Contain("FAILED to find argument from launchSettings.json");
.And.Contain($"Properties{Path.DirectorySeparatorChar}launchSettings.json...");

result.StdOut.Should()
.Contain("FAILED to find argument from launchSettings.json");
}

[InlineData(TestingConstants.Debug)]
Expand Down Expand Up @@ -575,10 +581,12 @@ public void RunTestProjectWithEnvVariable(string configuration)

if (!SdkTestContext.IsLocalized())
{
result.StdOut
result.StdErr
.Should().Contain("Using launch settings from")
.And.Contain($"Properties{Path.DirectorySeparatorChar}launchSettings.json...")
.And.Contain("Test run summary: Failed!")
.And.Contain($"Properties{Path.DirectorySeparatorChar}launchSettings.json...");

result.StdOut
.Should().Contain("Test run summary: Failed!")
.And.Contain("total: 1")
.And.Contain("succeeded: 0")
.And.Contain("failed: 1")
Expand Down
Loading