System.MissingMethodException: Method not found Connect-PnPOnline

Using Visual Studio Code and SharePoint PNP I was trying to make some updates to a list but I wasn’t able to connect to a site.

Connect-PnPOnline -Url "" -Credentials $creds

Error I was receiving:
System.MissingMethodException: Method not found: ‘System.Runtime.Remoting.ObjectHandle System.Activator.CreateInstance(System.String, System.String)’. at SharePointPnP.PowerShell.Commands.Base.ConnectOnline.ProcessRecord() at System.Management.Automation.CommandProcessor.ProcessRecord()

I tried uninstalling VScode, removed all traces of SharePoint from my laptop, and cleared the GAC. Nothing worked.

Here is what did work:
In VScode:

  1. Open the Command Palette on Windows or Linux with Ctrl+Shift+P. On macOS, use Cmd+Shift+P.
  2. Search for Session.
  3. Click on PowerShell: Show Session Menu.
  4. Choose one of the ___ (x86) options

Not sure how, but I was using an x64 session and SharePoint PNP clearly didn’t like that.