Newtonsoft version 9 dependency

78 views
Skip to first unread message

Erik

unread,
Jun 19, 2018, 8:17:50 PM6/19/18
to SpecRun
Another engineer recently upgraded our acceptance tests project's reference to Newstonsoft from 9 to 11.  This caused the following exception in our build server and inability to produce the html report for artifacts and debugging.

[16:26:18][Step 10/13] System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
[16:26:18][Step 10/13] File name: 'Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
[16:26:18][Step 10/13]    at TechTalk.SpecRun.Framework.Reporting.CustomReferenceResolver..ctor()
[16:26:18][Step 10/13]    at TechTalk.SpecRun.Framework.Reporting.RazorRenderer.RenderReport(TestRunResult testRunResult, Report report)
[16:26:18][Step 10/13]    at TechTalk.SpecRun.Framework.Reporting.ReportingEngine.GenerateReport(TestRunResult testRunResult, Report report)
[16:26:18][Step 10/13]    at TechTalk.SpecRun.Framework.Reporting.ExecutionReporter.ReportResult(TestRunResult result)
[16:26:18][Step 10/13]    at TechTalk.SpecRun.Framework.ExecutionEngine.ExecuteTestSuite(TestProfile testProfile, TestRunExecutionConfiguration executionConfiguration, IExecutionContainerBuilder containerBuilder)
[16:26:18][Step 10/13]    at TechTalk.SpecRun.ConsoleRunner.ConsoleRunnerEngine.Run()
[16:26:18][Step 10/13]    at TechTalk.SpecRun.ConsoleRunner.Program.Run(String target, String baseFolder, String outputFolder, String logFile, String reportFile, String filter, String toolIntegration, Boolean waitForDebuggerToAttach)
[16:26:18][Step 10/13]    at lambda_method(Closure , Object , Object[] )
[16:26:18][Step 10/13]    at NConsoler.Consolery.Run(Type targetType, String[] args, IMessenger messenger, Notation notationType)
[16:26:18][Step 10/13]    at TechTalk.SpecRun.ConsoleRunner.Program.Main(String[] args)

Is there a plan to update this version in SpecRun or otherwise handle the dependency?

Andreas Willich

unread,
Jun 20, 2018, 3:54:23 AM6/20/18
to SpecRun
Hi Erik

I have to look at this, why it tries to load Version 9 of Json.NET.
Which runner version are you using?

In the meantime, you should be able to fix this, if you change/add the assembly binding redirect for Newtonsoft.Json in the specrun.exe.config.
It should look like this:

      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
      </dependentAssembly>


Best regards
Andreas


Erik

unread,
Jun 20, 2018, 5:02:10 PM6/20/18
to SpecRun
Hi Andreas, currently running 1.6.3 and I can try to update the config to see if that does the job.  However that is still quite an old version by default.  I am trying to update runner & specflow to the latest versions as well (as mentioned in my other post), which perhaps that would resolve this as well, if I can successfully upgrade. 

Thanks,

Erik

Erik

unread,
Jun 20, 2018, 8:46:28 PM6/20/18
to SpecRun
Aaaah.... my bad on this one.  We were moving specrun.exe around on the build server and not taking its Newtonsoft.dll with it.  Sorry about the false alarm!


On Wednesday, June 20, 2018 at 1:54:23 AM UTC-6, Andreas Willich wrote:

Andreas Willich

unread,
Jun 21, 2018, 3:43:21 AM6/21/18
to spe...@googlegroups.com
Good to hear that you have sortet this out.

--
You received this message because you are subscribed to the Google Groups "SpecRun" group.
To unsubscribe from this group and stop receiving emails from it, send an email to specrun+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages