SBX - Search With Button

SBX - Forum Post Title

How to upload .app file to Business Central Trial Production environment

Microsoft Dynamics NAV Forum

Olister Rumao asked a question on 6 Apr 2018 3:36 AM
My Badges

Question Status

Verified

Hi,
We've created the extension and deployed in Business Central container. I tried uploading the .app file that is generated during compilation. The deployment status failed with error 'Publish operation failed with code PackageValidationFailed. Details: Package validation failed. Please contact Administrator for more information.'.
Kindly guide.

Reply

Are the container and business central the same version?

Reply
Olister Rumao responded on 6 Apr 2018 4:04 AM
My Badges

Yes,

I've made the container using the powershell scripts geneated from the Business Central through the Sandbox Environment(Container).

Reply
Olister Rumao responded on 9 Apr 2018 2:39 AM
My Badges

Hi Stefano,

I tried Signing the .app file and publishing using Publish-NavContainerApp.

But there is an issue publishing the app.

Error:

Copy C:\Users\cfadmin\Desktop\FTL-Final\CLOUDFRONTS_Fast Track Leasing_1.0.0.0.app to container NAVSERVERFINAL (c:\run\CLOUDFRONTS_Fas

t Track Leasing_1.0.0.0.app)

Publishing c:\run\CLOUDFRONTS_Fast Track Leasing_1.0.0.0.app

Synchronizing Fast Track Leasing on tenant default

Installing Fast Track Leasing on tenant default

A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider. (Exception from

HRESULT: 0x800B0109)

At C:\Program Files\WindowsPowerShell\Modules\navcontainerhelper\0.2.7.4\AppHandling\Publish-NavContainerApp.ps1:53 char:5

+     Invoke-Command -Session $session -ScriptBlock { Param($appFile, $ ...

+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   + CategoryInfo          : InvalidArgument: (Microsoft.Dynam...s.PublishNavApp:PublishNavApp) [Publish-NAVApp], InvalidOperationE

  xception

   + FullyQualifiedErrorId : Microsoft.Dynamics.Nav.Apps.Management.Cmdlets.PublishNavApp

   + PSComputerName        : 7936da1fc4597366183211760f299e8c14fc2a0415b5a677b96f6785d69c132f

Reply
Olister Rumao responded on 9 Apr 2018 2:41 AM
My Badges

I also tried installing the certificate Trust Root Certification Authorities,

Enterprise Trust, Trusted Publishers & Trusted People.

Reply
Andrey Baludin responded on 9 Apr 2018 4:14 AM
My Badges
Suggested Answer

1. Check your app.json file that Platform and application has 12.0.0.0 values

"platform": "12.0.0.0",

"application": "12.0.0.0",

2. When you wrote about Uploading an extension - you mean this button? If not - try it.

Reply
Olister Rumao responded on 9 Apr 2018 5:35 AM
My Badges

Hi Andrey,

I'm trying to Upload Extension on businesscentral.dynamics.com.

I can actually upload to the container via Visual Studio code.

I tried making the platform & application to 12.0.0.0. But it gives the same error.

Reply
Povl O responded on 10 Apr 2018 12:56 PM

I have same issue, and to me it seems that only some type of extensions are allowed.

I have done some tableextensions, xmlport, pageextension - but if I try to make a new table - I get message PackageValidationFailed - and is left in complete darkness as to what is going on.

I didn't think this feature of manually uploading an .app file was coming, so I was thrilled.

Today, I am just frustrated after so many failed attempts to figure it out.

Reply
Olister Rumao responded on 12 Apr 2018 11:33 PM
My Badges

Hi,

Can anyone please guide on this issue ?

If there is any specific set of processes to be followed please reply.

Reply
Jaikechen responded on 18 Apr 2018 11:10 AM

Hi,

I am new to Business Central, so please forgive if I didn't answer correctly. I just installed my app successfully. Here's my approach:

1. Install Dynamic NAV 2008 to develop computer, otherwize sign tool cann't recognize .app format.

2. Create a pfx file, open powershell as administrator, run command ' MakeCert -sk myNewKey -n "CN=HartogJacobs" -r -ss my MyCert.pfx

3.   Copy myCert to developing directory, open 'Developer command Prompt for VS 2017',  run command 'SignTool sign /f MyCert.pfx /t timestamp.verisign.com/.../timestamp.dll HartogJacobs_ALInvoice_1.0.0.0.app'

Then the extensin is installed

Reply
Olister Rumao responded on 18 Apr 2018 10:21 PM
My Badges

Hi Jaikechen,

For signtool to recognize the .app file run the follwoing script in Powershell

Install-NAVSipCryptoProviderFromNavContainer.

The issue I'm facing is that the .app file doesnot get uploaded even after the package is signed.

Reply
Jaikechen responded on 19 Apr 2018 10:07 AM

Have you tried upload the default HelloWorld app created by Visual studio Code? My extension(it contains a pageextension)  works. I guess

Reply
Povl O responded on 30 Apr 2018 1:26 PM

Any update on this ?

Reply
Olister Rumao responded on 13 May 2018 10:17 PM
My Badges
Verified Answer

Hi Povl O,

The reason my app wasn't getting uploaded in Business Central as it would fail in the tests mention in the below document. I rectified it and it works perfectly fine.

docs.microsoft.com/.../devenv-codeanalyzer-codecop-rules

Especially the I didn't Permission Set for the Tables.
Download the sample and try it.!
https://github.com/olisterrcf/Business-Central-Demo

Reply
Povl O responded on 16 May 2018 2:40 PM

Hi Olister,

Thanks - this seems to be helping already on my issue. I am still not confident making table extensions, so I will stick to pageextensions, pages etc. for now.

Reply
Olister Rumao responded on 13 May 2018 10:17 PM
My Badges
Verified Answer

Hi Povl O,

The reason my app wasn't getting uploaded in Business Central as it would fail in the tests mention in the below document. I rectified it and it works perfectly fine.

docs.microsoft.com/.../devenv-codeanalyzer-codecop-rules

Especially the I didn't Permission Set for the Tables.
Download the sample and try it.!
https://github.com/olisterrcf/Business-Central-Demo

Reply
Andrey Baludin responded on 9 Apr 2018 4:14 AM
My Badges
Suggested Answer

1. Check your app.json file that Platform and application has 12.0.0.0 values

"platform": "12.0.0.0",

"application": "12.0.0.0",

2. When you wrote about Uploading an extension - you mean this button? If not - try it.

Reply

SBX - Two Col Forum

SBX - Migrated JS