microsoft / Dynamics365Commerce.Solutions

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

Getting package from Retail SDK from a common branch for commere app and Retail SDK #66

Closed AnupKumar25 closed 1 year ago

AnupKumar25 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

Hi @AnupKumar25 , 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.