Fixed – System.FormatException: Input string was not in a correct format exception while registering Plugin in Dynamics 365


We might get the below error while trying to register a plugin.




Cause

The plugin project was referring the .NET Framework 4.7.2


And the latest version of Microsoft.CrmSdk.CoreAssemblies – (Sept 29, 2020)

2020-11-10_19-33-39

Resolution –

Changing it to 4.6.2 fixed it.



Details-

Unhandled Exception: System.ServiceModel.FaultException

An unexpected error occurred.

Server stack trace:

at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)

at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)

at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)

at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:

at Microsoft.Xrm.Tooling.Connector.CrmServiceClient.Create(Entity entity)

at Xrm.Sdk.PluginRegistration.Forms.PluginRegistrationForm.btnRegister_Click(Object sender, EventArgs e)

Detail:

<OrganizationServiceFault xmlns=”http://schemas.microsoft.com/xrm/2011/Contracts&#8221; xmlns:i=”http://www.w3.org/2001/XMLSchema-instance”&gt;

<ActivityId>6906e911-4a07-487a-bdf0-ad52914b9f14</ActivityId>

<ErrorCode>-2147220970</ErrorCode>

<ErrorDetails xmlns:a=”http://schemas.datacontract.org/2004/07/System.Collections.Generic”&gt;

<KeyValuePairOfstringanyType>

<a:key>ApiExceptionSourceKey</a:key>

<a:value i:type=”b:string” xmlns:b=”http://www.w3.org/2001/XMLSchema”>Plugin/Microsoft.Crm.ObjectModel.PluginAssemblyService</a:value&gt;

</KeyValuePairOfstringanyType>

<KeyValuePairOfstringanyType>

<a:key>ApiOriginalExceptionKey</a:key>

<a:value i:type=”b:string” xmlns:b=”http://www.w3.org/2001/XMLSchema”>Microsoft.Crm.CrmException: An unexpected error occurred. —&gt; System.FormatException: Input string was not in a correct format.

at System.Text.StringBuilder.FormatError()

at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)

at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)

at System.String.Format(IFormatProvider provider, String format, Object arg0, Object arg1)

at Microsoft.Crm.ObjectModel.TargetFrameworkVersionValidator.ValidateInternal()

at Microsoft.Crm.ObjectModel.PluginValidatorBase.Validate()

at Microsoft.Crm.ObjectModel.PluginAssemblyServiceInternal`1.ValidateAssemblyMetadata(ExecutionContext context, IBusinessEntity pluginAssembly, CrmPluginAssemblyMetadata assemblyMetadata)

at Microsoft.Crm.ObjectModel.PluginAssemblyServiceInternal`1.VerifyRegistrationAbility(IBusinessEntity pluginAssembly, Boolean createCall, ExecutionContext context, CrmPluginAssemblyMetadata assemblyMetadata)

at Microsoft.Crm.ObjectModel.PluginAssemblyServiceInternal`1.ValidateOperation(String operationName, IBusinessEntity entity, ExecutionContext context)

at Microsoft.Crm.ObjectModel.SdkEntityServiceBase.CreateInternal(IBusinessEntity entity, ExecutionContext context, Boolean verifyAction)

— End of inner exception stack trace —

at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)

at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)

at Microsoft.Crm.Extensibility.Pipeline.&lt;&gt;c__DisplayClass5_0.&lt;RunStep&gt;b__0()</a:value>

</KeyValuePairOfstringanyType>

<KeyValuePairOfstringanyType>

<a:key>ApiStepKey</a:key>

<a:value i:type=”b:guid” xmlns:b=”http://schemas.microsoft.com/2003/10/Serialization/”>3ecabb1b-ea3e-db11-86a7-000a3a5473e8</a:value&gt;

</KeyValuePairOfstringanyType>

<KeyValuePairOfstringanyType>

<a:key>ApiDepthKey</a:key>

<a:value i:type=”b:int” xmlns:b=”http://www.w3.org/2001/XMLSchema”>1</a:value&gt;

</KeyValuePairOfstringanyType>

<KeyValuePairOfstringanyType>

<a:key>ApiActivityIdKey</a:key>

<a:value i:type=”b:guid” xmlns:b=”http://schemas.microsoft.com/2003/10/Serialization/”>6906e911-4a07-487a-bdf0-ad52914b9f14</a:value&gt;

</KeyValuePairOfstringanyType>

<KeyValuePairOfstringanyType>

<a:key>ApiPluginSolutionNameKey</a:key>

<a:value i:type=”b:string” xmlns:b=”http://www.w3.org/2001/XMLSchema”>System</a:value&gt;

</KeyValuePairOfstringanyType>

<KeyValuePairOfstringanyType>

<a:key>ApiStepSolutionNameKey</a:key>

<a:value i:type=”b:string” xmlns:b=”http://www.w3.org/2001/XMLSchema”>System</a:value&gt;

</KeyValuePairOfstringanyType>

<KeyValuePairOfstringanyType>

<a:key>ApiExceptionCategory</a:key>

<a:value i:type=”b:string” xmlns:b=”http://www.w3.org/2001/XMLSchema”>SystemFailure</a:value&gt;

</KeyValuePairOfstringanyType>

<KeyValuePairOfstringanyType>

<a:key>ApiExceptionMesageName</a:key>

<a:value i:type=”b:string” xmlns:b=”http://www.w3.org/2001/XMLSchema”>UnExpected</a:value&gt;

</KeyValuePairOfstringanyType>

<KeyValuePairOfstringanyType>

<a:key>ApiExceptionHttpStatusCode</a:key>

<a:value i:type=”b:int” xmlns:b=”http://www.w3.org/2001/XMLSchema”>400</a:value&gt;

</KeyValuePairOfstringanyType>

</ErrorDetails>

Hope it helps..



 

Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

9 thoughts on “Fixed – System.FormatException: Input string was not in a correct format exception while registering Plugin in Dynamics 365”

Please share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

The CRM Ninja

Thoughts & musings from a Dynamics 365 Ninja!

CRM for You and Me

Customer Relationship Mgt App for the Professional

D CRM Explorer

Learn about Microsoft Dynamics CRM Power Platform customization and implementation and other cool stuffs

Stroke // Jonas Rapp

I know pre-stroke. I will improve who I was.

Power Melange

Power Melange By Shalinee

Clavin's Blog

Power Automate - Power Apps - SharePoint Online - Azure - Nintex - K2 - Artificial Intelligence

Sat Sangha Salon

An Inquiry in Being

The Indoencers

The Influencers & Influences of Indian Music

Monika Halan's blog

Hand's-free money management

D365 Demystified

A closer look at Microsoft Dynamics 365.

Microsoft Mate (msftmate) - Andrew Rogers

Experienced consultant primarily focused on Microsoft Dynamics 365 and the Power Platform

Knowhere365

Specific topics by Django Lohn on the whole Microsoft365 Stack

Manmit Rahevar's Blog

One Stop Destination for Microsoft Technology Solutions

MG

Naturally Curious

Brian Illand

Power Platform and Dynamics 365

Steve Mordue MVP

A Microsoft Business Applications MVP

Subwoofer 101

Bass defines your home theater

SQLTwins by Nakul Vachhrajani

SQL Server tips and experiences dedicated to my twin daughters.

Everything D365

Discovering Azure DevOps and D365 Business Applications

Tech Wizard

Lets do IT Spells

Two Bite Tips

Valuable Tips To Grow Your Business

XRM Tricks (Power Platform & Dynamics CRM )

Power Platform & Dynamics CRM

CRM TIPS BY PRM

Mail to crmtipsbyprm@gmail.com for queries and suggestions

nijos.dev

Giving back to the community what I have learned

xrm CRM Dynamics

Dynamics CRM Technical & Functional Info

Dynamics 365 Blogs - Explained in unique way

Sometimes you need to look at things from different perspective.

CRM Keeper

Dynamics 365 Customer Engagement, CRM, Microsoft CRM, Dynamics CRM

EVOLVED365

Step into the world of a Dynamics 365 Consultant

Dianamics PCF Lady

Diana & Dynamics 365 & Power Platform

Sara Lagerquist

No Code Customization Concepts

innovativeaj

developer, designer, writer, fun loving, patriotic, humble and a sweet person inside out :) love and respect people who have a great sense of humor.

Temmy Wahyu Raharjo

Dreaming to be a clean coder and TDD minded programmer.

Transform 365

We blog about problems we face and code we write to help others

%d bloggers like this: