Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions src/Polyfills/Polyfill.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// <auto-generated />

#pragma warning disable

// Binary-compatibility shim for the (now removed) Polyfill NuGet package.
//
// Older Microsoft.Testing extension assemblies (built before Polyfill switched to
// [Embedded] types) were compiled against `Polyfills.Polyfill.Deconstruct` and, through
// InternalsVisibleTo, bound that call to the copy declared in the core
// Microsoft.Testing.Platform assembly. When Polyfill was dropped, that method disappeared,
// so mixing a newer core with an older extension throws:
// System.MissingMethodException: Method not found: 'Void Polyfills.Polyfill.Deconstruct(...)'.
// Keeping this method on the [Embedded] Polyfill type (see ProcessExtensions.cs) restores the
// runtime binding without re-exposing the polyfill to source consumers.
// See https://github.com/microsoft/testfx/issues/9710.

using System;
using System.Collections.Generic;

namespace Polyfills;

internal static partial class Polyfill
{
[Obsolete("Binary-compatibility shim for pre-[Embedded] Polyfill extension assemblies (see https://github.com/microsoft/testfx/issues/9710). It has no source callers and MUST be removed in the next major version of Microsoft.Testing.Platform.")]
public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> target, out TKey key, out TValue value)
{
key = target.Key;
value = target.Value;
}
}
Loading