I am using Newtonsoft.Json
in my Windows Service project.
My Newtonsoft.Json
version is 6.0.0.0
and I have it referenced in my Project's References.
Installation and compilation go through just fine. But when I start my service from Services
it throws an exception:
Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
I also searched the web and added the following in my app.config
file:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json"
publicKeyToken="30AD4FE6B2A6AEED" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
But still getting the same error.
What am I doing wrong?