microsoft / Dynamics365Commerce.Solutions

Repository for hosting the Dynamics 365 Commerce end to end sample solutions
Other
58 stars 26 forks source link

When trying to build the package from ADO pipeline, package is getting created but extension is not getting uploaded. #18

Closed MattSheard closed 1 year ago

MattSheard commented 2 years ago

For using the common repo for RestailSDK and CommerceSDK we have created the links of code files from CommerceSDK to RetailSDK. While creating the links for POS code we are getting the manifest.json from CommerceSDK where the manifestschema.json is referred from devDependencies folder which will be generated automatically once we build the POS in CommerceSDK. In order to fix this, we have copied the schemas folder from RetailSDK to the CommerceSDK and referring the manifestschema.json from there instead of devDependencies folder.

We are able to build this solution from ADO build pipeline however when we install the POS the extensions are not loading and in event viewer, we are seeing the below error.

Failed to load extension package manifest for package with base url Extensions/LifeStyle. Error: {"description":"undefined","stack":"Error\n at ExtensionLoadError (ms-appx://microsoft.dynamics.retail.pos/Pos.Framework.Contracts.js:8758:17)\n at Anonymous function (ms-appx://microsoft.dynamics.retail.pos/ExtensibilityFramework/Pos.ExtensibilityFramework.js:1085:25)\n at Anonymous function (ms-appx://microsoft.dynamics.retail.pos/Libraries/core-js-bundle/minified.js:9:4591)\n at o (ms-appx://microsoft.dynamics.retail.pos/Libraries/core-js-bundle/minified.js:9:9230)","failureReason":"ManifestFailedToLoad","name":"Error","message":"","proto":{}}.

lukedgr commented 2 years ago

@MattSheard , This is likely because the manifest.json file is not content included in the POS extension project. By default, the Commerce SDK will content include any json files in the project directory, but if you are linking the file from the location in the RetailSdk you will need to do an explicit content include in your Pos extension project.

MattSheard commented 2 years ago

We are linking the file from the location in the CommerceSDK to RetailSDK to achieve the shared code repo for CommerceSDK and RetailSDK. And in RetailSDK we already doing the explicit include which is ExtensionPackagesToLink Include for the extensions folder in which manifest is included. If we again content include the manifest.json the pipeline is failing with error file not found.

madyke commented 1 year ago

Discussed with Luke, this was closed offline