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 :
Small and medium business | Business Central, N...
Answered

Error while publishing base application when upgrading BC from v20 to v23 on-premise

(1) ShareShare
ReportReport
Posted on by 33
Hello,
I got error while publish Microsoft Base Application when upgrading business central v20 to v23. I don't know what's happen and I did follow this guide https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/upgrade/upgrade-technical-upgrade-v23 and still stuck in section publish new base application (v23). Anyone have the same issue like this? If you faced the same problem please share the solutions to me.
Thanks in advance.
 
Errors : 
Publish-NAVApp : Extension compilation failed
System/Exchange/ExchangeWebServicesClient.Codeunit.al(249,46): error AL0133: Argument 1: cannot convert from 'DotNet 
/Microsoft.Exchange.WebServices.Data.OAuthCredentials/' to 'DotNet 
/Microsoft.Exchange.WebServices.Data.ExchangeCredentials/'
System/Exchange/ExchangeWebServicesServer.Codeunit.al(38,42): error AL0133: Argument 1: cannot convert from 'DotNet 
/Microsoft.Exchange.WebServices.Data.ExchangeCredentials/' to 'DotNet 
/Microsoft.Exchange.WebServices.Data.ExchangeCredentials/'
O365SyncManagement.Codeunit.al(433,46): error AL0133: Argument 1: cannot convert from 'DotNet 
/Microsoft.Exchange.WebServices.Data.ExchangeCredentials/' to 'DotNet 
/Microsoft.Exchange.WebServices.Data.ExchangeCredentials/'
At line:1 char:1
+ Publish-NAVApp -ServerInstance $NewBcServerInstance -Path /C://Microso ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Publish-NAVApp], InvalidOperationException
    + FullyQualifiedErrorId : MicrosoftDynamicsNavServer$BC23/nav-systemapplication,Microsoft.Dynamics.Nav.Apps.Man 
   agement.Cmdlets.PublishNavApp
 
And this is my powershell script that I used for this time.
Get-NAVAppInfo -ServerInstance $OldBcServerInstance  | % { Uninstall-NAVApp -ServerInstance $OldBcServerInstance -Name $_.Name -Version $_.Version }
Get-NAVAppInfo -ServerInstance $OldBcServerInstance  -SymbolsOnly | % { Unpublish-NAVApp -ServerInstance $OldBcServerInstance -Name $_.Name -Version $_.Version }
Invoke-NAVApplicationDatabaseConversion -DatabaseServer $DatabaseServer -DatabaseName $ApplicationDatabase
Import-NAVServerLicense -ServerInstance $NewBcServerInstance -LicenseFile $PartnerLicense
Get-NAVAppInfo -ServerInstance $NewBcServerInstance | Repair-NAVApp
Restart-NAVServerInstance -ServerInstance $NewBcServerInstance
Sync-NAVTenant -ServerInstance $NewBcServerInstance -Tenant default -Mode Sync
I have the same question (0)
  • Suggested answer
    Mohana Yadav Profile Picture
    61,005 Super User 2025 Season 2 on at
    Did you publish system application before base application?
  • EE-04050459-0 Profile Picture
    6 on at
    Hi, Mohana
    Yes, I published System Application first with no error then publish base application and error occur.
  • Suggested answer
    Mohana Yadav Profile Picture
    61,005 Super User 2025 Season 2 on at
    try running the script from start without Get-NAVAppInfo -ServerInstance $NewBcServerInstance | Repair-NAVApp
  • EE-04050459-0 Profile Picture
    6 on at
    I tried but still got same error.
     
    I used step like this :
     
    Restore database after uninstall and unpublish old extension version.
     
    Invoke-NAVApplicationDatabaseConversion -DatabaseServer $DatabaseServer -DatabaseName $ApplicationDatabase
     
    Import-NAVServerLicense -ServerInstance $NewBcServerInstance -LicenseFile $PartnerLicense
     
    Restart-NAVServerInstance -ServerInstance $NewBcServerInstance
    Sync-NAVTenant -ServerInstance $NewBcServerInstance -Tenant default -Mode Sync >> Use this command or not still got the same errors.
     
    Publish-NAVApp -ServerInstance BC23 -Path "C:\Microsoft_System Application.app"
    Publish-NAVApp -ServerInstance BC23-Path "C:\Microsoft_Base Application.app"
     
    and.. error occurs.
  • Suggested answer
    Mohana Yadav Profile Picture
    61,005 Super User 2025 Season 2 on at
  • EE-04050459-0 Profile Picture
    6 on at
    I think it's already installed when I install business central. Is that correct?
  • Suggested answer
    Saurav.Dhyani Profile Picture
    14,380 Super User 2025 Season 2 on at
    Hi,
     
    If you are trying to do a full upgrade, then you are referring the wrong article.
     
     
    You can also refer this video - https://youtu.be/J6O6rzUjE4Y (Steps will be more or less same).
     
    Regards,
    Saurav Dhyani
  • Kittamet R. Profile Picture
    33 on at
    Hi Saurav,
     
    Thanks for your reply.
     
    I did follow your videos and got new error but the old errors I didn't use this command before convert database.
     
    UPDATE [master].[dbo].[$ndo$srvproperty] SET [license] = null
    UPDATE [<app database name>].[dbo].[$ndo$dbproperty] SET [license] = null
    UPDATE [<tenant database name>].[dbo].[$ndo$tenantproperty] SET [license] = null
     
    I'm not sure it's related or not? 
     
    And this is new error after user command to import new partner license. (Import-NAVServerLicense -ServerInstance $NewBcServerInstance -LicenseFile $PartnerLicense)
     
    Type: System.ServiceModel.FaultException`1[[Microsoft.Dynamics.Nav.Types.ServerFault, Microsoft.Dynamics.Nav.Types, Version=23.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]
    Action: http://www.microsoft.com/Dynamics/NAV/51/ServerFault
    Message: An unexpected error occurred after a database command was cancelled.
    StackTrace:
      
      Server stack trace: 
         at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
         at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
         at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
         at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
      
      Exception rethrown at [0]: 
         at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
         at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
         at Microsoft.BusinessCentral.AdminApi.INCLAdminService.ImportLicense(Byte[] license, LicenseDatabase licenseDatabase)
         at Microsoft.Dynamics.Nav.Management.Cmdlets.ImportNavServerLicense.InternalProcessRecord()
         at Microsoft.Dynamics.Nav.Management.NavCommand.ProcessRecord()
    Source: mscorlib
    HResult: -2146233087
    StackTrace:
      
      Server stack trace: 
         at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
         at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
         at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
         at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
      
      Exception rethrown at [0]: 
         at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
         at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
         at Microsoft.BusinessCentral.AdminApi.INCLAdminService.ImportLicense(Byte[] license, LicenseDatabase licenseDatabase)
         at Microsoft.Dynamics.Nav.Management.Cmdlets.ImportNavServerLicense.InternalProcessRecord()
         at Microsoft.Dynamics.Nav.Management.NavCommand.ProcessRecord()
     
  • Gerardo Rentería García Profile Picture
    25,234 Most Valuable Professional on at
  • Kittamet R. Profile Picture
    33 on at
    Hi gdrenteria,
     
    Thank you so much I can import bclicense now.

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,238

#2
YUN ZHU Profile Picture

YUN ZHU 773 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 630

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans