Applies To
.NET Framework 4.7

Symptoms

Assume that you have an application on a computer that has the .NET Framework 4.7 installed. The application targets theĀ .NET Framework 4.6 and involves tuples (assume that you have added a reference toĀ aĀ ValueTuple package).Ā 

When you debug this application, error CS8179 occurs in the Expression EvaluatorĀ (Immediate Window, Watch, QuickWatch) type. This is because the compiler found two instances of the well-known type that are ambiguous.

NoteĀ This issue also occurs in scriptingĀ and the Interactive Window.

Cause

This error occurs because the implementation of ValueTuple types is included in the different assemblies thatĀ are loaded by the application.

Both Expression EvaluatorĀ and the scripting engines load the assemblies that are referenced by the application. This means that ValueTuple.dll and Mscorlib.dll (4.7) are loaded, and both include an implementation of ValueTuple types. The implementations of ValueTuple types do not unify.

Workaround

To work around this issue,Ā recompile the application against theĀ .NET Framework 4.7 instead of the .NET Framework 4.6 or earlier versions, and then remove the reference to the ValueTuple package, if possible. After you do this, only one implementation of ValueTuple will be present.

NoteĀ A fix for this issue is expected in aĀ future release of theĀ .NET Framework.

For more information about known issues in the .NET Framework 4.7, see Known issues for the .NET Framework 4.7.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.