Error: Did not find a module by assembly 'EPiServer.GoogleAnalytics, Version=2.3.1.0, Parameter name: moduleAssembly

Vote:
 

Episerver 11

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=2.3.1.0, 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?

#224026
Jun 09, 2020 20:47
Vote:
 

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.

#224073
Jun 10, 2020 16:28
Vote:
 

Do you mind setup the site locally and not running this from visual studio.

You can refer my blog if needed-

http://www.ravindrarathore.com/blog/2019/02/21/hosting-a-episerver-site-in-iis-episerver-for-beginners.html 

And then give it a try.

#224075
Jun 10, 2020 16:35
Vote:
 

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.

#224076
Edited, Jun 10, 2020 17:49
Vote:
 

Hi Eric,

Did you check the DLL version? It might be possible that DLL version is different.

#224077
Jun 10, 2020 17:53
Vote:
 

Just checked the file in the bin folder.  It is the correct version, 2.3.1.0

This was working before, and is working in production now.  Not sure why it is broken on this publish.

#224079
Jun 10, 2020 18:06
Vote:
 

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

#224080
Jun 10, 2020 18:12
Vote:
 

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?

#224164
Jun 12, 2020 18:27
Vote:
 
#224183
Jun 13, 2020 3:41
Vote:
 

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" >
	<assemblies>
		<add assembly="EPiServer.GoogleAnalytics" />
	</assemblies>
</add>
<add name="EPiServer.LiveMonitor" >
	<assemblies>
		<add assembly="EPiServer.LiveMonitor" />
	</assemblies>
</add>

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.

#224268
Jun 15, 2020 16:32
Vote:
 

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.

#225841
Jul 28, 2020 16:01
Vote:
 

Another follow up on this kind of errors. 

Ensure that the module.config is present in the module folder in modules\_protected\xyz\.

#313861
Dec 07, 2023 12:28
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.