Missing modules or packages when loading Episerver site

  • Updated

If you see the following error see the resolution below

Did not find a module by assembly 'EPiServer.GoogleAnalytics, Version=, Culture=neutral, PublicKeyToken=null'
Parameter name: moduleAssembly

Usually when you first build a project it will build the necessary package updates. In some cases you may not have a package on first load or due to your own changes. 

Right click on the solution and click "restore nuget packages." 

If this fails, reinstall the package mentioned in the error. If it cannot find the package source do the following.

  1. Download and run Nuget Package Manager
  2. Change the feed to the Epi nuget feed.
  3. Find the appropriate package. In this case I search for Episerver.Google to get the analytics package.
  4. Download the package to the appropriate machine.
  5. Open the package sources.
    Tools > Nuget Package Manager > Package Manager Settings > Package Sources
  6. Uncheck all package sources not needed. 
  7. Create a new package source and point it to the directory where you saved the package file. 
  8. Right click on the project in question and click manage nuget packages. 
  9. Change the source to the new one you created and under browse find your package. 
  10. Install the package. 

Another option is deleting and reinstalling the modules.

  1. Backup the entire site. 
  2. Delete contents of \modules\protected\
  3. Run command update-package -reinstall to reinstall all packages. This should repopulate the protected\ folder.