When the application fails to find and load an assembly (DLL), following exception is thrown:
System.IO.FileNotFoundException: Could not load file or assembly 'System.Configuration.ConfigurationManager, Version=22.214.171.124, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.
Reasons and Solutions
- The assembly itself is not found.In this case, the assembly is not present in your application path. Copy the assembly from release and paste it here and try again.
- The specific version of that assembly is not found.Sometimes, the assembly version referred by the application and the present assembly might vary due to incorrect deployment or during release process.
- Navigate to the application path.
- Open the application config file and template config file.
- Head to the "runtime" section under "configuration".
- You will find the assembly binding redirects. These are used to redirect references of "oldVersion" to "newVersion".Following is the sample assembly redirect:<runtime>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-126.96.36.199" newVersion="188.8.131.52" />
</runtime>Here, this says, that all references of assemblies from version 0.0.0.0 to 184.108.40.206 (oldVersion) should use 220.127.116.11 (new Version)
- So, you should copy the version of Newtonsoft.Json.dll of version 18.104.22.168
- So, if you found an error for this DLL, probably you are using different version DLL.
How to find assembly version?
For TMAC Server, version 22.214.171.12401 onwards assembly versions are printed in logs on start up. Until this version, file versions were printed.
Assembly and file versions are different.
To find assembly version, run this command in your powershell window:
Substitute your application path and assembly name here.
Once you find your assembly version, you can verify what version assembly you have and do the needful.
If this issue was due to the incorrect release and not due to wrong deployment process, report this to the developer so that release can be corrected.
For TMAC components, report to email@example.com
For WorkQueue components, report to firstname.lastname@example.org