Visual Studio Debugging dll dependency error -
in visual studio 2015, have project (web api application) , project b (mvc application) in same solution.
i can debug application , application b separately. but, when application b calls rest api a, receive dll dependency error application a.
"could not load file or assembly 'newtonsoft.json' or 1 of dependencies. located assembly's manifest definition not match assembly reference".
when clean build project a, @ first time call successful, subsequent calls receive same error.
how can fix this?
(i use iis 7.5)
to solve this, please mark sure 2 projects used same newtonsoft.json version.
you can run following command:
update-package newtonsoft.json -reinstall
please view web.config, maybe remove old version like:
<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> generally if want ensure newtonsoft.json packages same version, can specify version:
update-package newtonsoft.json -version 6.0.0 -reinstall
reference:
could not load file or assembly 'newtonsoft.json, version=7.0.0.0
http://blog.myget.org/post/2014/11/27/could-not-load-file-or-assembly-nuget-assembly-redirects.aspx
Comments
Post a Comment