Here is the actual code and error message:
#using System.Windows.Forms
#using System.Drawing
#using MYOB.AccountRight.SDK
#using MYOB.AccountRight.SDK.Services
#using MYOB.AccountRight.SDK.Contracts
===================================================================
METHOD OKButtonClick2() AS VOID
VAR configuration := ApiConfiguration{"
http://localhost:8080/accountright"}
VAR cfService := CompanyFileService{configuration}
VAR companyFiles := cfService.GetRange()
//Next step in the flow is to select a company file that supports v2 contracts
// for the AccountRight API - anything from 2013.3 and up will do here.
//VAR companyFile := companyFiles.FirstOrDefault({x => Version{x.ProductVersion} >= Version{"2013.3"}})
//The company file credentials are an AccountRight requirement with the SDK providing the
//CompanyFileCredentials class to encapsulate these. For our example the company file
//login details in use are username: Administrator with no password on the admin account.
//VAR credentials := CompanyFileCredentials{"Administrator",""}
//Now you are ready to start accessing resources directly from the API
//VAR accountService := AccountService{configuration}
//VAR accounts := accountService.GetRange(companyFile,NULL,credentials)
RETURN
END CLASS
=================================================
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
MYOB.AccountRight.SDK.ApiOperationException: Encountered an operation error (
http://localhost:8080/accountright) ---> System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=7.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)
at MYOB.AccountRight.SDK.Extensions.JsonExtensions.FromJson[T](String data)
at MYOB.AccountRight.SDK.Communication.BaseRequestHandler.ExtractDetails[T](HttpWebResponse response, String& location, HttpStatusCode& statusCode) in c:projectsaccountright-live-api-net-sdkMYOB.API.SDKSDKCommunicationBaseRequestHandler.cs:line 152
at MYOB.AccountRight.SDK.Communication.BaseRequestHandler.HandleResponseCallback[T,TResp](IAsyncResult asynchronousResult) in c:projectsaccountright-live-api-net-sdkMYOB.API.SDKSDKCommunicationBaseRequestHandler.cs:line 122
--- End of inner exception stack trace ---
at MYOB.AccountRight.SDK.Extensions.ExceptionExtensions.ProcessException(Exception ex, Uri requestUri) in c:projectsaccountright-live-api-net-sdkMYOB.API.SDKSDKExtensionsExceptionExtensions.cs:line 31
at MYOB.AccountRight.SDK.Services.ServiceBase.MakeApiGetRequestSync[T](Uri uri, ICompanyFileCredentials credentials, String eTag) in c:projectsaccountright-live-api-net-sdkMYOB.API.SDKSDKServicesServiceBase.cs:line 151
at MYOB.AccountRight.SDK.Services.CompanyFileService.GetRange() in c:projectsaccountright-live-api-net-sdkMYOB.API.SDKSDKServicesCompanyFileService.cs:line 45
at BasicForm.OKButtonClick2() in C:XIDEProjectsTom_Test1ApplicationsMYOB_Test1PrgForm1.prg:line 67
at BasicForm.OKButtonClick(Object sender, EventArgs e) in C:XIDEProjectsTom_Test1ApplicationsMYOB_Test1PrgForm1.prg:line 56
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3062.0 built by: NET472REL1
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
MYOB_Test1
Assembly Version: 0.0.0.0
Win32 Version: 0.0.0.0
CodeBase: file:///C:/XIDE/Projects/Tom_Test1/Bin/Debug/MYOB_Test1.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3062.0 built by: NET472REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3062.0 built by: NET472REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3062.0 built by: NET472REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3062.0 built by: NET472REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3062.0 built by: NET472REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.7.3062.0 built by: NET472REL1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
MYOB.AccountRight.SDK
Assembly Version: 2016.2.99.0
Win32 Version: 2016.2.99.0
CodeBase: file:///C:/XIDE/Projects/Tom_Test1/Bin/Debug/MYOB.AccountRight.SDK.DLL
----------------------------------------
************** JIT Debugging **************