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

Notifications

Announcements

No record found.

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
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Pallavi Phade Profile Picture

Pallavi Phade 98

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 60 Super User 2025 Season 2

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 43 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans