A blog on Dynamics 365 for Operations – Retail

Category: Technical

MPOS Build Error – App manifest validation error: The app manifest must be valid as per schema

When trying to build the MPOS solution on my laptop, I got the below error.

getimage

Error APPX0501 Validation error. error C00CE169: App manifest validation error: The app manifest must be valid as per schema: Line 10, Column 50, Reason: —————‘ violates pattern constraint of ‘(CN|L|O|OU|E|C|S|STREET|T|G|I|SN|DC|SERIALNUMBER|Description|PostalCode|POBox|Phone|X21Address|dnQualifier|(OID\.(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))+))=(([^,+=”<>#;])+|”.*”)(, ((CN|L|O|OU|E|C|S|STREET|T|G|I|SN|DC|SERIALNUMBER|Description|PostalCode|POBox|Phone|X21Address|dnQualifier|(OID\.(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))+))=(([^,+=”<>#;])+|”.*”)))*’. The attribute ‘Publisher’ with value ————- failed to parse. Pos.App ” 1

App manifest validation error: The app manifest must be valid as per schema: Line 10, Column SO, Reason: ‘xxxx’ violates pattern constraint of ‘(CNILIOIOUIEICISISTREETITIGIIISNIDCI
((CNILIOIOUIEICISISTREETITIGIIISNIDCISERIALNUM8ERIDescriptionPostalCodeP080xI
PhoneIX21 . The attribute ‘Publisher’ with value ‘xxx’ failed to parse.

It took me a while to figure it out but this was happening because certain features in Visual Studio were not installed, the Retail SDK Handbook helped me to confirm which features were needed to be installed. After installing the highlighted features, I restarted the machine and the solution built successfully.

visualstudiofeatures

 

Hope this helps, if someone meets the same error.

-Hitesh Manglani

MPOS Build Error: “10.0.10xxx.0” is not a supported value for TargetPlatformVersion…

One of the errors I encountered recently when building the MPOS solution is the below error

“10.0.10xxx.0” is not a supported value for TargetPlatformVersion. Please change it on the Project Property page.

I learnt the reason for this after quite some time and with the help of a colleague who faced the same issue, was that , the needed version of Windows SDK was not installed on my machine.

If you get the same error just use the below link to install the right version of the Windows SDK based on the error message.

http://go.microsoft.com/fwlink/?LinkID=798187

For instance if it could be 10.0.10586.0.

Hope this helps.

-Hitesh Manglani

Debugging Cloud POS on Microsoft hosted VM with no admin rights

If you are on a MSDyn365FO 8.1 Microsoft hosted VM, you won’t have admin rights. In this case when you open the Cloud POS solution from the Retail SDK itself you get an error.

The error occurs as you do not have rights on IIS unless you run Visual Studio with Admin rights

Cloud POS Solution Error

So to get around this issue, follow the article below to resolve the issue.

https://docs.microsoft.com/en-gb/dynamics365/unified-operations/retail/dev-itpro/cloud-dev-box

Note –  For step 2 you will find the aspnet.config and redirection.config files in C:\Program Files\IIS Express\config\templates\PersonalWebServer

Following the steps will make sure your Cloud POS runs on IISExpress instead of IIS and thus allowing you to to run Cloud POS and debug by attaching to iisexpress.exe.

-Hitesh Manglani

(Special thanks to my mentor Mugunthan Mani from Microsoft for this tip )

RetailCdxSeedData class – Create custom tables mapping in Retail scheduler automatically

In this post, I would like to draw your attention to RetailCdxSeedData class.

The RetailCdxSeedData class is called when you trigger the following option in Dynamics 365 for Operations

Retail and commerce->Headquarters setup -> Retail scheduler ->Initialise retail scheduler 

If you have added some custom tables that need to be synced  between your HQ and Channel Database using CDX (Commerce Data eXchange), then you should customize the RetailCdxSeedData class to include the custom tables. If you do not not customize the RetailCdxSeedData class, you will need to do the CDX table mapping manually in all the environments and in every DB refresh and increasing the chances of missing out some fields if you have a lot of tables.

Please refer the following link from Microsoft on how you can customise this class with an extension.

https://docs.microsoft.com/en-us/dynamics365/unified-operations/retail/dev-itpro/cdx-extensibility

Hope this helps

– Hitesh Manglani

[MPOS Technical Development]- Refactoring/Renaming of a CRT Entity in Extensions

If you decide to refactor or rename a Commerce Runtime (CRT) entity (lets say OldEntityName to NewEntityName) inheriting from CommerceEntity, one issue that I have faced is in Retail Server extension assembly the build fails with errors due to the RetailProxy classes relying on the definition of your old entity name.

Example of the error messages that you would see in this scenario are as follows-

Could not load type OldEntityName from assembly… and the command ‘bin\CommerceProxyGenerator.exe’ ..

Retail Proxy Error

The solution to this issue is a little tricky one. You need to compile the CRT data dlls keeping the OldEntityName in the References folder.

You need to then comment any reference to NewEntityName in the Retail Server Extension assembly. Then do a clean and a build of the solution.

If this succeeds with no errors, you can now go ahead to uncomment all references to NewEntityName in the Retail Server Extension assembly.

<Update>This article is based on 7.1 Retail SDK </Update>

-Hitesh Manglani

© 2023 Dynamics Journal

Theme by Anders NorenUp ↑