简体   繁体   中英

Sharepoint 2010 - PickerEntity method not found

I created form as webpart for Sharepoint Foundation 2010 with custom PickerEntity (used for pick IDs from MS SQL). When I deployed webpart to development environment (through right-click on project -> deploy), everything worked fine. When I deployed this webpart as .wsp Package to test or production environment (Release build config), I got error when in form in PickerEntity was saved wrong (non-exist) ID.

Error:

Message: System.MissingMethodException: Method not found: 'Microsoft.SharePoint.WebControls.PickerEntity[] Microsoft.SharePoint.WebControls.EntityEditor.ResolveErrorBySearch(System.String)'.

It should write error message on form "No exact match was found. Click the item(s) that did not resolve for more options.", but in runs to this error and fails to load rest of the form.

Class with method:

public class VendorEditor : EntityEditorWithPicker
{
.....
protected override PickerEntity[] ResolveErrorBySearch(string unresolvedText)
{
return base.ResolveErrorBySearch(unresolvedText);
}
.....
}

The error is "method not found"

What may be happening is:

  • It cannot find the method because it cannot find the dll
  • It cannot find the dll since a feature is not turned on

Check what is activated on your development machine compared with what is activated in production.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM