microsoft / vstest

Visual Studio Test Platform is the runner and engine that powers test explorer and vstest.console.
MIT License
898 stars 323 forks source link

VSTest Blame dump failes with "Could not load file or assembly 'NuGet.Frameworks'" #10419

Open dotMorten opened 5 days ago

dotMorten commented 5 days ago

I have a test run that occasionally crashes. I run with with the /blame parameter. This works great on my x64 and x86 test runs, but on our ARM64 test run, I always end up with the following:

Data collector 'Blame' message: Could not start process dump: System.IO.FileNotFoundException: Could not load file or assembly 'NuGet.Frameworks, Version=6.5.0.154, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
File name: 'NuGet.Frameworks, Version=6.5.0.154, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
   at Microsoft.TestPlatform.Extensions.BlameDataCollector.CrashDumperFactory.Create(String targetFramework)
   at Microsoft.TestPlatform.Extensions.BlameDataCollector.ProcessDumpUtility.StartTriggerBasedProcessDump(Int32 processId, String testResultsDirectory, Boolean isFullDump, String targetFramework, Boolean collectAlways, Action`1 logWarning) in /_/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/ProcessDumpUtility.cs:line 104
   at Microsoft.TestPlatform.Extensions.BlameDataCollector.BlameCollector.TestHostLaunchedHandler(Object sender, TestHostLaunchedEventArgs args) in /_/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameCollector.cs:line 645

Test run is started with vstest.console using the parameter BLAMEPARAM=--Blame:CollectDump;CollectAlways=false;DumpType=full and %PROCDUMP_PATH% pointing to a path with procdump for all 3 process architectures (including ARM64)

I have no idea where NuGet.Frameworks is coming from. It's not something I reference directly.

Full command:

vstest.console.exe "path_to_app\UITests.WinUI.build.appxrecipe" BLAMEPARAM=--Blame:CollectDump;CollectAlways=false;DumpType=full /Diag:WinUIdiagnostics.txt /Logger:trx;LogFileName=report.trx /Platform:ARM64 /Settings:testsettings.runsettings /InIsolation
nohwnd commented 1 day ago

Please show me the version that is printed in dotnet test when you run it (assuming this is coming from dotnet test), I am trying to figure out in which version this is happening. Nuget.Frameworks used to be a dependency of vstest, but it is not anymore, so maybe something somewhere was not removed correctly.

dotMorten commented 1 day ago

This is not dotnet test but as shown above vstest.console.exe (since this is a packaged WinUI app)

nohwnd commented 6 hours ago

Yes, I am blind. I will have to stage arm64 machine for this, and I will be able to do that on monday at earliest.