Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

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.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×