You're probably running into a pretty common issue. I've detailed the steps below, but they're sourced from: https://www.sitecorenutsbolts.net/2018/03/12/Sitecore-9-Installation-Could-not-load-file-or-assembly-ChilkatDotNet46/
- Go to your site's application pool settings.
Enable 32-bit Applications is set to
If that doesn't solve your problem, we'll need a bit more information. You can see the detailed stack trace for why this assembly isn't loading by doing two different things:
Look at the loader exceptions while debugging
This will normally catch 99% of problems when attempting to load assemblies.
- Attach the VS debugger to your site
- In the "Exception Settings" window (Debug -> Windows -> Exception Settings) break on the following:
System.TypeLoadException. If the full stack trace is throwing a different exception you can break on that as well.
- Look at the exception details. Depending on the exception thrown look at the
LoaderExceptions property. You may need to drill down into each child
InnerExceptions property to see more detailed information.
If the above fails to give you any decent information you'll need to enable fusion logging and view the logs generated from that:
Enable Fusion (Fuslogvw.exe) logging in your environment
Follow the instructions laid out in this SO post (using regedit): https://stackoverflow.com/questions/255669/how-to-enable-assembly-bind-failure-logging-fusion-in-net
DWORD ForceLog set value to 1
DWORD LogFailures set value to 1
DWORD LogResourceBinds set value to 1
DWORD EnableLog set value to 1
String LogPath set value to folder for logs (e.g. C:\FusionLog\)
Once that is enabled, run the
Fuslogvw.exe (https://docs.microsoft.com/en-us/dotnet/framework/tools/fuslogvw-exe-assembly-binding-log-viewer) tool, recycle your application pool and inspect any logs that appear for the problem DLL.
Remember to revert those registry settings after you've gathered those logs (or hopefully solved the issue). Otherwise you'll be wasting a lot of disk space and CPU!
Let us know what you find!