Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

System.Configuration.ConfigurationErrorsException: The value 'Microsoft.Xrm.Client.Configuration.CrmConfigurationProvider, Microsoft.Xrm.Client' is not recognized as a valid type or is not of the type 'Microsoft.Xrm.Client.Configuration.CrmConf

(0) ShareShare
ReportReport
Posted on by

I recently upgraded to CRM 2016. I have a custom workflow plugin that was originally written targeting CRM 2011.

When the workflow is triggered it tries to lookup some related entities but the following exception is thrown and I am not sure why.

The Microsoft.Xrm.Client dll is in the GAC of the 

Does anyone know of a solution?

Unhandled Exception: Microsoft.Xrm.Sdk.InvalidPluginExecutionException: Exception has been thrown by the target of an invocation.
at MyPlugin.MyActivity.Execute(CodeActivityContext executionContext)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
Inner Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at Microsoft.Xrm.Sdk.Linq.QueryProvider.DynamicInvoke(Delegate project, Object[] args)
at Microsoft.Xrm.Sdk.Linq.QueryProvider.<>c__DisplayClassb.<ExecuteAnonymousType>b__7(<>f__AnonymousType0`2 <>h__TransparentIdentifier3)
at System.Linq.Enumerable.<>c__DisplayClass12`3.<CombineSelectors>b__11(TSource x)
at System.Linq.Enumerable.<>c__DisplayClass12`3.<CombineSelectors>b__11(TSource x)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.<CastIterator>d__b1`1.MoveNext()
at Microsoft.Xrm.Sdk.Linq.PagedItemCollection`1.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at MyPlugin.MyActivity.Execute(CodeActivityContext executionContext)
Inner Exception: System.Configuration.ConfigurationErrorsException: The value 'Microsoft.Xrm.Client.Configuration.CrmConfigurationProvider, Microsoft.Xrm.Client' is not recognized as a valid type or is not of the type 'Microsoft.Xrm.Client.Configuration.CrmConfigurationProvider'.
at Microsoft.Xrm.Client.Configuration.CrmConfigurationManager.CreateProvider()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at Microsoft.Xrm.Client.Threading.LockManager.CreateProvider()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at Microsoft.Xrm.Client.Threading.LockManager.Lock[T](String key, Func`1 action)
at Microsoft.Xrm.Client.EntityExtensions.GetRelated[T](Entity entity, Relationship relationship, Func`1 action)
at Microsoft.Xrm.Client.EntityExtensions.GetRelated[T](OrganizationServiceContext context, Entity entity, String relationshipSchemaName, Nullable`1 primaryEntityRole, Func`4 action)
at Microsoft.Xrm.Client.CrmEntity.GetRelatedEntity[TEntity](String relationshipSchemaName, Nullable`1 primaryEntityRole)
at Xrm.Connection.get_contact_connections1()

*This post is locked for comments

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,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans