Unable to display this Web Part: Unable to cast object of type ‘System.Reflection.RuntimeMethodInfo’ to type ‘System.Type’

Issue

You get the “Unable to display this Web Part.” error message on any modified view.

image 

Tracking down SharePoint Logs for the correlation id contain the following:

Error while executing web part: System.InvalidCastException: Unable to cast object of type ‘System.Reflection.RuntimeMethodInfo’ to type ‘System.Type’.     at Microsoft.Xslt.MethodCollection.MethodDescription.DeclareDynamicMethod(MethodCollection methodColl)     at Microsoft.Xslt.MethodCollection.CreateDynamicMethods()     at Microsoft.Xslt.MethodCollection.GetMethodInfoInternal(Int32 methodNumber)     at Microsoft.Xslt.MethodCollection.GetMethodInfo(Int32 methodNumber)     at Microsoft.Xslt.STransform.GetCompiledTransform()     at Microsoft.SharePoint.WebPartPages.BaseXsltListWebPart.LoadXslCompiledTransform(WSSXmlUrlResolver someXmlResolver)     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.GetXslCompiledTransform()     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareA…
…ndPerformTransform(Boolean bDeferExecuteTransform)

Cause

This seems to be a Microsoft bug and only occurs after occasional app pool resets

Resolution

IIS Reset

OR

Open the view in SharePoint Designer and Save the view again.

Thanks you Smile

Enjoy SharePointing Open-mouthed smile Open-mouthed smile Open-mouthed smile

Advertisements

One thought on “Unable to display this Web Part: Unable to cast object of type ‘System.Reflection.RuntimeMethodInfo’ to type ‘System.Type’

Leave a Reply

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 )

Google photo

You are commenting using your Google 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