Skip to content

Conversation

v-wuzhai
Copy link
Contributor

@v-wuzhai v-wuzhai commented Apr 25, 2025

Fixes #42841

This change works around #45640, where dotnet run writes launch settings messages to stdout.
We suppress the output using --verbosity quiet to avoid test failures.

@v-wuzhai
Copy link
Contributor Author

Some failed RazorSdk tests are unrelated to the current changes. The failed RazorSdk tests were fixed in #48715.

@v-wuzhai v-wuzhai marked this pull request as ready for review April 25, 2025 08:13
@v-wuzhai v-wuzhai requested review from Copilot and marcpopMSFT April 25, 2025 08:13
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a test failure caused by unwanted launch settings output during dotnet run execution. Key changes include:

  • Removal of the Skip attribute from the failing test.
  • Addition of the "--verbosity quiet" argument to suppress stdout output during test execution.
Comments suppressed due to low confidence (2)

test/dotnet.Tests/CommandTests/Run/GivenDotnetRunBuildsCsProj.cs:412

  • [nitpick] With the removal of the Skip attribute, please ensure that this test now passes reliably across different environments. Consider adding specific assertions to verify that launch settings messages are successfully suppressed.
[Fact]

test/dotnet.Tests/CommandTests/Run/GivenDotnetRunBuildsCsProj.cs:422

  • [nitpick] Double-check that the addition of '--verbosity quiet' correctly suppresses only the launch settings messages and does not hide crucial error output in other scenarios.
var cmd = new DotnetCommand(Log, "run", "--verbosity", "quiet")

@marcpopMSFT marcpopMSFT merged commit cecc1bc into main Apr 29, 2025
30 checks passed
@marcpopMSFT marcpopMSFT deleted the dev/Jason/Fix-launch-profile-test branch April 29, 2025 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reenable the Microsoft.DotNet.Cli.Run.Tests.GivenDotnetRunBuildsCsproj.ItDefaultsToTheFirstUsableLaunchProfile test

2 participants