Skip to content

Conversation

@davidfowl
Copy link
Member

This pull request makes a targeted update to the way single-file projects are run in the DotNetCliRunner. Specifically, it ensures that the noProfileSwitch argument is included when running single-file projects, aligning the behavior with multi-file project runs.

  • Command-line argument handling:
    • Updated the single-file project run command in DotNetCliRunner.cs to include the noProfileSwitch argument, ensuring consistent profiling behavior across different project types.

Copilot AI review requested due to automatic review settings October 10, 2025 18:04
@github-actions
Copy link
Contributor

github-actions bot commented Oct 10, 2025

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 11951

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 11951"

Copy link
Contributor

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 ensures consistent profiling behavior across different project types in the .NET CLI runner by adding the noProfileSwitch argument to single-file project runs.

Key Changes

  • Updated single-file project run command to include noProfileSwitch argument, aligning with multi-file project behavior

@MermaidIsla
Copy link
Contributor

MermaidIsla commented Oct 10, 2025

Shouldn't there also be --file before projectFile.FullName ?

@DamianEdwards DamianEdwards reopened this Oct 10, 2025
@dotnet-policy-service dotnet-policy-service bot added this to the 13.0 milestone Oct 10, 2025
@DamianEdwards
Copy link
Member

/backport to release/9.5

@github-actions
Copy link
Contributor

Started backporting to release/9.5: https://github.com/dotnet/aspire/actions/runs/18416092015

@github-actions
Copy link
Contributor

@DamianEdwards backporting to "release/9.5" failed, the patch most likely resulted in conflicts:

$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: Add noProfileSwitch to run command in DotNetCliRunner
Using index info to reconstruct a base tree...
M	src/Aspire.Cli/DotNet/DotNetCliRunner.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Aspire.Cli/DotNet/DotNetCliRunner.cs
CONFLICT (content): Merge conflict in src/Aspire.Cli/DotNet/DotNetCliRunner.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Add noProfileSwitch to run command in DotNetCliRunner
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

davidfowl and others added 2 commits October 10, 2025 17:00
Co-authored-by: Damian Edwards <damian@damianedwards.com>
@davidfowl davidfowl requested a review from mitchdenny October 11, 2025 04:07
@davidfowl davidfowl merged commit 1cc7ef0 into main Oct 11, 2025
302 checks passed
Copilot AI added a commit that referenced this pull request Oct 11, 2025
…nd and filter empty arguments

Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
joperezr pushed a commit that referenced this pull request Oct 17, 2025
…nner (#11959)

* Initial plan

* Apply PR #11951 changes: Add noProfileSwitch to single-file run command and filter empty arguments

Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants