Description
System.Collections.Immutable currently has InternalsVisibleTo to its tests. This is something we try hard to avoid. We should remove the reliance on internals from the tests and switch the tests over to referencing the reference assembly. Some of the validation can be moved to being debug-only asserts in the actual implementation. Other use of internals are purely for convenience. Other uses could be achieved via either reflection or more preferably by separating out the small amount of internals use into a separate unit tests project that builds the relevant product src into the test, ala what's done in networking tests, in regex, etc.
Fixing this will shrink the size of the product assembly (the linker will be able to trim it), will avoid future issues like #107840, will enable our analyzers that bail on IVT to work for S.C.I, and will make it more consistent with the rest of dotnet/runtime.