question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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?

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
conncampbellcommented, Jun 27, 2022

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.

0reactions
Cheridbell2commented, Feb 16, 2023

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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get-PnPList item on SharePoint 2019 returns Could not ...
I am getting an error message "Could not find file 'PnP.Framework.resources'". Because it's on-prem, I have added to the connection ...
Read more >
Fix "Get-PnPListItem : The attempted operation is ...
Problem : When trying to get list items from a SharePoint Online list using Get-PnPListItem cmdlet with a query parameter, I got an...
Read more >
Get-PnPSiteTemplate | PnP PowerShell
Extracts a provisioning template in Office Open XML from the current web, and for supported artifacts it will create a resource file for...
Read more >
Tutorial: How to use SharePoint PnP with Powershell
The command is “New-PnPWeb”. CRUD FOR List. You can search for PnP commands using. Get-Command *PnP*. Even if you do not know how...
Read more >
Use PnP PowerShell commands to fortify SharePoint ...
Try these PnP PowerShell commands for file and folder management in SharePoint Online to see how this module makes it easier to work...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found