web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Could not load type 'System.ValueTuple`2' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

(0) ShareShare
ReportReport
Posted on by 5

Hi,
I use Visual Studio 2017, .NET Framework 4.7.1 and Dynamics CRM online 9.0.2.


In code I use the ValueTuple introduced in .NET Framework 4.7.
For example:

var retValue = (retCode: statusCode, retMsg: result);


The plugin can be properly registered using the Plugin Registration Tool.


When the plugin is executed, the following error message is displayed:
Could not load type 'System.ValueTuple`2' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
According to the documentation the CRM supports SDK version 4.6.2 or higher.


Anyone have an idea?


Many thanks in advance
Patrick

I have the same question (0)
  • Verified answer
    SergioMarques Profile Picture
    Microsoft Employee on at

    Hi Patrick,

    Can you try to build the plugin with .Net Framework version 4.6.2 ?

    Although the recommend version for custom client applications (console applications) is 4.7.2 

    https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/visual-studio-dot-net-framework

    The .NET SDK assemblies for Dynamics 365 for Customer Engagement are built on .NET Framework version 4.6.2.

    You can use Visual Studio to build your managed code applications using .NET Framework version 4.6.2 or later.

    The recommended version for plugins and custom workflow activities is 4.6.2.

    https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/write-plug-in

    Use .NET Framework 4.6.2

    Plug-ins and custom workflow assemblies should use .NET Framework 4.6.2. While assemblies built using later versions should generally work, if they use any features introduced after 4.6.2 an error will occur.

    Thank you.

  • Patrick74 Profile Picture
    5 on at

    Hi Sergio,

    Thanks for your answer. Then I will return to 4.6.2.

    Best Regards

    Patrick

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
11manish Profile Picture

11manish 165

#2
ManoVerse Profile Picture

ManoVerse 156 Super User 2026 Season 1

#3
Zhilan Profile Picture

Zhilan 49

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans