0

I'm trying to get the Codeunit 50000 in this zip file to work: https://kappiwebhosting.blob.core.windows.net/dynamcisis/2015/09/Json.zip Found here: https://dynamics.is/?p=2303

C/AL Globals

I'm trying to get Dynamics Nav 2009 to recognize the NewtonSoft.Json.dll, but no matter which version i try, i get this error as soon i want to verify the DotNet variable "JsonTextReader"/"JsonTextWriter" when selecting the subtype.

.NET interop: exception occured, 'Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.'.

If i declare a new Test variable of type DonNet and click [...] to select it from scratch i got this error when trying to choose which assembly to use:

.NET interop: exception occured, 'Could not load file or assembly 'C:\Program Files (x86)\Microsoft Dynamics NAV\60\Classic\Add-ins\Newtonsoft.Json.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.'.

The Newtonsoft.Json.dll file is present ind the folder, and "Everyone" have full control to the folder as well as the file.

The Json.zip file contain a single Newtonsoft.Json.dll which i started out with. Same error. The i downloaded the https://github.com/JamesNK/Newtonsoft.Json/releases and tried all versions with the same result.

Why all this? Yes, the company i work for have decided to start using Shopify, and i need to write an interface for getting orders from Shopify etc.

I really cannot figure out why i can't get this to work. There are 3 other DotNet "variables" that's configured and works as intended with no errors.

So any advice is highly appreciated.

Thanx

Larsen
  • 1
  • What is .Net framework version on your machine/server? You might need to update it. – Mak Sim Jan 14 '21 at 06:21
  • Hi Mark Thanks for replying. This is what my pc is reporting: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Client CBS REG_DWORD 0x1 Install REG_DWORD 0x1 InstallPath REG_SZ C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ Release REG_DWORD 0x80ff4 Servicing REG_DWORD 0x0 TargetVersion REG_SZ 4.0.0 Version REG_SZ 4.8.04084 best regards lars – Larsen Jan 15 '21 at 07:15

0 Answers0