Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Issues with Migration from v19 to v21

(0) ShareShare
ReportReport
Posted on by 171

Hi All,

 

I'm facing an issue with migrating Business Central OnPrem from version 19 to version 21.

I was following this guide from Microsoft, and I seem to have gotten stuck on task 7.

I got through a few of the errors (using this) however one of them is beyond my understanding.

As per the second guide, it says there may be circumstances, where I may have to manually change the code and re-compile the application. So as there were a couple of errors in the Base Application, I made the necessary changes myself and as expected it compiled successfully. However, when I tried to publish it to Business Central, I got hit with this error message:

 

Extension Compilation Failed

ExchangeWebServicesClient.Codeunit.al(243,46): error AL0133: Argument 1: cannot convert from 'Dotnet "Microsoft.Exchange.WebServices.Data.ExchangeCredentials"'

 

I looked at the dotnet.al file from the github repo to determine which assembly may be missing but the assembly (Microsoft.Exchange.WebServices.NETstandard) appears to be there. Based on the conversation on here I tried to figure out whether it was a case of duplicate assemblies with different versions and to find that out I search throughout the system for different assemblies with that name however all of them had the same version (checked via Properties -> Details).

 

I tried compiling using the AL Compiler however it simply did not know where to look for the assemblies.

I tried playing around with the "al.assemblyProbingPaths" however the error seems to be persistent.

I tried to remove that dll from the assembly paths, but it did not throw any different error in that case which was unexpected. However, when I tried to remove the "Microsoft.Exchange.WebServices" dll it gave me the missing DLLs errors.

I tried replacing the "Microsoft.Exchange.WebServices" dll with the "Microsoft.Exchange.WebServices.ni" dll as it was the only different one, I could find however that did not change anything either.

 

Has anyone here faced a similar error?

Can you please guide me towards a solution or let me know if I'm missing something in my approach towards this issue?

Any guidance will be highly appreciated.

Thanks!

  • Suggested answer
    Bilal Haider Profile Picture
    Bilal Haider 47 on at
    RE: Issues with Migration from v19 to v21

    Hi,

    V 21 Line 243 in this codeunit is expecting Credentials of type OAuthCredentials, can you check if you are passing a different dotnet type.

    pastedimage1678255087142v1.png

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans