Forum Discussion

cristinadulau's avatar
cristinadulau
Copper Contributor
May 09, 2023
Solved

Method Not Found when running the application after some Windows updates

Hi everybody,

 

After some Windows updates, I encountered a really annoying error. 

 

I don't have any compile errors, but when I run the application I get 'Method Not Found' error.

 Method not found: 'System.Collections.Generic.IList`1<Microsoft.SharePoint.Client.ListItemFormUpdateValue> Microsoft.SharePoint.Client.ListItem.ValidateUpdateListItem(System.Collections.Generic.IList`1<Microsoft.SharePoint.Client.ListItemFormUpdateValue>, Boolean, System.String)'

 

I checked the ListItem class and the method is there.

 

We are using the Microsoft.SharePoint.Client, Version=15.0.0.0.

 

Do you have any idea what could be the problem?

 

Thanks,

Cristina.

 

  • It's possible that the error you're encountering is due to a version mismatch between the Microsoft.SharePoint.Client.dll that your application is referencing and the actual version of the SharePoint server that you're connecting to. The error message suggests that the method 'ValidateUpdateListItem' is not being found at runtime, even though it is present in the Microsoft.SharePoint.Client.ListItem class.

    One possible solution is to update the version of the Microsoft.SharePoint.Client.dll that your application is referencing to match the version of the SharePoint server that you're connecting to. You can do this by checking the version of the SharePoint server that you're connecting to and then updating the reference to the appropriate version of the Microsoft.SharePoint.Client.dll.

    To check the version of the SharePoint server that you're connecting to, you can use the following PowerShell command:

    (Get-SPFarm).BuildVersion

    This will return the version number of the SharePoint server, such as 15.0.4569.1000.

    Once you have determined the version of the SharePoint server, you can update the reference to the appropriate version of the Microsoft.SharePoint.Client.dll in your application. You can do this by right-clicking on the project in Visual Studio, selecting "Add Reference", and then selecting the appropriate version of the Microsoft.SharePoint.Client.dll from the list of available assemblies.

    If updating the reference does not resolve the issue, it's possible that there may be another issue with the code or configuration of your application. In this case, you may want to consider reaching out to Microsoft support or a SharePoint developer for further assistance.
  • It's possible that the error you're encountering is due to a version mismatch between the Microsoft.SharePoint.Client.dll that your application is referencing and the actual version of the SharePoint server that you're connecting to. The error message suggests that the method 'ValidateUpdateListItem' is not being found at runtime, even though it is present in the Microsoft.SharePoint.Client.ListItem class.

    One possible solution is to update the version of the Microsoft.SharePoint.Client.dll that your application is referencing to match the version of the SharePoint server that you're connecting to. You can do this by checking the version of the SharePoint server that you're connecting to and then updating the reference to the appropriate version of the Microsoft.SharePoint.Client.dll.

    To check the version of the SharePoint server that you're connecting to, you can use the following PowerShell command:

    (Get-SPFarm).BuildVersion

    This will return the version number of the SharePoint server, such as 15.0.4569.1000.

    Once you have determined the version of the SharePoint server, you can update the reference to the appropriate version of the Microsoft.SharePoint.Client.dll in your application. You can do this by right-clicking on the project in Visual Studio, selecting "Add Reference", and then selecting the appropriate version of the Microsoft.SharePoint.Client.dll from the list of available assemblies.

    If updating the reference does not resolve the issue, it's possible that there may be another issue with the code or configuration of your application. In this case, you may want to consider reaching out to Microsoft support or a SharePoint developer for further assistance.

Resources