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
    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
    SergioMarques Profile Picture
    on at
    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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 91

#3
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 78 Super User 2025 Season 1

Overall leaderboard

Product updates

Dynamics 365 release plans