My site was working just fine. I had Episerver support push production down to the integration, including DB and blobs. The site was working just fine. I did a push of code from Visual Studio using Web Deploy and now get the following error:
Did not find a module by assembly 'EPiServer.GoogleAnalytics, Version=220.127.116.11, Culture=neutral, PublicKeyToken=null'
Parameter name: moduleAssembly
I've seen someone else with the same issue but on an older version of Episerver. https://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2015/3/add-on---unable-to-find-a-module-by-assembly/ but his solution did not work for me. Nothing seems to work. Any ideas?
Have you tried this?
Yes. There are no failed project references. EPiServer.GoogleAnalytics package is listed as "installed" in the Nuget package manager, v2.3.1.
The EPiServer.GoogleAnalytics.dll is in the bin folder after building the project. I also see the EPiServer.GoogleAnalytics folder in modules\_protected folder.
The site runs just fine in Visual Studio, just not on the web after a deploy.
Do you mind setup the site locally and not running this from visual studio.
You can refer my blog if needed-
And then give it a try.
I had already done that as a test. Did a local file publish and created an IIS site to point to that output. Compiles and runs just fine. FYI, the local site is pointing to the Integration database hosted at Azure.
Did you check the DLL version? It might be possible that DLL version is different.
Just checked the file in the bin folder. It is the correct version, 18.104.22.168
This was working before, and is working in production now. Not sure why it is broken on this publish.
Now only one thing I can think about uninstalling this module and publish the complete solution again.
FYI - Please restart the web app once you deployed the code
I've removed the libraries(s) via NuGet. I say libraries since removing EPiServer.GoogleAnalytics causes all other libraries in the modules\_protected folder to throw the same error. This includes Episerver.LiveMonitor, Episerver.Forms, etc. I re-deployed and restarted the web app manually via the paasportal. Still get the same error. Seems like the path to the modules\_protected folder is not being found for some reason.
Any other ideas?
Ahh I think I found a article
Can you try this
Tried that. Didn't work. I did try this and it seemed to work. The modules loaded, but then it couldn't find the LiveMonitor.config file which is in the modules\_protected\EPiServer.LiveMonitor folder so it seems to be a path issue.
<add name="EPiServer.GoogleAnalytics" >
<add assembly="EPiServer.GoogleAnalytics" />
<add name="EPiServer.LiveMonitor" >
<add assembly="EPiServer.LiveMonitor" />
I also tried uninstalling the Episerver.Packaging assembly, which had no other dependencies. That didn't work.
I added Episerver.Packaging back, then ran the Move-EPiServerProtectedModules command, but it said the site was already configured to be in the /modules/_protected location.
So, just to follow up on this thread. I was never able to figure out exactly what was wrong with this. I had to step way back and reverse several commits and was able to get back to a working model. I then updated the code from all the commits and it is all working again. Now sure what caused the issue. Looks like it may have been a Visual Studio glitch? Either way, not able to mark an "accepted solution" but thanks for all the input.
Another follow up on this kind of errors.
Ensure that the module.config is present in the module folder in modules\_protected\xyz\.