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

  • Patrick74 Profile Picture
    Patrick74 5 on at
    RE: Could not load type 'System.ValueTuple`2' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

    Hi Sergio,

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

    Best Regards

    Patrick

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

    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.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,436 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans