microsoft / vscode-dotnettools

This is a feedback repository to capture issues logged for the C# Dev Kit and related extensions from Visual Studio Code
Other
192 stars 6 forks source link

Test discovery searches incorrect platform directory on multi-architecture solution #1046

Open jcoliz opened 1 month ago

jcoliz commented 1 month ago

Type: Bug

  1. Running on X64 machine
  2. Clone https://github.com/jcoliz/Sample.Web.MultiArch.git
  3. Open VS code in the resulting directory, with C# dev kit installed
  4. Open the solution
  5. Build the solution
  6. Switch to the "Testing" pane
  7. Notice: No tests are found. That's strange, this solution has tests...
  8. In the "Output" pane, select "C# Dev Kit - Test Explorer" source
  9. Notice: "Scheduling discovery: .\Sample.Web.MultiArch\Tests.Unit\bin\ARM64\Debug\net8.0\Sample.Web.MultiArch.Tests.Unit.dll [0]"

So, test discovery is looking in the ARM64 directory to discover tests, despite them never having ever existed there.

To keep pressing here, we can build the ARM64 DLL, thanks to cross compiling, but that doesn't really help us...

Scheduling discovery: .\Sample.Web.MultiArch\Tests.Unit\bin\ARM64\Debug\net8.0\Sample.Web.MultiArch.Tests.Unit.dll [1712360220484]
========== Starting test discovery ==========
Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Could not find 'dotnet.exe' host for the 'ARM64' architecture.

You can resolve the problem by installing the 'ARM64' .NET.

Extension version: 1.4.29 VS Code version: Code 1.88.0 (5c3e652f63e798a5ac2f31ffd0d863669328dc4c, 2024-04-03T13:26:18.741Z) OS version: Windows_NT x64 10.0.22631 Modes:

System Info |Item|Value| |---|---| |CPUs|AMD Ryzen 7 5700X 8-Core Processor (16 x 3400)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|63.93GB (46.35GB free)| |Process Argv|. --crash-reporter-id 5cfd0a0f-7d05-40e3-9dd1-4b4af18ebfe5| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vstes627:30244334 vscoreces:30445986 vscod805:30301674 binariesv615:30325510 vsaa593:30376534 py29gd2263:30899288 vscaac:30438847 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 welcomedialogc:30910334 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 2e7ec940:31000449 pythontbext0:30879054 accentitlementsc:30995553 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 d34g3935:30971562 fegfb526:30981948 bg6jg535:30979843 ccp2r3:30993541 dsvsc020:30976470 pythonait:31006305 gee8j676:31009558 dsvsc021:30996838 gd77d436:30999572 ```
peterwald commented 1 week ago

Moving this issue to area-project since this depends on the addition of configuration switching to the Solution Explorer.

/cc @tmeschter