1

Well I have a solution with 2 projects: One of them is a winforms project, the other one is a console application. With each execution, winforms project starts a process with console application .exe file as argument.

The problem is: The console project - when executed in a cmd.exe - loads all necessary assemblies correctly, but when executes through the winforms project, fails to load certain assembly and tries to resolve it, though the correct assembly is located besides the .exe file. TO be more specific, when console application executes alone, loads Newtonsoft.Json.dll ver 8.0 successfully, which it has been compiled against, but when it launched through winforms application, it fails to resolve the assembly and tries to load ver 6.0 and fails.

I'm using VS 2015 and Newtonsoft.Json.dll reference is manged by Nuget.

Can anybody please help me what is wrong here?

BHP
  • 443
  • 4
  • 13
  • have you tried clearing out all references to previous versions in your package.config files? – Pseudonym May 19 '16 at 21:26
  • The package.config file in console application was referencing the correct version. I deleted it and now everything is OK! Don't know what happened!! Also this is what I see in app.config file: ** ** – BHP May 19 '16 at 21:32
  • Mind if I post this as an answer then? – Pseudonym May 19 '16 at 21:33
  • Maybe the correct answer would be to delete the entire package.config file :) – BHP May 19 '16 at 21:36
  • You could I suppose, I believe it gets regenerated automatically – Pseudonym May 19 '16 at 21:37

1 Answers1

0

You may be referencing an old version, check you package.config file(s) and clear out any old unwanted versions. I have seen this happen a couple times on personal projects

Pseudonym
  • 2,052
  • 2
  • 17
  • 38