web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Known issue with CU5 and AL Extension VSIX

(2) ShareShare
ReportReport
Posted on by

Hello,

Just wanted to draw your attention to a known issue that has been fixed by an update that can be downloaded via the CU5. Link to CU5 can be found here. On that site, the following is added:

AL Development for Dynamics 365 Business Central

For information about how to develop extensions for Dynamics 365 Business Central see AL Development for Dynamics 365 Business Central

For download of the corrected ModernDev AL VSIX extension see the download link

So what broke and what has been resolved with the immediate update to CU5? AL Extension VSIX throw System.IO.FileLoadException related to Newtonsoft.Json dependency in Visual Studio Code. Repro:

1. Deploy VSIX from NAV 2018 CU 5 in VS Code

2. Create a simple HelloWorld sample from scratch (AL:GO!)

--> ERROR is displayed in VS Code

Unhandled Exception: System.AggregateException: One or more errors occurred. —> System.IO.FileLoadException: Could not load file or assembly ‘Newtonsoft.Json, Version=10.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) —> 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)
— End of inner exception stack trace —

You can download the correction via the blog posting or edit a file yourself.

1. Edit this file

"C:\Users\<username> \.vscode\extensions\Microsoft.al-0.12.20065\bin\Microsoft.Dynamics.Nav.EditorServices.Host.exe.config"

2. Changed binding from 10 to 9

     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

      <dependentAssembly>

        <assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />

        <bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="9.0.0.0" />

      </dependentAssembly>

      <dependentAssembly>

        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />

        <bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />

      </dependentAssembly>

    </assemblyBinding>

    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

      <dependentAssembly>

        <assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory" publicKeyToken="31bf3856ad364e35" culture="neutral" />

        <bindingRedirect oldVersion="0.0.0.0-3.19.1.3001" newVersion="3.19.1.3001" />

      </dependentAssembly>

    </assemblyBinding>

Thank you for reading. Please validate the answer so that others can benefit.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Marco Mels Profile Picture
    on at

    Answer in posting.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans