MPOS Package failed to deploy – Windows cannot install package because this package depends on a framework that could not be found

So recently I successfully build my Retail SDK and uploaded the installer to one of my D365FO environment, but when trying to install the package faced the below issue.

“Windows cannot install package because this package depends on a framework that could not be found”

Here is an extract of the MPOS installation error logs.

System.IO.IOException: Deployment failed with HRESULT: 0x80073CF3, Package failed updates, dependency or conflict validation.

Windows cannot install package xxx because this package depends on a framework that could not be found. Provide the framework “Microsoft.NET.CoreRuntime.1.0” published by “CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US”, with neutral or x64 processor architecture and minimum version 1.0.23819.0, along with this package to install

The solution was to run run msbuild on a Windows 10 machine instead of building it on my Dev machine (which was on Windows Server 2012 R2) on which I usually build it. (This was based on Microsoft suggestion on a support ticket I logged)

I must say I am surprised since this issue was intermittent for me. Hope this helps.

 

<Update>

As per below extract from Retail handbook, building from Windows Server 2012 should not be an issue. So not sure why I got different results, if you have faced above issue I would be glad to know if you could share more.

For ModernPOS debugging/installation (universal app) either Windows 10 or Windows Server 2016 is required
Note: For a limited time, LCS-hosted development topologies will continue to use Windows Server 2012 R2. What that means is that ModernPOS universal app cannot be installed or run in the debugger on these machines. However, it can be built correctly. Alternatives for ModernPOS development are:
o A separate Windows 10 development machine
o A downloadable Windows Server 2016 based VM from LCS.

</Update>

<Final Update 18 Apr 2018>

The solution is to build the package with configuration=release,

thanks to MVP Kurt Hatlevik  

</Final Update>

 

-Hitesh Manglani

MPOS randomly switching from online mode to offline

In my recent Dynamics 365 for Operations implementation on 7.1, we encountered an issue with MPOS switching to offline randomly . MPOS as we know switches to offline either when triggered manually or when the switch is seamless (automatically) when there is any issue in the communication between MPOS and D365 Retail Server, an example is a network interruption (for more information on the overall Retail Topology do refer this link MPOS Technical Architecture)

In a usual scenario, when an interruption occurs in between a transaction, cashier would get an error message the Cart State has changed. The cashier would need to void the transaction and then start all over again and end with creating an offline transaction (Not the kind of experience you want when you have a queue of customers at the billing).  Another issue that coupled with this was that the MPOS logo would not switch from offline to online when the MPOS mode switched.

 

Bottomline –

Make sure you uptake following binary hotfixes as soon as you can if you have enabled MPOS in offline mode

KB 4049328 – MPOS offline logo issue

KB 4058723- Set of reliability fixes for POS Offline

Also include the following X++ hotfix which complements the above binary fix

KB4058724 – Set of reliability fixes for POS Offline

 

 

-Hitesh Manglani

 

 

 

MPOS AAD changes – The reply address does not match the reply addresses configured for the application

If you are on Dynamics 365 for Operations 7.1 and planning to uptake the latest set of binary hotfixes, expect to see the above error when trying to activate MPOS.

Sergey from Microsoft has described the change that is triggered by binary hotfix KB4051347 in below link in great detail. Just one note though if you are on 7.1 you will not find the event ID 40619 in the event viewer. Its only available 7.2 onwards.

https://community.dynamics.com/ax/b/axforretail/archive/2017/11/06/mpos-aad-changes-in-monthly-update-4

In case you are interested to know more about these changes the below link is a great video that describes the differences between ADAL versus MSAL –https://channel9.msdn.com/Events/Build/2017/P4031

-Hitesh Manglani

The service is not provisioned for the same tenant

If you have downloaded an Dynamics 365 for Operations / AX7 VM for Development especially for Retail do have a look at this article

https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/dev-tools/access-instances

Unless you do the steps mentioned in the Retail Configuration section in this link you will get errors like :

In MPOS trying to activate would give an error – The service is not provisioned for the same tenant. User is hitting a retail server that does not belong to the same tenant as the Activation account.

Also if you try to Associate User Identity with a worker in AX it will result in an error like the service is not reachable.

Note – You need to install KB3170424 if you are facing this issue in a LCS hosted VM.

 

-Hitesh Manglani

Problem uninstalling MPOS or any other application

Sometimes I have experienced an error when trying to uninstall MPOS or any other program for that matter.

MPOS uninstall

Corrupted registry keys are one of the reasons for such an error.

The following utility from Microsoft helps to cleanly uninstall MPOS  or any other program not uninstalling in such a situation.

https://support.microsoft.com/en-gb/help/17588/fix-problems-that-block-programs-from-being-installed-or-removed

In addition you may also needed to follow these steps to make sure all MPOS packages are removed (especially when multiple user profiles are setup)

  1. Run the following powershell script as Admin user. (Note that you can run the Powershell command by loading it the command prompt by executing powershell command as shown below)

Get-AppxPackage *pos* – allusers

Uninstall

2.  Note the PackageUserInformation in the above results. It will list the users for which the package has been provisioned. The package can then be removed using the following script.

Get-AppxPackage *pos*  | Remove-AppxPackage

Note – You will need to execute the above command for each user by logging in as that particular user in command prompt. For instance lets consider that there are two users admin and user1. You will need to execute the powershell twice, once as admin and once as user1, by using “Run as a different user” option by right clicking the command prompt icon

Run as a different user menu

Hope this helps

-Hitesh Manglani

[AX 2012 R3 / Dynamics 365 for Operations -Retail]: Viewing events from MPOS in Event Viewer

This post is based on a conversation in Dynamics AX Community (link attached later in the post)

 

Events from the MPOS in AX 2012 R3 can be found in Event Viewer here:

Application and Services Logs -> Microsoft -> Windows -> AppHost -> AppTracing.

activate the event log using Event Viewer.

  1. Navigate to Application and Services Logs -> Microsoft -> Windows -> AppHost.
  2. Right click AppHost and Select View -> Show Analytic and Debug Logs

Events from the MPOS in AX 7 / Dynamics 365 for Operations can be found in Event Viewer here:

Event Viewer: Applications and Services Logs->Microsoft->Dynamics->Commerce-ModernPos.- Admin, Debug, Operational (where Operational would contain errors and Debug is by default disabled but can be Enabled if needed.)

 

Please visit the source of this post at this link

for more information.

A simple customization in MPOS (Blank Operation) with Dynamics 365 for Operations

Note – This article is applicable upto Dynamics 365 for Operations- 7.1 i.e. not applicable to 7.2 and above

Hi All,

 

I recently had to add a Blank Operation to Modern POS (MPOS) to open a url from MPOS.

 

Blank Operation as you may already be aware enable you to extend Microsoft Dynamics Retail for POS by adding custom logic that can be triggered from the Retail POS Register buttons. The way to implement Blank Operations in MPOS is different from Enterprise POS as MPOS is a modern app as compared to EPOS which is a windows forms based app.

So lets explore a very simple customization i.e. we want to open a URL on triggering a button from MPOS.

1. We would need to start with AX to add a button to the layout of MPOS. If you do not want to disturb the standard layouts its better to copy one of the existing layouts and then modify it using the designer. Please note the designer only opens in Internet Explorer so it will save you time by not trying to open it in other browsers e.g Chrome

2. Next we need to add this layout to the Store where we intend to use it, in my case I have choosen Houston Store

3. We need to modify the screen layout in the worker setup.

Next run jobs 1060,1070, 1090 to push the worker,store configuration and the new screen layout respectively to Channel DB.

Lets run MPOS SDK code from Visual Studio and check if the changes are reflected.

As you can see we have a new button in MPOS which can be used to invoke custom logic. Currently on triggering the button gives us a message “The blank operation identifier is invalid”

Now make the following modifications in the code.

In POS.ViewModels->OperationsMap.ts add the following line of code to register a new handler for the custom blank operation

Operations.BlankOperationHandler.registerBlankOperationHandler(“CustomOpenURL”, new Operations.OpenURLOperationHandler());

Next we need to provide the definition for the handler, to do this headover to Pos.Core->Operations->Add a new typescript file say CustomBlankOperations.ts and paste following code.

module Commerce.Operations {

“use strict”;

export class OpenURLOperationHandler extends OperationHandlerBase {

/**

* Executes the OpenURL operation.

*

* @param { IBlankOperationOptions } options The operation options.

* @return {IAsyncResultIOperationResult>} The async result containing the operation result, if any.

*/

public execute(options: IBlankOperationOptions): IAsyncResultIOperationResult> {

// sanitize options

options = options || { operationId: undefined, operationData: undefined };

var asyncQueue: AsyncQueue = new AsyncQueue();

var asyncResult: VoidAsyncResult = new VoidAsyncResult(null);

var url = String(options);

asyncQueue.enqueue((): IAsyncResultICancelableResult> => {

Windows.System.Launcher.launchUriAsync(

new Windows.Foundation.Uri(url)

);

return asyncResult;

});

return asyncQueue.run();

}

}

}

On running the modified app you should be able to successfully run the blank operation and see the web page in this case http://www.bing.com opened in your browser.

So hopefully this exercise will whet your appetite and for a deeper dive to more MPOS customizations I would suggest the following resources to try out in AX 7-

1. http://blogs.msdn.com/b/axsa/archive/2015/02/17/extensibility-in-dynamics-ax-2012-r3-cu8-crt-retailserver-mpos-part-1.aspx

2. http://blogs.msdn.com/b/axsa/archive/2015/05/20/extensibility-in-dynamics-ax-2012-r3-cu8-crt-retailserver-mpos-part-2-new-data-entity.aspx

If you have access to Microsoft Dynamics Learning Portal do watch the following videos

Update>

https://mbspartner.microsoft.com/AX/Videos/101001

https://mbspartner.microsoft.com/AX/Videos/101002

Alternatively if have access to Partnersource use these links instead.

http://mediadl.microsoft.com/mediadl/www/d/dynamics/partners/BSAX88.mp4

http://mediadl.microsoft.com/mediadl/www/d/dynamics/partners/BSAX89.mp4

/Update>

hope this helps

-Hitesh Manglani

This post was first published at http://hiteshgoldeneye-techtalk.blogspot.sg/2015/12/a-simple-customization-in-mpos-blank.html