Skip to content

Updating System.Collections.Immutable package reference to version 9.0.0#15392

Merged
nohwnd merged 10 commits intomicrosoft:mainfrom
MSLukeWest:main
Feb 19, 2026
Merged

Updating System.Collections.Immutable package reference to version 9.0.0#15392
nohwnd merged 10 commits intomicrosoft:mainfrom
MSLukeWest:main

Conversation

@MSLukeWest
Copy link
Copy Markdown
Contributor

Description

Starting in VS 18.4, VS and MSBuild now reference this newer version of System.Collections.Immutable. Now, when the UWP test host runtime provider tries to load MSBuild assemblies it will fail, because the test platform's copy of System.Collections.Immutable doesn't have methods that MSBuild uses:

Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Failed to launch testhost with error: System.AggregateException: One or more errors occurred. ---> System.TypeInitializationException: The type initializer for 'Microsoft.Build.Shared.XMakeElements' threw an exception. ---> System.MissingMethodException: Method not found: 'System.Collections.Frozen.FrozenSet`1<!!0> System.Collections.Frozen.FrozenSet.Create(System.Collections.Generic.IEqualityComparer`1<!!0>, System.ReadOnlySpan`1<!!0>)'.
   at Microsoft.Build.Shared.XMakeElements..cctor()

Related issue

Internal DevDiv bug 2692656

  • I have ensured that there is a previously discussed and approved issue.

@MSLukeWest
Copy link
Copy Markdown
Contributor Author

I only need to update it to 9.0

@MSLukeWest MSLukeWest changed the title Updating System.Collections.Immutable package reference to version 10.0.1 Updating System.Collections.Immutable package reference to version 9.0.0 Feb 6, 2026
@nohwnd
Copy link
Copy Markdown
Member

nohwnd commented Feb 10, 2026

Problem here is with the .net framework testhost we insert into sdk, the dependencies are determined by the packaging project (Microsoft.TestPlatform.CLI), and that project is not updating the version of the System.Collections.Immutable package.

We can quick fix, but a bigger fix would preferable to align this.

@MSLukeWest
Copy link
Copy Markdown
Contributor Author

Problem here is with the .net framework testhost we insert into sdk, the dependencies are determined by the packaging project (Microsoft.TestPlatform.CLI), and that project is not updating the version of the System.Collections.Immutable package.

We can quick fix, but a bigger fix would preferable to align this.

@nohwnd - What would the quick fix you mention be?

@nohwnd nohwnd merged commit 44bbf32 into microsoft:main Feb 19, 2026
6 checks passed
nohwnd added a commit that referenced this pull request Feb 20, 2026
…0.0 (#15392) (#15407)

* Updating System.Collections.Immutable package reference to version 10.0.1

* trigger GitHub actions

* Updating binding redirect

* Moving down to version 9.0.0

* Fix versions and redirects

* Moving version back to 9.0.0

* Update system.collections.immutable

* Setting NU1510 warning as message

* Moving suppression to NoWarn

* Trigger build

---------

Co-authored-by: nohwnd <me@jakubjares.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants