This repo contains the sample solutions on how to extend the Dynamics 365 Commerce POS, e-Commerce, Hardware station, Retail Server and Commerce runtime.
Dynamics 365 Commerce SDK
The Dynamics 365 Commerce SDK contains the reference package, samples, and tools to build extension for the Dynamics 365 Commerce components.
E2E Samples repo
This repo contains the sample that demonstrates how to perform E2E business scenario customization in Commerce, there may be scenarios where you may need to customize POS, e-Commerce and Headless commerce engine, the samples in these repos will be provide guidance on how to do E2E business scenario customization.
Check this doc for more detailed information on the Dynamics 365 Commerce SDK
Ecommerce online SDK Samples
This repo also contains samples for Ecommerce Online SDK. Check this link to view samples for Ecommerce Online SDK Online SDK Samples.
(This content will be available on docs.microsoft.com next week, but we are sharing a preview here for those who are ready to get their hands dirty with the Store Commerce App)
Create a Store Commerce extension installer
Create a Store Commerce extension installer package
This topic explains how to create the extension installer for Store Commerce.
Compile and build the project. The output of this project contains the Store Commerce extension installer.
When you press F5 and build the project, the installer will be automatically deployed.
To manually install the extension, open Windows PowerShell in administrator mode, go to the extension installer folder, and run the install command.
Before you install the extension installer, install the Store Commerce app.
After you've finished installing the extension, close Store Commerce if it's running. Then, to load the extension, open Store Commerce by using the Store Commerce icon on the desktop.
Debug Store Commerce extensions using VS Code
This document explains how to debug the Store Commerce app extension code using VSCode. Follow the steps documented below to debug Store Commerce Extensions:
Note
To debug offline Commerce runtime (CRT)/Hardware station (HWS) code in Store Commerce you need to use Visual Studio 2019 or later, VS Code only supports debugging 64-bit .NET Framework apps. Launch the Store Commence app and then open the CRT or HWS code in Visual studio and then from the menu choose Debug > Attach to Process and select Microsoft.Dynamics.Commerce.StoreCommerce.exe.
Before deploying the extensions, Install the Store Commerce app, during install please enable the debug option by passing the parameter --enablewebviewdevtools.
Download the Store Commerce extension sample code from the InStore GitHub Repo or use your own extension code.
**> [!NOTE]
** Donβt run VS code in admin mode.****
Open VS developer command prompt and type code . to open VS code.
Inside the VSCode, Click File > Open Folder and open your Extension Code root folder.
In the VSCode, right click the root folder of your solution directory and create a new folder called .vscode.
Inside the .vscode folder, create a new file and name it as launch.json.
Inside the launch.json file add the configurations to build and debug the Store Commerce extensions.
Debug Store Commerce β This configuration will launch the Store Commerce app and attach the extension code to Store Commerce app for debugging.
Build and Debug Store Commerce - This configuration will build the extension code, deploy the extension, launch the Store Commerce app and attach the extension code to the Store Commerce app for debugging. Attach debugger to Store Commerce - This configuration will attach the extension code to the Store Commerce app for debugging, this will not start the Store Commerce app.
Copy the below configurations code to the launch.json file and save it.
Click the Debug button in VS and choose the right option based on your scenario and start debugging by placing breakpoint in your extension code.
Troubleshooting debug issues
msbuild error
If you get the this error: msbuild : The term 'msbuild' is not recognized as the name of a cmdlet, function, script file, or operable program
Close VS Code and Open Visual Studio Developer Command prompt and navigate to the solution directory and then type Code .. This will open VS Code and set the right msbuild version.
Json Comment extension
If you get any error related to json file comment, then close the opened json file and try the debug command again or delete all the comments in the json.
Using the install/uninstall tasks results in error upon executing script. It executes the installer.ps1 script, which opens in another window, and is closed when completed. Unsure if there's additional configuration required on our end to fix this.
I have CustomLinesGridItemSubfieldBase extension for the Cart Lines grid that started failing after moving to store commerce. The type of carline being passed in appears to be a CartLineForDisplay as opposed to a ProxyEntities.CartLine.
Currently CartLineforDisplay isn't a exposed entity. You can't assign a type to it, and have to fetch the CartLine out of it.
Using a Sealed Scale unit. Tested on both Store Commerce and CPOS (9.035.22098.20)
Microsoft.Dynamics.Commerce.SDK.Pos (9.35.22101.3)
When a company's signing certificate includes commas in the publisher information, the relevant parts have to be surrounded by quotation marks so that those commas are not seen as delimiters.
When the ScaleUnit/.../CloudScaleUnitExtensionPackage.zip is produced, the double quotes are not correctly written to the base manifest.json file. For example, the output file looks like this.
{
"sdkVersion": "...",
"customPackageName": "...",
"customPackageDescription": "...",
"customPackagePublisher": "CN="My Test Company, INC", O="My Test Company, INC", STREET=123 N Main St., L=Schenectady, S=NY, PostalCode=12345, C=US",
"customPackageVersion": "..."
}
When "customPackagePublisher" should have value "CN=\"My Test Company, INC\", O=\"My Test Company, INC\", STREET=123 N Main St., L=Schenectady, S=NY, PostalCode=12345, C=US"
The Cloud Scale Unit fails on load because of the malformed JSON. As a workaround I am unzipping this file, updating the manifest manually, and then re-zipping the file.
We are using an ISV solution that can take a long time to get updates on. We've requested they move to the CommerceSDK, but that may take months before it materializes. Looks like we'll need to migrate it in the meanwhile.
There are several classes/namespaces the ISV previously referenced in the RetailSDK but I'm not seeing in the CommerceSDK. What's the best way to find these new namespaces? I've tried adding most of the packages in Nuget to the project, but no luck.
Hi @lukedgr - I am getting below error when i compile code in VS Code. It is not giving error with Visual Studio 2019. Do we need to ignore this error? If not what do i need to add to fix?
Today we have a history of many sql scripts for updating the Channel database and a configuration that lists up these sql script files.
Do all scripts need to be copied into one sql file like in the example ChannelDatabase project or is there some logic that can control the order of the scripts, if there are many sql script files?
Consuming Microsoft.Azure.Cosmos leads to exceptions at build time from both the proxy generator and the ScaleUnit package builder. Either this is a documentation hole (if there's a workaround) or a product bug (if there isn't). Edit: It turns out this is a regression from 9.32.
Minimal repro:
1.) Clone the repo.
2.) Check out branch 9.34. (Does not repro on 9.32.)
3.) In src\ScaleUnitSample\CommerceRuntime\CommerceRuntime.csproj, add a reference to Microsoft.Azure.Cosmos. I don't think the version matters but I used
4.) Add a reference somewhere to a type from Microsoft.Azure.Cosmos, e.g. I added to BoundController.cs
public class BoundController : IController
{
private Microsoft.Azure.Cosmos.CosmosClient stub = null; // add a reference to a type from Microsoft.Azure.Cosmos
// so the assembly won't be ignored by the compiler
...
5.) Build the solution.
EXPECTED: everything builds correctly, ScaleUnit package is created. ACTUAL: strange error from proxy generator
"C:\Repo\Dynamics365Commerce.ScaleUnit\src\ScaleUnitSample\POS\POS.csproj" (default target) (4:2) ->
(RunCommerceTypeScriptExtensionsProxyGenerator target) ->
EXEC : Commerce Proxy Generator failed due to the error : Method not found: 'Microsoft.AspNet.OData.Builder.LengthPro
pertyConfiguration Microsoft.AspNet.OData.Builder.StructuralTypeConfiguration`1.Property(System.Linq.Expressions.Expres
sion`1<System.Func`2<!0,System.String>>)'.. [C:\Repo\Dynamics365Commerce.ScaleUnit\src\ScaleUnitSample\POS\POS.csproj]
C:\Users\Admin1e20ff3e45\.nuget\packages\microsoft.dynamics.commerce.sdk.pos\9.34.22047.3\Dependencies\CoreProxyGener
ator\build\Microsoft.Dynamics.Commerce.Tools.CoreProxyGenerator.props(126,5): error MSB3073: The command ""C:\Users\Adm
in1e20ff3e45\.nuget\packages\microsoft.dynamics.commerce.sdk.pos\9.34.22047.3\Dependencies\CoreProxyGenerator\build\..\
tools\CommerceProxyGenerator.exe" "C:\Users\Admin1e20ff3e45\.nuget\packages\microsoft.dynamics.commerce.sdk.pos\9.34.22
047.3\Dependencies\ExtensionsProxyGenerator\build\\..\tools\Microsoft.Dynamics.Retail.RetailServerLibrary.AspNetCore.dl
l" "C:\Repo\Dynamics365Commerce.ScaleUnit\src\ScaleUnitSample\CommerceRuntime\bin\Debug\netstandard2.0\CommerceRuntime.
dll" /a:TypeScriptExtensions /outputpath:obj\Debug\" exited with code 1. [C:\Repo\Dynamics365Commerce.ScaleUnit\src\Sca
leUnitSample\POS\POS.csproj]
0 Warning(s)
2 Error(s)
ADDITIONALLY
If I edit ScaleUnit\ScaleUnit.csproj to remove the references to POS and ChannelDatabase, to work around the proxy generation bug, I get an error about assembly manifests during package generation:
Build FAILED.
"C:\Repo\Dynamics365Commerce.ScaleUnit\src\ScaleUnitSample\ScaleUnit\ScaleUnit.csproj" (default target) (1) ->
(GetUpstreamPackagingOutput target) ->
C:\Users\Admin1e20ff3e45\.nuget\packages\microsoft.dynamics.commerce.sdk.scaleunit\9.34.22047.3\build\Microsoft.Dynam
ics.Commerce.Sdk.ScaleUnit.targets(62,5): error : Could not load file or assembly 'Cosmos.CRTCompat.dll' or one of its
dependencies. The module was expected to contain an assembly manifest. [C:\Repo\Dynamics365Commerce.ScaleUnit\src\Scale
UnitSample\ScaleUnit\ScaleUnit.csproj]
0 Warning(s)
1 Error(s)
REQUEST: guidance on how to consume Microsoft.Azure.Cosmos and assemblies like it.
There are open compliance tasks that need to be reviewed for your Dynamics365Commerce.ScaleUnit repo.
Action required: 3 compliance tasks
To bring this repository to the standard required for 2021, we require Microsoft administrators of this GitHub repository to complete a small set of tasks within the next 60 days. This is critical work to ensure the compliance and security of your GitHub repo.
We have a customization to print QR code on the receipt and we used EncodeQrCodeServiceRequest.
In Independent packaging model, looks like this request is moved to localization NuGet package. So, included the required reference to the project.
For this, we have Implemented GetSalesTransactionCustomReceiptFieldServiceRequest and included below code for QR printing.
However, while executing this code we came across Unknown request type Microsoft.Dynamics.Commerce.Runtime.Localization.Services.Messages.EncodeQrCodeServiceRequest. exception.
As per MS docs link , this request is part of Microsoft.Dynamics.Commerce.Runtime.ElectronicReporting reference.
However, I did not find a NuGet package related to this reference.
Could you please suggest if anything else is missing or any feature needs to be enabled for this request to work.
Do we have any way to move RCSU package (Independent packaging model) from one dev box to other dev box. Currently, when we try to apply the package in another dev box, RCSU package is not shown in the list of packages that can be applied.
For localizations for a particular country, we use ICountryRegionAware interface and include the countries in SupportedCountryRegions as a list.
Alternatively, Is these is any provision for excluding the countries for which this request should not execute i.e., the exclusion country list.
The POS.csproj in this sample doesn't build an installer for ModernPOS, like the InStore sample does. What is the POS project in this solution for and when would you want to use it? Is this for Cloud POS?
Receiving this error during health check after a trying to install a RSSU (sealed .28).
An exception occurred while executing request. CorrelationId: ''. Ex: 'Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException: Keyset does not exist
at Microsoft.Dynamics.Retail.Cdx.RealtimeServiceClientLibrary.RealtimeServiceClient.ProcessInvokeResult(String methodName, String apiName, Int32 parameterCount, RetailTransactionServiceResponse response, Guid correlationId, RetailRealTimeServiceContractChannel channel, Boolean isAsyncCall, Exception& exception, Int32& resultCount, Int64 executionTimeInMs)
Was installed with a cert for each piece, (SSL, Async, RetailServer). We seemed to trace it to the permissions for the RSSU private key being assigned to the ASync cert instead of the RSSU cert.
Hi,
I have created new package using Dynamics365Commerce.ScaleUnit sample. Followed all necessary steps. But my custom package is not loading. Can you help me to identify root cause?
I am getting following error when i debug in IIS Hosted.
The certificate with identifier used to sign the client assertion is not registered on application. [Reason - The key was not found., Thumbprint of key used by client: '3705A3A73DEDAB44AC718A6AF8ED716A028582AD'
Please visit the Azure Portal, Graph Explorer or directly use MS Graph to see configured keys for app Id '32d7f9e2-f3d9-451d-b9e7-e30c50ca89d2' Installation-20220818.txt
Followed the documentation and was able to successfully build the solution. Installed the extension package successfully, but no extensions load in the MPOS application. Event viewer shows the warning: Extension package named 'Contoso.Commerce' installed but not configured (no package definition found).
Consuming Microsoft.Azure.Cosmos in sample CommerceRuntime.csproj leads to build-time errors in sample POS.csproj.
Minimal repro:
1.) Clone the repo.
2.) Check out branch 9.34. (Does not repro on 9.32.)
3.) In src\ScaleUnitSample\CommerceRuntime\CommerceRuntime.csproj, add a reference to Microsoft.Azure.Cosmos. I don't think the version matters but I used
4.) Add a reference somewhere to a type from Microsoft.Azure.Cosmos, e.g. I added to BoundController.cs
public class BoundController : IController
{
private Microsoft.Azure.Cosmos.CosmosClient stub = null; // add a reference to a type from Microsoft.Azure.Cosmos
// so the assembly won't be ignored by the compiler
...
5.) Build the solution.
EXPECTED: everything builds correctly, ScaleUnit package is created. ACTUAL: strange error from TypeScript compilation from POS
Build:Property 'EntityName' is missing in type '{ UnusualEntityId: number; IntData: number; StringData: string; ExtensionProperties: { Key: string; Value: {}; }[]; }' but required in type 'ExampleEntity'.
I am stuck with an issue like i have setup self hosted RSU , now i want to login and activate POS so how it will be authenticated? Please note i am using windows 10 and donβt have preconfigured virtual box .
`Severity Code Description Project File Line Suppression State
Error MSB3027 Could not copy "D:\Dynamics365Commerce.ScaleUnit-release-9.33\Dynamics365Commerce.ScaleUnit-release-9.33\src\ScaleUnitSample\POS\Controls\Dialogs\Create\ExampleCreateDialog.html" to "bin\Debug\netstandard2.0\CloudScaleUnitExtensionPackage\RetailCloudPOS\Code\Extensions\Contoso.Commerce\Controls\Dialogs\Create\ExampleCreateDialog.html". Exceeded retry count of 10. Failed. ScaleUnit C:\Users\username.nuget\packages\microsoft.dynamics.commerce.sdk.scaleunit\9.33.21349.5\build\Microsoft.Dynamics.Commerce.Sdk.ScaleUnit.targets 136
We are migrating Retail SDK to Store Commerce, and having below query.
Request your help here...
Can we make the package name as dynamic not hardcoded, which is defined in POS extension package trigger.
Basically, we are mentioning the package name in the defineposextension trigger and the same name in the customization package props file. Is there possibility to make this as dynamic like a configuration in HQ?
We would like to be able to (continue to) use the L2 caching framework to cache data frequently used in CRT extensions, however, the Microsoft.Dynamics.Commerce.Runtime.DataManagers library is not included in the public package set. Can we maybe get it on the roadmap to make this accessible one way or another?
I am trying to run this sample in IIS hosted local development but Commerce Scale Unit changes are not updated in local CommerceRuntime folder when i compile and run F5 the sample in Visual Studio code. Can you please provide complete steps to run the sample.
We are migrating POS extensions from MPOS to Store Commerce. We found pivot control in 10.0.26 release (https://fix.lcs.dynamics.com/Issue/Details?bugId=659253&dbType=3). Further we tried migrating to new control but view is distorted. Since Pivot items are not generated from control factory, it seems bindings are not working. Overall the view is distorted. If you can provide some sample for pivot control showing some bound data, it will be helpful.
I am facing this issue while upgrading to RCSU Sealed.
Database error 'Unknown' occurred for 'execute query '[ax].[RETAILSTORETABLE]''. The SELECT permission was denied on the object 'RETAILSTORETABLE', database 'RetailChannelDatabase', schema 'ax'.
1.Currently, in legacy MPOS solution we have multiple POS extensions (with different manifest) which includes localizations features for Italy, France etc. In Independent packaging, extensions.json file is moved to crt trigger GetExtensionPackageDefinitionsRequest.
As per the recording/samples, GetExtensionPackageDefinitionsRequest need to include manifest name (Contoso.StoreCommercePackagingSample) and this extension will load the MPOS packages accordingly. Since, we have multiple manifests in this case, could you please let me know how to proceed with this. (How do we need to add these manifests in crt trigger). I tried to include other extension packages in crt trigger with name matching the manifest of MPOS extension. Looks like extension is not loading the MPOS extension.
We canβt create a separate project for each feature/extension, since there are lot of extensions already in this project. As this will create multiple installers and maintenance would be difficult.
Also, we have multiple controllers in RS, so we have created/generated multiple custom data service, data entities files. In this new approach, how can we generate these files and consume in MPOS. Do we need to have separate commerce proxy generation project to generate these files?
Hi PG,
During the installation, we found one issue. When we install the Store Commerce App(Base installer) and custom installer and further activate the store commerce app, the bindings not working. If custom installer is installed after the base app Activation, then everything works fine. Does the order of installation matters?
I am trying to debug BarCodeMsrDialogSample but it is failed to load extensions in POS. Below is the error message.
The extension package could not be loaded. Either the extension manifest.json is not included in the extension package or itβs not formatted correctly.
There are important files that Microsoft projects should all have that are not present in this repository. A pull request has been opened to add the missing file(s). When the pr is merged this issue will be closed automatically.
Hi Product Team,
We are facing issue when we are installing customized installer on top off base Store Commerce App (offline). The package installs successfully but it is failing to call custom api's in local CRT. We see there are some samples generating custom proxies to call local crt but it is not included in generated installer. We are getting errors on all our customizations
Retail proxy client offline request failed. RequestUri: crt://offline/CustomDataManager/GetCustomerAccounts?queryResultSettings=SCRUBBED&accountNum=SCRUBBED&%24locale=SCRUBBED. Exception: System.InvalidOperationException: Can't find manager (CustomDataManager) with method (GetCustomerAccounts) with parameter count (2)
at Microsoft.Dynamics.Commerce.RetailProxy.Adapters.AdaptorCaller.d__29.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Dynamics.Commerce.RetailProxy.Adapters.AdaptorCaller.d__26.MoveNext().
Adding a custom device, IController, to the HWS sample causes the installed HWS to no longer ping.
The vanilla HWS sample works fine. As soon as I add to or replace the payment device, INamedRequestHandler, with a custom device and redeploy the ping fails. I have tried several permutations with the payment device and custom device, but always as soon as I reference the custom device in the extensions config the ping fails.
I am building my extension using the release/9.33 branch and installing over the base "10.0.23 - Hardware Station (SEALED)" package that was created in LCS on 12/17/2021.
Basic custom device
namespace Contoso.HardwareStation.Peripherals.PaymentDevice {
using Microsoft.Dynamics.Commerce.Runtime.Hosting.Contracts;
using System.Threading.Tasks;
[RoutePrefix("TESTDEVICE")]
public class TestDeviceController : IController {
[HttpPost]
public Task<bool> TestOne(IEndpointContext context) {
return Task.FromResult(true);
}
}
}
Event viewer warning
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 1/4/2022 1:45:28 PM
Event time (UTC): 1/4/2022 9:45:28 PM
Event ID: 39fb4d1cc40b4bcc99463e5e5e3fa876
Event sequence: 2
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/7/ROOT/HardwareStation-6-132858063283888627
Trust level: Full
Application Virtual Path: /HardwareStation
Application Path: C:\Program Files\Microsoft Dynamics 365\10.0\Commerce hardware station\Microsoft\Webroot\
Machine name: MININT-FN7JP81
Process information:
Process ID: 3508
Process name: w3wp.exe
Account name: IIS APPPOOL\RetailHardwareStationAppPool
Exception information:
Exception type: TargetInvocationException
Exception message: Exception has been thrown by the target of an invocation.
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Owin.Loader.DefaultLoader.<>c__DisplayClass19_1.<MakeDelegate>b__0(IAppBuilder builder)
at Owin.Loader.DefaultLoader.<>c__DisplayClass9_0.<LoadImplementation>b__0(IAppBuilder builder)
at Microsoft.Owin.Host.SystemWeb.OwinAppContext.Initialize(Action`1 startup)
at Microsoft.Owin.Host.SystemWeb.OwinBuilder.Build(Action`1 startup)
at Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint()
at System.Threading.LazyInitializer.EnsureInitializedCore[T](T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory)
at Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication context)
at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
Could not load file or assembly 'Microsoft.CodeAnalysis, Version=3.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
at Microsoft.Dynamics.Commerce.Runtime.Hosting.Framework.AdapterFactory.GenerateControllerAdapter(ControllerMetadataBase controllerMetadata, IEnumerable`1 derivedControllerMetadataTypes, XslCompiledTransform adapterTemplate, IEnumerable`1 templateDependencies, Stream outputStream)
at Microsoft.Dynamics.Commerce.Runtime.Hosting.Framework.AdapterFactory.GenerateControllerAdapter(ControllerMetadataBase controllerMetadata, IEnumerable`1 derivedControllerMetadataTypes, XslCompiledTransform adapterTemplate, IEnumerable`1 templateDependencies)
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at Microsoft.Dynamics.Commerce.HardwareStation.HardwareStationRuntime.AddExtensionAssembliesToComposition(IEnumerable`1 extensionAssemblyList)
at Microsoft.Dynamics.Commerce.HardwareStation.WebApi.WebApiConfig.Register(HttpConfiguration config, IRetailServerService retailServerService, ISecureStorageProvider pairingKeyStorageProvider, ISecureStorageProvider merchantInfoStorageProvider, ISecureStorageProvider applicationDataStorageProvider)
at Microsoft.Dynamics.Commerce.HardwareStation.StartupBase.Configuration(IAppBuilder app)
Request information:
Request URL: https://minint-fn7jp81:16432/HardwareStation/Ping
Request path: /HardwareStation/Ping
User host address: 192.168.123.63
User:
Is authenticated: False
Authentication Type:
Thread account name: IIS APPPOOL\RetailHardwareStationAppPool
Thread information:
Thread ID: 63
Thread account name: IIS APPPOOL\RetailHardwareStationAppPool
Is impersonating: False
Stack trace: at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Owin.Loader.DefaultLoader.<>c__DisplayClass19_1.<MakeDelegate>b__0(IAppBuilder builder)
at Owin.Loader.DefaultLoader.<>c__DisplayClass9_0.<LoadImplementation>b__0(IAppBuilder builder)
at Microsoft.Owin.Host.SystemWeb.OwinAppContext.Initialize(Action`1 startup)
at Microsoft.Owin.Host.SystemWeb.OwinBuilder.Build(Action`1 startup)
at Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint()
at System.Threading.LazyInitializer.EnsureInitializedCore[T](T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory)
at Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication context)
at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
Custom event details:
Currently, we are working on activating OOB Store Commerce App (CPOS) using Hybrid deployment.
Deployment was successful, however when activating the CPOS we are seeing the below error and activation does not proceed further.
SendRemoteTaskRequestData - Failure. The remote task request failed. The remote task request was run but failed at the target. Correlation id: ad13852f-ded0-4c95-b71d-4d813f48c6c4.
Task instance id: 30467.6000000015. Error:
SendRemoteTaskRequestData - Failure. The remote request failed. The remote request was run but the response from the remote endpoint was not successfully sent. Correlation id: 6f980217-2ff2-51a4-fe4e-b46ea37d367f. Task instance id: 6b7b5be8-6fed-9443-77a8-a187f238b5a9. Message type: RemoteTaskResponse.
microsoft.dynamics.commerce.runtime.services.pricingengine.9.32.21271.2.nupkg
)
We are using some of the public classes from the following packages.
Will they be available also in the feed? Or do we need to recreate all of them in our custom solution and can't use any of the standard classes from these packages?
Hi,
Is there any documentation to explain debug procedure for CPOS and CRT code? I wanted to run CPOS and debug CPOS and CRT code same time like RetailSDK.
Download the code to test the "HardwareStation.Samples" solution. It builds fine. When debugging or running the installer nothing much seems to happen. More documentation is needed to get easy and clear idea about the "Commerce Installers Framework" and how to get the most out of the HardwareStation.Intstaller project.
Note: since the Interface.g.cs generated code is in namespace ECommerceProxyGenerator.Adapters already, it is not necessary to fully-qualify the reference to ExampleEntity.
I have a customization that was working fine with release/9.38. I am attempting to update to release/9.39. Updated to release/9.39, my customization builds and installs just fine. I can even see my custom endpoints listed in the RS' metadata view. However, whenever the POS (store commerce) attempts to interact with any of the custom RS endpoints, the request fails with the error at the end of this post.
I looked at the extensions installation directory and a bunch of Microsoft and system libraries have been added in addition to my custom libraries. I don't believe that this is normal, as when I install the example ScaleUnit extension, none of these libraries exist. Also, if I manually remove all of the files except for my customization libraries and restart the server then interaction with the RS endpoints from the POS is successful.
My question is: what is causing my custom ScaleUnit installer to include these additional libraries? How can I fix this without manual intervention?
Except for Newtonsoft.Json, my various project files only reference libraries and versions specified in repo.props. As mentioned, the only other library referenced by my code is Newtonsoft.Json which is referencing version 13.0.1.
I chose this version of Newtonsoft, because this is the version that the 9.39.22263.8 version of the base sealed scale unit installs, specifically 13.0.1.25517. This is the latest base sealed scale unit installer on LCS as of 9/20. The Newtonsoft library might be a rabbit trail, but it is the only significant difference I am seeing in my customization's project files v. the example ScaleUnit extension.
Microsoft and system libraries added to extension directory
I have to add several dll's from an ISV. I have tried multiple configurations, but nothing so far causes them to be included in the config files. The only files included are the assemblies built from project references.
The best I've been able to do so far is to create a separate project with just those dll's added as a reference. As long as I check the option to copy local, they will be dropped into the ext folder, but not included in the config file.
You can see below that the files are in the ext directory
But only the assemblies built by my project are in the configs
We are migrating Retail SDK to Store Commerce, and having below query...
Request your help here...
We like to add multiple projects with single installer, but getting deployment issue as it is deploying only one project (i.e last project in the solution). Is that we are missing something here. Can you please advise?
Issue like while adding multiple project reference in a single pos extension installer, it is deploying only one project in the extension folder of d365.
The CommerceStoreScaleUnitSetup.exe installer (the Commerce Scale Unit sealed installer), which is referenced in the VSCode "install" task, executed by the "install.ps1" script, does not allow installation under a username that contains the "." character. The "firstname.lastname" username convention is standard for my org (and many others), and having this constraint in the installer framework prohibits such users from using the F5 experience.
The invalid character list is: " / \ [ ] : ; | = , + * ? < >
Whereas the installer framework (Microsoft.Dynamics.Commerce.Installers.Framework.WindowsGroup) enforces the following prohibited character pattern: /"[]:|<>+=;.?*@
Seems in .28 providing a bad retail server URL in the beginning will get the activation process stuck. it fails to retrieve the device configuration and won't allow you to start over. Closing re-opening the app doesn't work, it just keeps retrying.
Issue details:
The Publisher property in the repo.props file should match the publisher of the code signing certificate you are using. (This is especially crucial in the POS solution, as it is validated on POS Extension install). For most code signing certificates, the publisher contains not only the CN, but also organization name, location and country. The correct format is for those values to be separated by a comma. <Publisher Condition="'$(Publisher)' == ''">CN=Contoso Ltd.</Publisher>
During the build of the Scale Unit CS Project, the MS build targets for the project (Microsoft.Dynamics.Commerce.Sdk.ScaleUnit.targets), at line 90, attempts to replace the publisher name in the manifest file.
Edit repo.props file chaning publisher to: CN=Contoso LTD, O=Contoso
Open ScaleUnit solution and build
Suggested solution:
Encapsulate the value of %(CustomManifestDataToReplace.ReplacementValue) with single quotes in Microsoft.Dynamics.Commerce.Sdk.ScaleUnit.targets Line 90:
We are migrating Retail SDK to Store Commerce, and having query below
Request your help here...
Can we use telemetry in store commerce as we use in Retail SDK(POS).
Telemetry:
We are trying to log the information and customization errors in AppInsight of Azure. We are following the link as provided by MS Log extension events to Application Insights - Commerce | Dynamics 365 | Microsoft Learn
We are facing issue as we are not able to build the project and getting the configuration error in tsconfig.json file after installation of npm module.
We are migrating Retail SDK to Store Commerce, and having below queries.
Request your help here...
1.We like to add multiple projects with single installer, but getting deployment issue as it is deploying only one project (i.e last project in the solution). Is that we are missing something here. Can you please advise?
Issue like while adding multiple project reference in a single pos extension installer, it is deploying only one project in the extension folder of d365.
2. Can we make the package name as dynamic not hardcoded, which is defined in POS extension package trigger.
Basically, we are mentioning the package name in the defineposextension trigger and the same name in the customization package props file. Is there possibility to make this as dynamic like a configuration in HQ?
3. Can we use telemetry in store commerce as we use in Retail SDK(POS).
Telemetry:
We are trying to log the information and customization errors in AppInsight of Azure. We are following the link as provided by MS Log extension events to Application Insights - Commerce | Dynamics 365 | Microsoft Learn
We are facing issue as we are not able to build the project and getting the configuration error in tsconfig.json file after installation of npm module.
Attempting to build the POS sample fails during MPOS app package signing when running as a user that is not attached to a domain and a signing cert does not already exist. See error and screenshot below.
Error Message:
"Export-PfxCertificate : Using ProtectTo parameter requires running as a domain account."
There are important files that Microsoft projects should all have that are not present in this repository. A pull request has been opened to add the missing file(s). When the pr is merged this issue will be closed automatically.