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.

[BUG] Invoke-PnPSiteTemplate: Could not load file or assembly 'OfficeDevPnP.Core, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

See original GitHub issue

Trying to run Invoke-PnPSiteTemplate, am getting the above error.

Expected behavior

Template to be applied to the connected site

Actual behavior

Returns the error:

Could not load file or assembly 'OfficeDevPnP.Core, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

Steps to reproduce behavior

Running Invoke-PnPSiteTemplate with a valid XML template

What is the version of the Cmdlet module you are running?

0.3.8

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
erwinvanhunencommented, Dec 15, 2020

Thank for you reporting this one! It was an issue with the OpenXML file handling. It tried to instantiate an instance of the assembly mentioned in namespace of the manifest.xml file which is in the .pnp file root folder. We are rewriting that one now before the openxml code can handle the package filename. The fix will be available tomorrow in the PnP.Framework preview release and the 0.3.9-nightly release of PnP PowerShell.

1reaction
erwinvanhunencommented, Dec 15, 2020

interesting! I can actually reproduce it using a .pnp file. Going to work on a fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not load file or assembly 'OfficeDevPnP.Core ...
Returns the error: Could not load file or assembly 'OfficeDevPnP.Core, Culture=neutral, PublicKeyToken=null'. The system cannot find the file ...
Read more >
Import-Module : Could not load file or assembly 'System. ...
I'm unable to run PnP PowerShell commands using PowerShell ISE in administrative mode. Getting following error PS C:\WINDOWS\system32> ...
Read more >
Could not load file or assembly, PublicKeyToken=null
4 Answers. This error usually means that the assembly was not found. Try verifying that the file exists in the directory where your...
Read more >
Tagged: Invoke-PnPSiteTemplate - Knowledge-Junction
Microsoft 365 - PnP PowerShell - resolving error - Import-Module : Could not load file or assembly 'System.Management ...
Read more >
Invoke-PnPSiteTemplate | PnP PowerShell
Applies a site template from an in-memory instance of a SiteTemplate type of the PnP Core Component, reading the supporting files, if any,...
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