Skip to content

18.5.0 introduced an error Could not load file or assembly 'System.Collections.Immutable, Version=8.0.0.0 #15718

Closed

Description

ℹ️ Update: from maintainers.

The package was unlisted on nuget.org, 18.4.0 should resolve for you. Fix is in 18.5.1 that is currently building and will be released soon - probably in Tuesday there is no significant urgency to risk breaking you over weekend.

We are trying to push the fix also into VS. And will port it to 18.6, 18.7 etc.

Fails in CI pipelines only with VSTest@2 and distributed run.

If you are on cloud AzDO, update to VSTest@3, VSTest@2 task is soft deprecated, so take it as a nudge to stay up to date.

If you are on on-prem AzDO you can use Test Platform Installer task to set version of VSTest to 18.4.0, or to 18.5.1 once published.


System.AggregateException: One or more errors occurred. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Collections.Immutable, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

It looks like Version 9.0.24.52809 of System.Collections.Immutable is being installed with 18.5.0 of vstest

I'm installing this through Azure DevOps pipeline using the Visual Studio test platform installer with options of Package Feed: Official Nuget and Version: Latest Stable. As soon as it starts test discovery in a Visual Studio Test step it is throwing the above error.

Using version 18.4.0 does not produce this error.

Activity

  1. nohwnd commented on Apr 22, 2026

    @nohwnd
    Member

    Thanks, got this reported from more places. Plesae provide more details how you run the command, no idea why we did not see it in intergration tests, seems like big gap. Unlisting the packgage and backporting the binding redirects verification script from latest.

    Sorry for the issue!

  2. nohwnd commented on Apr 22, 2026

    @nohwnd
    Member

    Unlisted.

  3. mike9900 commented on Apr 22, 2026

    @mike9900
    Author

    Thanks, got this reported from more places. Plesae provide more details how you run the command, no idea why we did not see it in intergration tests, seems like big gap. Unlisting the packgage and backporting the binding redirects verification script from latest.

    Sorry for the issue!

    Do you still need additional details?

    I use the Azure DevOps step of 'Visual Studio test platform installer' to pull the package, and then use the option Installed by Tools Installer for the Visual Studio Test step

    Visual Studio test platform installer has options of Package Feed: Official Nuget and Version: Latest Stable

  4. nohwnd commented on Apr 22, 2026

    @nohwnd
    Member

    yes please more details help.

    are you using distributed test run? do you see what exactly was run in the pipeline? any exception stack you can publicly share?

    since I unlisted tools installer should no longer resolve version 18.5.0, but I still don't see where the problem is, binding redirects in the packages are correct.

  5. nohwnd commented on Apr 22, 2026

    @nohwnd
    Member

    Possibly this is DTA (distributed test agent) using fastFilter from microsoft.testplatform.common directly from Microsoft.TestPlatform package. We have mismatch of dependencies between system.collections.immutable and system.reflection.metadata.

    Adding integration test to see if that reproes on rel/18.5.

  6. nohwnd commented on Apr 22, 2026

    @nohwnd
    Member

    Got repro now, and integration test.

  7. nohwnd commented on Apr 23, 2026

    @nohwnd
    Member

    Fixed in #15720 will release as 18.5.1 as soon as I have the package. If you can confirm in the meantime that you saw this when using DTA (distributed test agent) please.

  8. nohwnd commented on Apr 23, 2026

    @nohwnd
    Member

    Still looking for details on how this breaks, I have the package and DTA pipeline with single, distributed and filtered run, but none of them fail for me on 18.5 TP.

  9. nohwnd commented on Apr 23, 2026

    @nohwnd
    Member

    Mike Anderson (@mike9900) can we see your yaml pipeline definition for vstest task?

  10. nohwnd commented on Apr 23, 2026

    @nohwnd
    Member

    The package was unlisted on nuget.org, 18.4.0 should resolve for you. Fix is in 18.5.1 that is currently building and will be released soon - probably in Tuesday there is no significant urgency to risk breaking you over weekend.

    We are trying to push the fix also into VS. And will port it to 18.6, 18.7 etc.

    Fails in CI pipelines only with VSTest@2 and distributed run.

    If you are on cloud AzDO, update to VSTest@3, VSTest@2 task is soft deprecated, so take it as a nudge to stay up to date.

    If you are on on-prem AzDO you can use Test Platform Installer task to set version of VSTest to 18.4.0, or to 18.5.1 once published.

  11. nohwnd commented on Apr 23, 2026

    @nohwnd
    Member

    rootcause, DTA agent is loading our common dll in VSTest@2 directly, and we did not know about it. We updated version of System.Collections.Immutable to fix UWP test running, but the .Common library was not rererencing the updated version directly. So it cannot load unless loaded into vstest.console or testhost which have the appropriate binding redirects.

    Added integration tests to keep this working, we are doing a nice guy fix here, to keep you unaffected, but personally i would prefer VSTest@2 to not do this and be full deprecated. :)

    #15720

  12. 2 remaining items

  13. nohwnd commented on Apr 27, 2026

    @nohwnd
    Member

    TY. I will publish 18.5.1 tomorrow, so you can revert back to consuming latest version automatically. Thanks for your patience.

  14. nohwnd commented on Apr 28, 2026

    @nohwnd
    Member

    18.5.1 was released, keeping this open until all forward merges are out.

  15. added 4 commits that reference this issue on Apr 28, 2026
    40c8398
    b947516
    7789097
    612366b
  16. mattfrear commented on May 6, 2026

    @mattfrear

    Hi Jakub

    Our solution is a mix of net48, netstandard2.0 and net8, which works fine using VSTest@3. We are using Azure DevOps Cloud.

    As soon as I upgrade one of the net8 test projects to net10 then we get the above error, using VSTest@3 on 18.5.1.

    The tests all pass, including the net10 tests, and the error is occurring after the tests have run.

              - task: VisualStudioTestPlatformInstaller@1
                displayName: "Install VS Test Platform"
                inputs:
                  versionSelector: latestStable
    
              - task: VSTest@3
                displayName: Test
                inputs:
                  testAssemblyVer2: |
                    **\mycompany.*tests.dll
                    !**\*TestAdapter.dll
                    !**\obj\**
                  testFiltercriteria: "TestCategory!=Integration&TestCategory!=CoreOnlyPipeline"
                  vsTestVersion: toolsInstaller
                  runSettingsFile: ci.runsettings
                  runInParallel: true
                  codeCoverageEnabled: true
                  otherConsoleOptions: "-- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.CodeCoverage.UseVerifiableInstrumentation=False"
                  platform: "$(BuildPlatform)"
                  configuration: "$(BuildConfiguration)"
                  failOnMinTestsNotRun: true
                  minimumExpectedTests: 25149

    Output:

    Starting: Install VS Test Platform
    ==============================================================================
    Task         : Visual Studio test platform installer
    Description  : Acquire the test platform from nuget.org or the tool cache. Satisfies the ‘vstest’ demand and can be used for running tests and collecting diagnostic data using the Visual Studio Test task.
    Version      : 1.263.0
    Author       : Microsoft Corporation
    Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/tool/vstest-platform-tool-installer
    ==============================================================================
    Starting VsTest platform tools installer task.
    ==============================================================================
    Looking for the latest stable version of the Microsoft.Testplatform.
    C:\a\_tasks\VisualStudioTestPlatformInstaller_2c65196a-54fd-4a02-9be8-d9d1837b7111\1.263.0\nuget.exe list packageid:Microsoft.TestPlatform -NonInteractive -Source https://api.nuget.org/v3/index.json
    Microsoft.TestPlatform 18.5.1
    Found tool in cache: VsTest 18.5.1 x64
    VsTest will use the Test Platform package found in C:\a\_tool\VsTest\18.5.1\x64
    Finishing: Install VS Test Platform
    
    2026-05-06T00:11:10.9120725Z ##[section]Starting: Test
    2026-05-06T00:11:10.9169764Z ==============================================================================
    2026-05-06T00:11:10.9170036Z Task         : Visual Studio Test
    2026-05-06T00:11:10.9170158Z Description  : Run unit and functional tests (Selenium, Appium, Coded UI test, etc.) using the Visual Studio Test (VsTest) runner. Test frameworks that have a Visual Studio test adapter such as MsTest, xUnit, NUnit, Chutzpah (for JavaScript tests using QUnit, Mocha and Jasmine), etc. can be run. Tests can be distributed on multiple agents using this task (version 2 and later).
    2026-05-06T00:11:10.9170491Z Version      : 3.271.0
    2026-05-06T00:11:10.9170618Z Author       : Microsoft Corporation
    2026-05-06T00:11:10.9170740Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/test/vstest
    2026-05-06T00:11:10.9170886Z ==============================================================================
    2026-05-06T00:11:11.4003876Z Running tests using vstest.console.exe runner.
    2026-05-06T00:11:11.4004407Z ======================================================
    2026-05-06T00:11:11.4004641Z Test selector : Test assemblies
    2026-05-06T00:11:11.4004971Z Test filter criteria : TestCategory!=Integration&TestCategory!=CoreOnlyPipeline
    2026-05-06T00:11:11.4005283Z Search folder : C:\a\2\s
    2026-05-06T00:11:11.4108363Z Action when minimum tests threshold not met : fail
    2026-05-06T00:11:11.4108840Z Minimum tests expected to be run: 25149
    2026-05-06T00:11:11.4591619Z Run settings file : C:\a\2\s\ci.runsettings
    2026-05-06T00:11:11.4592059Z Run in parallel : true
    2026-05-06T00:11:11.4592258Z Run in isolation : false
    2026-05-06T00:11:11.4592527Z Path to custom adapters : undefined
    2026-05-06T00:11:11.4592871Z Other console options : -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.CodeCoverage.UseVerifiableInstrumentation=False
    2026-05-06T00:11:11.4593136Z Code coverage enabled : true
    2026-05-06T00:11:11.4593349Z Diagnostics enabled : false
    2026-05-06T00:11:11.4594101Z Run the tests locally using vstest.console.exe
    2026-05-06T00:11:11.4594372Z ========================================================
    2026-05-06T00:11:11.4598905Z Source filter: **\MyCompany.*tests.dll,!**\*TestAdapter.dll,!**\obj\**
    2026-05-06T00:11:17.0070562Z ======================================================
    2026-05-06T00:11:17.0214452Z [command]C:\a\_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\3.271.0\Modules\DTAExecutionHost.exe --inputFile C:\a\_temp\input_19eccea0-48e0-11f1-823e-1f4d1c29c7a3.json
    2026-05-06T00:11:17.4768931Z ##########################################################################
    2026-05-06T00:11:17.4825986Z DtaExecutionHost version 20.265.36717.0.
    2026-05-06T00:11:18.0466947Z Starting TestExecution Model...
    2026-05-06T00:11:19.3583920Z Result Attachments will be stored in LogStore
    2026-05-06T00:11:19.3783700Z Run Attachments will be stored in LogStore
    2026-05-06T00:11:19.4011257Z Result Attachments will be stored in LogStore
    2026-05-06T00:11:19.4204768Z Result Attachments will be stored in LogStore
    2026-05-06T00:11:19.4210825Z Run Attachments will be stored in LogStore
    2026-05-06T00:11:19.4414252Z Provided settings file:
    2026-05-06T00:11:19.4502709Z <RunSettings>
    2026-05-06T00:11:19.4503174Z   <DataCollectionRunSettings>
    2026-05-06T00:11:19.4503471Z     <DataCollectors>
    2026-05-06T00:11:19.4503933Z       <DataCollector friendlyName="Code Coverage" uri="datacollector://Microsoft/CodeCoverage/2.0" assemblyQualifiedName="Microsoft.VisualStudio.Coverage.DynamicCoverageDataCollector, Microsoft.VisualStudio.TraceCollector, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    2026-05-06T00:11:19.4504651Z         <Configuration>
    2026-05-06T00:11:19.4504914Z           <CodeCoverage>
    2026-05-06T00:11:19.4505161Z             <ModulePaths>
    2026-05-06T00:11:19.4505405Z               <Include>
    2026-05-06T00:11:19.4505680Z                 <ModulePath>.*MyCompany\..*\.dll$</ModulePath>
    2026-05-06T00:11:19.4507295Z               </Include>
    2026-05-06T00:11:19.4507546Z               <Exclude>
    2026-05-06T00:11:19.4507803Z                 <ModulePath>.*\.(unit)?tests\.dll$</ModulePath>
    2026-05-06T00:11:19.4508126Z                 <ModulePath>.*\\((?!MyCompany)(\w|\.|-))*\.\w*$</ModulePath>
    2026-05-06T00:11:19.4508439Z 				<ModulePath>.*\\Migrations\\.*</ModulePath>
    2026-05-06T00:11:19.4508797Z               </Exclude>
    2026-05-06T00:11:19.4509043Z             </ModulePaths>
    2026-05-06T00:11:19.4509337Z             <UseVerifiableInstrumentation>True</UseVerifiableInstrumentation>
    2026-05-06T00:11:19.4509661Z             <AllowLowIntegrityProcesses>True</AllowLowIntegrityProcesses>
    2026-05-06T00:11:19.4509970Z             <CollectFromChildProcesses>True</CollectFromChildProcesses>
    2026-05-06T00:11:19.4510275Z             <CollectAspDotNet>False</CollectAspDotNet>
    2026-05-06T00:11:19.4510542Z           </CodeCoverage>
    2026-05-06T00:11:19.4510792Z         </Configuration>
    2026-05-06T00:11:19.4511033Z       </DataCollector>
    2026-05-06T00:11:19.4511287Z     </DataCollectors>
    2026-05-06T00:11:19.4511538Z   </DataCollectionRunSettings>
    2026-05-06T00:11:19.4511796Z </RunSettings>
    2026-05-06T00:11:19.5182835Z Updated Run Settings:
    2026-05-06T00:11:19.5183401Z <RunSettings>
    2026-05-06T00:11:19.5183633Z   <DataCollectionRunSettings>
    2026-05-06T00:11:19.5183894Z     <DataCollectors>
    2026-05-06T00:11:19.5184275Z       <DataCollector friendlyName="Code Coverage" uri="datacollector://Microsoft/CodeCoverage/2.0" assemblyQualifiedName="Microsoft.VisualStudio.Coverage.DynamicCoverageDataCollector, Microsoft.VisualStudio.TraceCollector, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    2026-05-06T00:11:19.5184675Z         <Configuration>
    2026-05-06T00:11:19.5184890Z           <CodeCoverage>
    2026-05-06T00:11:19.5185096Z             <ModulePaths>
    2026-05-06T00:11:19.5185937Z               <Include>
    2026-05-06T00:11:19.5186217Z                 <ModulePath>.*MyCompany\..*\.dll$</ModulePath>
    2026-05-06T00:11:19.5186458Z               </Include>
    2026-05-06T00:11:19.5186653Z               <Exclude>
    2026-05-06T00:11:19.5186871Z                 <ModulePath>.*\.(unit)?tests\.dll$</ModulePath>
    2026-05-06T00:11:19.5187117Z                 <ModulePath>.*\\((?!MyCompany)(\w|\.|-))*\.\w*$</ModulePath>
    2026-05-06T00:11:19.5187355Z                 <ModulePath>.*\\Migrations\\.*</ModulePath>
    2026-05-06T00:11:19.5187570Z               </Exclude>
    2026-05-06T00:11:19.5187767Z             </ModulePaths>
    2026-05-06T00:11:19.5188029Z             <UseVerifiableInstrumentation>True</UseVerifiableInstrumentation>
    2026-05-06T00:11:19.5188579Z             <AllowLowIntegrityProcesses>True</AllowLowIntegrityProcesses>
    2026-05-06T00:11:19.5189385Z             <CollectFromChildProcesses>True</CollectFromChildProcesses>
    2026-05-06T00:11:19.5189707Z             <CollectAspDotNet>False</CollectAspDotNet>
    2026-05-06T00:11:19.5189936Z           </CodeCoverage>
    2026-05-06T00:11:19.5190143Z         </Configuration>
    2026-05-06T00:11:19.5190344Z       </DataCollector>
    2026-05-06T00:11:19.5190545Z     </DataCollectors>
    2026-05-06T00:11:19.5190749Z   </DataCollectionRunSettings>
    2026-05-06T00:11:19.5190981Z   <RunConfiguration>
    2026-05-06T00:11:19.5191182Z     <MaxCpuCount>0</MaxCpuCount>
    2026-05-06T00:11:19.5191392Z     <BatchSize>1000</BatchSize>
    2026-05-06T00:11:19.5191620Z     <ResultsDirectory>C:\a\_temp\TestResults</ResultsDirectory>
    2026-05-06T00:11:19.5191863Z   </RunConfiguration>
    2026-05-06T00:11:19.5192060Z </RunSettings>
    2026-05-06T00:11:19.5374265Z **************** Starting test execution *********************
    2026-05-06T00:11:19.5484290Z [command]C:\a\_tool\VsTest\18.5.1\x64\tools\net462\Common7\IDE\Extensions\TestPlatform\vstest.console.exe "@C:\a\_temp\bjoj1gdw2my.tmp"
    2026-05-06T00:11:19.8237082Z VSTest version 18.5.1 (x64)
    2026-05-06T00:11:19.8748460Z vstest.console.exe "C:\a\2\s\MyCompany.Api.Tests\bin\Release\net48\MyCompany.Api.Tests.dll"
    2026-05-06T00:11:19.8749101Z "C:\a\2\s\MyCompany.Api.Tests\bin\Release\net48\MyCompany.Common.Tests.dll"
    2026-05-06T00:11:19.8750306Z "C:\a\2\s\MyCompany.Business.Tests\bin\Release\net48\MyCompany.Business.Tests.dll"
    2026-05-06T00:11:19.8750669Z "C:\a\2\s\MyCompany.Business.Tests\bin\Release\net48\MyCompany.Common.Tests.dll"
    2026-05-06T00:11:19.8750999Z "C:\a\2\s\MyCompany.Common.Tests\bin\Release\net48\MyCompany.Common.Tests.dll"
    2026-05-06T00:11:19.8751329Z "C:\a\2\s\MyCompany.Core.Standard.Tests\bin\Release\net48\MyCompany.Core.Standard.Tests.dll"
    2026-05-06T00:11:19.8751693Z "C:\a\2\s\MyCompany.Data.EventStream.Tests\bin\Release\net48\MyCompany.Data.EventStream.Tests.dll"
    2026-05-06T00:11:19.8752040Z "C:\a\2\s\MyCompany.Data.Tests\bin\Release\net48\MyCompany.Common.Tests.dll"
    2026-05-06T00:11:19.8752368Z "C:\a\2\s\MyCompany.Data.Tests\bin\Release\net48\MyCompany.Data.Tests.dll"
    2026-05-06T00:11:19.8752686Z "C:\a\2\s\MyCompany.Documents.Standard.Tests\bin\Release\net48\MyCompany.Documents.Standard.Tests.dll"
    2026-05-06T00:11:19.8752965Z "C:\a\2\s\MyCompany.EventStream.Tests\bin\Release\net48\MyCompany.EventStream.Tests.dll"
    2026-05-06T00:11:19.8753250Z "C:\a\2\s\MyCompany.ExportGenerator.Tests\bin\Release\net48\MyCompany.ExportGenerator.Tests.dll"
    2026-05-06T00:11:19.8753526Z "C:\a\2\s\MyCompany.Integrations.Tests\bin\Release\net48\MyCompany.Integrations.Tests.dll"
    2026-05-06T00:11:19.8753808Z "C:\a\2\s\MyCompany.Messaging.Standard.Tests\bin\Release\net48\MyCompany.Messaging.Standard.Tests.dll"
    2026-05-06T00:11:19.8754085Z "C:\a\2\s\MyCompany.Security.Tests\bin\Release\net8.0\MyCompany.Security.Tests.dll"
    2026-05-06T00:11:19.8754342Z "C:\a\2\s\MyCompany.Testing.Business\bin\Release\net48\MyCompany.Common.Tests.dll"
    2026-05-06T00:11:19.8754609Z "C:\a\2\s\MyCompany.Testing.Business\bin\Release\netstandard2.1\MyCompany.Common.Tests.dll"
    2026-05-06T00:11:19.8754871Z "C:\a\2\s\MyCompany.Utilities.Tests\bin\Release\net48\MyCompany.Common.Tests.dll"
    2026-05-06T00:11:19.8755134Z "C:\a\2\s\MyCompany.Utilities.Tests\bin\Release\net48\MyCompany.Utilities.Tests.dll"
    2026-05-06T00:11:19.8755414Z "C:\a\2\s\MyCompany.Utilities.Web.Standard.Tests\bin\Release\net48\MyCompany.Utilities.Web.Standard.Tests.dll"
    2026-05-06T00:11:19.8755692Z "C:\a\2\s\MyCompany.Webhooks.Tests\bin\Release\net48\MyCompany.Webhooks.Tests.dll"
    2026-05-06T00:11:19.8755955Z "C:\a\2\s\MyCompany.Workers.Tests\bin\Release\net48\MyCompany.Common.Tests.dll"
    2026-05-06T00:11:19.8756212Z "C:\a\2\s\MyCompany.Workers.Tests\bin\Release\net48\MyCompany.Workers.Tests.dll"
    2026-05-06T00:11:19.8756481Z "C:\a\2\s\tests\MyCompany.Admin.Api.Tests\bin\Release\net8.0\MyCompany.Admin.Api.Tests.dll"
    2026-05-06T00:11:19.8756755Z "C:\a\2\s\tests\MyCompany.Business.Tests\bin\Release\net8.0\MyCompany.Business.Tests.dll"
    2026-05-06T00:11:19.8757028Z "C:\a\2\s\tests\MyCompany.Business.Tests\bin\Release\net8.0\MyCompany.Core.Common.Tests.dll"
    2026-05-06T00:11:19.8757321Z "C:\a\2\s\tests\MyCompany.Core.Api.IntegrationTests\bin\Release\net10.0\MyCompany.Core.Api.IntegrationTests.dll"
    2026-05-06T00:11:19.8757624Z "C:\a\2\s\tests\MyCompany.Core.Api.Tests\bin\Release\net10.0\MyCompany.Core.Api.Tests.dll"
    2026-05-06T00:11:19.8757903Z "C:\a\2\s\tests\MyCompany.Core.Common.Tests\bin\Release\net8.0\MyCompany.Core.Common.Tests.dll"
    2026-05-06T00:11:19.8758208Z "C:\a\2\s\tests\MyCompany.Core.Webhook.Api.IntegrationTests\bin\Release\net8.0\MyCompany.Core.Webhook.Api.IntegrationTests.dll"
    2026-05-06T00:11:19.8758515Z "C:\a\2\s\tests\MyCompany.Core.Webhook.Api.Tests\bin\Release\net8.0\MyCompany.Core.Webhook.Api.Tests.dll"
    2026-05-06T00:11:19.8758812Z "C:\a\2\s\tests\MyCompany.Core.Webhooks.Tests\bin\Release\net8.0\MyCompany.Core.Webhooks.Tests.dll"
    2026-05-06T00:11:19.8759098Z "C:\a\2\s\tests\MyCompany.Data.Core.Tests\bin\Release\net8.0\MyCompany.Core.Common.Tests.dll"
    2026-05-06T00:11:19.8759498Z "C:\a\2\s\tests\MyCompany.Data.Core.Tests\bin\Release\net8.0\MyCompany.Data.Core.Tests.dll"
    2026-05-06T00:11:19.8759791Z "C:\a\2\s\tests\MyCompany.DataWorker.Manager.Tests\bin\Release\net10.0\MyCompany.DataWorker.Manager.Tests.dll"
    2026-05-06T00:11:19.8760095Z "C:\a\2\s\tests\MyCompany.DataWorker.Runner.Tests\bin\Release\net10.0\MyCompany.Core.Common.Tests.dll"
    2026-05-06T00:11:19.8760381Z "C:\a\2\s\tests\MyCompany.DataWorker.Runner.Tests\bin\Release\net10.0\MyCompany.DataWorker.Runner.Tests.dll"
    2026-05-06T00:11:19.8760672Z "C:\a\2\s\tests\MyCompany.Metadata.Api.Tests\bin\Release\net10.0\MyCompany.Metadata.Api.Tests.dll"
    2026-05-06T00:11:19.8761024Z "C:\a\2\s\tests\MyCompany.QueueWorker.Runner.IntegrationTests\bin\Release\net8.0\MyCompany.QueueWorker.Runner.IntegrationTests.dll"
    2026-05-06T00:11:19.8761331Z "C:\a\2\s\tests\MyCompany.QueueWorker.Runner.Tests\bin\Release\net8.0\MyCompany.Core.Common.Tests.dll"
    2026-05-06T00:11:19.8761622Z "C:\a\2\s\tests\MyCompany.QueueWorker.Runner.Tests\bin\Release\net8.0\MyCompany.QueueWorker.Runner.Tests.dll"
    2026-05-06T00:11:19.8761918Z "C:\a\2\s\tests\MyCompany.Repository.IntegrationTests\bin\Release\net8.0\MyCompany.Repository.IntegrationTests.dll"
    2026-05-06T00:11:19.8762210Z "C:\a\2\s\tests\MyCompany.Repository.Tests\bin\Release\net8.0\MyCompany.Core.Common.Tests.dll"
    2026-05-06T00:11:19.8762484Z "C:\a\2\s\tests\MyCompany.Repository.Tests\bin\Release\net8.0\MyCompany.Repository.Tests.dll"
    2026-05-06T00:11:19.8762793Z "C:\a\2\s\tests\MyCompany.ScheduledWorker.Runner.IntegrationTests\bin\Release\net8.0\MyCompany.ScheduledWorker.Runner.IntegrationTests.dll"
    2026-05-06T00:11:19.8763107Z "C:\a\2\s\tests\MyCompany.ScheduledWorker.Runner.Tests\bin\Release\net8.0\MyCompany.Core.Common.Tests.dll"
    2026-05-06T00:11:19.8763393Z "C:\a\2\s\tests\MyCompany.ScheduledWorker.Runner.Tests\bin\Release\net8.0\MyCompany.ScheduledWorker.Runner.Tests.dll"
    2026-05-06T00:11:19.8763677Z "C:\a\2\s\tests\MyCompany.ServiceDefaults.Tests\bin\Release\net8.0\MyCompany.Core.Common.Tests.dll"
    2026-05-06T00:11:19.8763951Z "C:\a\2\s\tests\MyCompany.ServiceDefaults.Tests\bin\Release\net8.0\MyCompany.ServiceDefaults.Tests.dll"
    2026-05-06T00:11:19.8764239Z /TestCaseFilter:"TestCategory!=Integration&TestCategory!=WorkspaceIntelligenceIntegration&TestCategory!=CoreOnlyPipeline"
    2026-05-06T00:11:19.8764516Z /Settings:"C:\a\_temp\qi1oy4112es.tmp.runsettings"
    2026-05-06T00:11:19.8764723Z /Logger:"trx"
    2026-05-06T00:11:19.8764927Z /TestAdapterPath:"C:\a\2\s"
    2026-05-06T00:11:19.8765189Z -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.CodeCoverage.UseVerifiableInstrumentation=False
    2026-05-06T00:11:20.9785493Z Starting test execution, please wait...
    2026-05-06T00:11:32.0329737Z A total of 49 test files matched the specified pattern.
    
    <snip>
    
    2026-05-06T00:17:56.4308992Z   Passed Delete_Matter_ClearsExternalFileLinks(SharePoint) [3 ms]
    2026-05-06T00:17:56.4309258Z   Passed Delete_Multiple_ClearsExternalFileLinks(Box) [6 ms]
    2026-05-06T00:17:56.4309524Z   Passed Delete_Multiple_ClearsExternalFileLinks(GDrive) [4 ms]
    2026-05-06T00:17:56.4309786Z   Passed Delete_Multiple_ClearsExternalFileLinks(SharePoint) [3 ms]
    2026-05-06T00:18:02.0058533Z Results File: C:\a\_temp\TestResults\AzDevOps_vmss-lawv0007U2_2026-05-06_00_11_50.trx
    2026-05-06T00:18:02.0125140Z Attachments:
    2026-05-06T00:18:02.0125705Z   C:\a\_temp\TestResults\0cfc031c-3527-4408-9c67-4fc02f446a9b\AzDevOps_vmss-lawv0007U2_2026-05-06.00_11_50.coverage
    2026-05-06T00:18:02.0421157Z Total tests: Unknown
    2026-05-06T00:18:02.0421662Z      Passed: 26604
    2026-05-06T00:18:02.0421978Z     Skipped: 53
    2026-05-06T00:18:02.0430119Z ##[error]Test Run Aborted with error System.AggregateException: One or more errors occurred. ---> System.Exception: Could not load file or assembly 'System.Collections.Immutable, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
    2026-05-06T00:18:02.0431386Z ##[error]   --- End of inner exception stack trace ---.
    2026-05-06T00:18:02.0433635Z  Total time: 6.4433 Minutes
    2026-05-06T00:18:02.1229016Z Vstest.console.exe exited with code 1.
    2026-05-06T00:18:02.1229595Z **************** Completed test execution *********************
    2026-05-06T00:18:02.1229880Z Is DonotPublishTestResults enabled false 
    2026-05-06T00:18:02.1368862Z Test results files: C:\a\_temp\TestResults\AzDevOps_vmss-lawv0007U2_2026-05-06_00_11_50.trx
    2026-05-06T00:18:03.7106330Z Created test run: 1307417
    2026-05-06T00:18:03.7107834Z Publishing test results: 26677
    2026-05-06T00:18:03.8088463Z Publishing test results to test run '1307417'.
    2026-05-06T00:18:03.8109145Z TestResults To Publish 26677, Test run id:1307417
    2026-05-06T00:18:03.8163008Z Test results publishing 1000, remaining: 25677. Test run id: 1307417
    2026-05-06T00:18:04.0643298Z Test results publishing 1000, remaining: 24677. Test run id: 1307417
    2026-05-06T00:18:04.2467669Z Test results publishing 1000, remaining: 23677. Test run id: 1307417
    2026-05-06T00:18:04.4361475Z Test results publishing 1000, remaining: 22677. Test run id: 1307417
    2026-05-06T00:18:04.6333671Z Test results publishing 1000, remaining: 21677. Test run id: 1307417
    2026-05-06T00:18:04.8100614Z Test results publishing 1000, remaining: 20677. Test run id: 1307417
    2026-05-06T00:18:05.0253073Z Test results publishing 1000, remaining: 19677. Test run id: 1307417
    2026-05-06T00:18:05.2336472Z Test results publishing 1000, remaining: 18677. Test run id: 1307417
    2026-05-06T00:18:05.4055079Z Test results publishing 1000, remaining: 17677. Test run id: 1307417
    2026-05-06T00:18:05.7239829Z Test results publishing 1000, remaining: 16677. Test run id: 1307417
    2026-05-06T00:18:05.8843330Z Test results publishing 1000, remaining: 15677. Test run id: 1307417
    2026-05-06T00:18:06.0877933Z Test results publishing 1000, remaining: 14677. Test run id: 1307417
    2026-05-06T00:18:06.2825845Z Test results publishing 1000, remaining: 13677. Test run id: 1307417
    2026-05-06T00:18:06.4545263Z Test results publishing 1000, remaining: 12677. Test run id: 1307417
    2026-05-06T00:18:06.6941202Z Test results publishing 1000, remaining: 11677. Test run id: 1307417
    2026-05-06T00:18:06.8749980Z Test results publishing 1000, remaining: 10677. Test run id: 1307417
    2026-05-06T00:18:07.0474685Z Test results publishing 1000, remaining: 9677. Test run id: 1307417
    2026-05-06T00:18:07.2341882Z Test results publishing 1000, remaining: 8677. Test run id: 1307417
    2026-05-06T00:18:07.4047502Z Test results publishing 1000, remaining: 7677. Test run id: 1307417
    2026-05-06T00:18:07.5757684Z Test results publishing 1000, remaining: 6677. Test run id: 1307417
    2026-05-06T00:18:07.7554218Z Test results publishing 1000, remaining: 5677. Test run id: 1307417
    2026-05-06T00:18:07.9384548Z Test results publishing 1000, remaining: 4677. Test run id: 1307417
    2026-05-06T00:18:08.2989461Z Test results publishing 1000, remaining: 3677. Test run id: 1307417
    2026-05-06T00:18:08.4950930Z Test results publishing 1000, remaining: 2677. Test run id: 1307417
    2026-05-06T00:18:08.6749716Z Test results publishing 1000, remaining: 1677. Test run id: 1307417
    2026-05-06T00:18:08.8546134Z Test results publishing 1000, remaining: 677. Test run id: 1307417
    2026-05-06T00:18:09.0549525Z Test results publishing 677, remaining: 0. Test run id: 1307417
    2026-05-06T00:18:09.1839804Z Published test results: 26677
    2026-05-06T00:18:09.1845683Z Publishing Attachments: 2
    2026-05-06T00:18:10.8261626Z Execution Result Code 1 is non zero, checking for failed results
    2026-05-06T00:18:10.8723922Z Completed TestExecution Model...
    2026-05-06T00:18:10.8855894Z 
    2026-05-06T00:18:10.9213839Z ##[warning]Vstest failed with error. Check logs for failures. There might be failed tests.
    2026-05-06T00:18:10.9215236Z ##[error]Error: The process 'C:\a\_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\3.271.0\Modules\DTAExecutionHost.exe' failed with exit code 1
    2026-05-06T00:18:10.9216178Z ##[error]Vstest failed with error. Check logs for failures. There might be failed tests.
    2026-05-06T00:18:10.9313241Z ##[section]Finishing: Test
    

    As an attempted workaround I tried using VisualStudioTestPlatformInstaller@1 with testPlatformVersion: 18.4.0 but it has the same error.

  17. nohwnd commented on May 6, 2026

    @nohwnd
    Member

    I tried it and I don't see the problem, can you please get diag logs: https://aka.ms/vstest/diag so I can see where exactly the error is coming from.

    maybe some of your extensions is outdated? but I see you only use code coverage and trx. And code coverage seems to pass just fine.

  18. added a commit that references this issue on May 6, 2026
    9c9c063
  19. mattfrear commented on May 7, 2026

    @mattfrear

    Thanks Jakub Jareš (@nohwnd) - by sharing the link to https://aka.ms/vstest/diag it reminded me that I could first try to repro this locally using vstest.console which is a much faster feedback loop than waiting for Azure DevOps to run our pipeline.

    Root cause for future readers was that one of our net8 test helper assemblies (which contained no tests) is called MyCompany.Core.Common.Tests, so it was accidentally being included via testAssemblyVer2: | **\MyCompany.*tests.dll.

    Once I excluded that dll the issue went away.

                  testAssemblyVer2: |
                    **\MyCompany.*tests.dll
                    !**\MyCompany.Core.Common.Tests.dll

    PS. it was all working fine when everything was net8 but only broke when one of our test assemblies was upgraded to net10.

  20. nohwnd commented on May 7, 2026

    @nohwnd
    Member

    Thanks for closing the loop. Luckily it is not a common issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions