{"id":272,"date":"2019-07-01T19:58:19","date_gmt":"2019-07-01T19:58:19","guid":{"rendered":"https:\/\/www.dabbler.dk\/?p=272"},"modified":"2019-09-12T12:54:08","modified_gmt":"2019-09-12T12:54:08","slug":"publish-navapp-extension-compilation-failed","status":"publish","type":"post","link":"https:\/\/www.dabbler.dk\/index.php\/2019\/07\/01\/publish-navapp-extension-compilation-failed\/","title":{"rendered":"Publish-NAVApp : Extension compilation failed"},"content":{"rendered":"\n<p>Have you ever tried to publish an app-file using the Publish-NavApp PowerShell Cmdlets on a on-premises Microsoft Dynamics 365 Business Central and was stopped by errors like these:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>Publish-NAVApp : Extension compilation failed<\/strong>\nsource\/codeunits\/Cod13653.PaymentExportManagement.al(4,27): error AL0185: Codeunit 'Payment Export Mgt' is missing\nsource\/codeunits\/Cod13656.DataMigration.al(15,28): error AL0185: Codeunit '9002' is missing\nsource\/codeunits\/Cod13650.FIKManagement.al(54,24): error AL0185: Table 'Payment Method' is missing\nsource\/codeunits\/Cod13650.FIKManagement.al(98,29): error AL0185: Table 'Company Information' is missing\nsource\/codeunits\/Cod13650.FIKManagement.al(126,59): error AL0185: Table 'Bank Acc. Reconciliation' is missing\nsource\/codeunits\/Cod13650.FIKManagement.al(128,18): error AL0185: Table 'Bank Account' is missing\nsource\/codeunits\/Cod13650.FIKManagement.al(129,22): error AL0185: Table 'Data Exch. Def' is missing\nsource\/codeunits\/Cod13650.FIKManagement.al(130,26): error AL0185: Table 'Data Exch. Mapping' is missing\n[\u2026]\nsource\/codeunits\/Cod13657.FIKSubscribers.al(360,46): error AL0132: 'Page' does not contain a definition for 'Payment Application'\n source\/codeunits\/Cod13657.FIKSubscribers.al(361,56): error AL0185: Page 'Payment Application' is missing\n source\/codeunits\/Cod13657.FIKSubscribers.al(361,111): error AL0185: Table 'Bank Acc. Reconciliation Line' is missing\n<strong> At line:10 char:1\n Publish-NAVApp -ServerInstance $ServerInstance -SkipVerification -Pat \u2026\n <\/strong><del><strong>~~~~~~~~~~~~~<\/strong><\/del><strong>~~~~ CategoryInfo          : InvalidOperation: (:) [Publish-NAVApp], InvalidOperationException\n FullyQualifiedErrorId : MicrosoftDynamicsNavServer$DynamicsNAV\/nav-systemapplication,Microsoft.Dynamics.Nav.Apps.Management.Cmdlets.PublishNavApp <\/strong><\/pre>\n\n\n\n<p>Note &#8211; it seems that all objects are missing!?<\/p>\n\n\n\n<p>It seems illogical, but it is fixed by running symbol generation:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>In the Microsoft Dynamics 365 Business Central administrative console you should set the parameter Enable loading application symbol references at server startup in the Development group.<br><\/li><li>Then you should go to the Program Files (x86) installation folder for the Role Tailored Client (typically C:\\Program Files (x86)\\Microsoft Dynamics 365 Business Central\\&lt;version>\\RoleTailored Client) and run this command:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">finsql.exe Command=generatesymbolreference, Database=\"&lt;application sql database&gt;\", ServerName=&lt;sql server host name&gt;, ntauthentication=no, username=&lt;sql server username&gt;, password=&lt;sql server password&gt;<\/pre>\n\n\n\n<p>Note: The finsql.exe command will start a background finsql.exe process (you can see it in Windows Task Manaer). When it finishes it will write one or two text-files in the Role Tailored Client directory &#8211; one with status (filename navcommandresult.txt) and the other one if any errors happens (filename naverrorlog.txt). <\/p>\n\n\n\n<p>These two steps fixed it for me.<\/p>\n\n\n\n<p>You can read more about the symbol generation in the Microsoft documentation <a aria-label=\"by clicking here! (opens in a new tab)\" href=\"https:\/\/docs.microsoft.com\/en-us\/dynamics365\/business-central\/dev-itpro\/developer\/devenv-running-cside-and-al-side-by-side\" target=\"_blank\" rel=\"noreferrer noopener\">by clicking here!<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Have you ever tried to publish an app-file using the Publish-NavApp PowerShell Cmdlets on a on-premises Microsoft Dynamics 365 Business Central and was stopped by errors like these: Publish-NAVApp : Extension compilation failed source\/codeunits\/Cod13653.PaymentExportManagement.al(4,27): error AL0185: Codeunit &#8216;Payment Export Mgt&#8217; is missing source\/codeunits\/Cod13656.DataMigration.al(15,28): error AL0185: Codeunit &#8216;9002&#8217; is missing source\/codeunits\/Cod13650.FIKManagement.al(54,24): error AL0185: Table &#8216;Payment Method&#8217; &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.dabbler.dk\/index.php\/2019\/07\/01\/publish-navapp-extension-compilation-failed\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Publish-NAVApp : Extension compilation failed&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":190,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,5],"tags":[32,25,24,26,12],"class_list":["post-272","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dynamics-nav","category-software","tag-business-central","tag-dynamics","tag-microsoft","tag-nav","tag-powershell"],"_links":{"self":[{"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/posts\/272","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/comments?post=272"}],"version-history":[{"count":5,"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/posts\/272\/revisions"}],"predecessor-version":[{"id":319,"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/posts\/272\/revisions\/319"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/media\/190"}],"wp:attachment":[{"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/media?parent=272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/categories?post=272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/tags?post=272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}