Skip to content

[BUG] Refresh Tests doesn't respect open solution filter #2045

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
captainsafia opened this issue May 27, 2025 · 2 comments
Open

[BUG] Refresh Tests doesn't respect open solution filter #2045

captainsafia opened this issue May 27, 2025 · 2 comments
Labels
area-project Project load, Solution Explorer bug Something isn't working

Comments

@captainsafia
Copy link
Member

Describe the Issue

I'm observing that when I use the Refresh Tests feature (or anything in the test explorer) in a workspace with a solution filter open, the solution filter is ignored and the build is done on the root project.

Steps To Reproduce

  1. git clone --recursive https://github.com/dotnet/aspnetcore.git
  2. cd aspnetcore
  3. ./restore.sh
  4. cd src/Http
  5. ./startvscode.sh
  6. Open HttpAbstractions.slnf in VS Code.
  7. Click "Refresh Tests".
  8. Observe the build command targets the root solution.
dotnet build /Users/captainsafia/git/aspnetcore/val-filter-test/src/Http/../../AspNetCore.slnx /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary /p:Configuration=Debug /p:Platform="Any CPU" 

Expected Behavior

I expect the "Refresh Test" option to respect the solution filter I have active in my workspace. For large solutions, running the root solution when I am in the context of a single project increases the amount of time spent building in my dev loop unnecessarily.

Environment Information

VSCode version: 1.100.2
C# Extension: 2.76.27
Using OmniSharp: false

@captainsafia captainsafia added the bug Something isn't working label May 27, 2025
@timheuer timheuer added area-test Test discovery, execution, debugging and removed area-project-cps labels May 27, 2025
@ocallesp ocallesp self-assigned this May 28, 2025
@ocallesp ocallesp added the area-project Project load, Solution Explorer label May 29, 2025
@ocallesp
Copy link
Member

ocallesp commented May 29, 2025

Hi @Jxwoon, do you know who could help us dig into this ?

I noticed that after following the repro steps, even just right-click the solution AspNetCore(HttpAbstractions) and choosing Build triggers a build for AspNetCore.slnx instead of HttpAbstractions.slnf

This doesn't look like an issue in Test Explorer and it seems more related to the project system.

Is this expected behavior, or does it look like a bug ?

Image

@ocallesp ocallesp removed their assignment May 29, 2025
@ocallesp ocallesp removed the area-test Test discovery, execution, debugging label May 29, 2025
@ocallesp
Copy link
Member

This was reported on macOS, but it also reproduces on Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-project Project load, Solution Explorer bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants