Error while loading Echoes DLL - Could not load file or assembly

Hi

We’ve updated elements recently, but facing issues while reloading services with new DLL version

2022-03-02 08:47:12,279 [113] INFO LogInFile BaseService. EXCEPTION TimerElapsed = Could not load file or assembly ‘Echoes, Version=10.0.0.2617, Culture=neutral, PublicKeyToken=3df3cad1b7aa5098’ ou uma de suas dependências. A definição do manifesto do assembly localizado não corresponde à referência do assembly. (Exceção de HRESULT: 0x80131040)

We’ve replaced Echoes version from 10.0.0.2617 to 11.0.0.2705, but even restarting the specific service, some of them keep binded the older version instead the new one.

Elements version older: 10.0.0.2617
Elements version new: 11.0.0.2705

Is there a solution without restarting the server?

Thanks

Hi Anderson,

It looks like your project has some .dlls (or the .exe) build against the new version 11.0.0.2705 of Echoes.dll, while some other parts are still built against 10.0.0.2617 — maybe a dependency that was not rebuilt after you updated Elements.

You will most likely have to make sure that all parts of your app that depend on Echoes.dll get rebuilt with the new Elements version. You can use a tool such as ILSpy to look t each of your .dlls and see what others .dlls and versions they depend on, to find out which dll is the culprit.

Alternatively, though not ideal, adding both versions of Echoes.dll to the GAC might also work around this, but I’m not sure what if any, the unexpected side effects might be if two versions of Echoes.dll are loaded into the same process space and interact.

Restarting the server should not be necessary for this, no.

—marc

Hi

I’ve found a solution. It was cached information stored on the build server. We’ve changed our command line build.

Replaced:
EBuild project.sln --clean
EBuild project.sln --build --configuration:Debug --output-folder /project/bin/Debug

For:
EBuild project.sln --rebuild --configuration:Debug --output-folder /project/bin/Debug

Thank you.

Curious,. that should, quite literally, do exact the same thing…