Episerver upgrade: Could not find a part of the path {wwwroot}\ClientResources\ClientResources\packages.config.

Just a short note on an exception I got after upgrading the Episerver NuGet packages on a few of my client’s websites. All of them worked perfectly, except the one that gave me the following message:

Could not find a part of the path {wwwroot}\ClientResources\ClientResources\packages.config.

It is the package.config inside the Shell.zip that it’s looking for. It turns out that the package installation had removed a few lines from the configuration file.

<episerver.shell>
  <protectedModules>
    <add name="Shell" />
    <add name="CMS" />
<system.webServer>
  <modules>
    <add name="ShellRoutingModule" type="EPiServer.Shell.Web.Routing.ShellRoutingModule, EPiServer.Shell" />
<system.web>
  <pages>
    <namespaces>
      <add namespace="EPiServer.Shell.Web.Mvc.Html" />