pnpframework icon indicating copy to clipboard operation
pnpframework copied to clipboard

Get-PnPListItem error: Get-PnPListItem : Could not find file 'PnP.Framework.resources'.

Open baharehesf opened this issue 2 years ago • 1 comments

Hello everybody,

I have a classic SharePoint site with more than 17,000 pages. These pages are in "Pages" library. There are some folders in Pages library. I want to get the pages in a specific folder. I used this query for retrieving the pages:

$Query = <View Scope='RecursiveAll'><Query><Where><Contains><FieldRef Name='FileRef' /><Value Type='Text'>Folder1</Value></Contains></Where><OrderBy><FieldRef Name='ID' Ascending='TRUE' /></OrderBy</Query><RowLimit>1000</RowLimit></View>

And this command:

Get-PnPListItem -List Pages -Query $Query

But I received this error:

Get-PnPListItem : Could not find file 'PnP.Framework.resources'. At line:1 char:1

  • Get-PnPListItem -List Pages -Query $Query
  •   + CategoryInfo          : WriteError: (:) [Get-PnPListItem], FileNotFoundException
      + FullyQualifiedErrorId : EXCEPTION,PnP.PowerShell.Commands.Lists.GetListItem
    
    
    

I tried this commands on the other site with less pages and worked perfectly. Do you guys have any idea about this issue?

baharehesf avatar Mar 23 '22 15:03 baharehesf

It looks like the exception handler is referencing a resource file that no longer exists. The code is trying to display an error message from the resource file, but fails. To see where the code is failing use Get-PnPException, at least until someone fixes the resource references.

conncampbell avatar Jun 27 '22 22:06 conncampbell

There doesn't seem to be any progress on this issue. Is anyone working on this?

btibbet avatar Dec 28 '22 19:12 btibbet

Are you using PS version 7?

jansenbe avatar Jan 05 '23 08:01 jansenbe

No, the PS version is: 5.1.19041.2364

baharehesf avatar Jan 10 '23 16:01 baharehesf

I am also getting this error message when trying to ConvertTo -PnPPage -Identity $PageName -AddPageAcceptBanner. I am migrating SP 2013 to SP 2019 Subscription Edition, using Modern pages. Can anyone tell me why I'm getting this error and/or how to resolve it?

Cheridbell2 avatar Feb 16 '23 20:02 Cheridbell2