vstest icon indicating copy to clipboard operation
vstest copied to clipboard

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

Open dotMorten opened this issue 1 year ago • 3 comments

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

dotMorten avatar Nov 08 '24 18:11 dotMorten

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.

nohwnd avatar Nov 12 '24 16:11 nohwnd

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

dotMorten avatar Nov 12 '24 16:11 dotMorten

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.

nohwnd avatar Nov 13 '24 21:11 nohwnd