Code Monkey home page Code Monkey logo

dynamics365commerce.solutions's Introduction

page_type languages products name description
sample
csharp
typescript
html
Dynamics 365 Commerce
Extend Dynamics 365 Commerce
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.

dynamics365commerce.solutions's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dynamics365commerce.solutions's Issues

How to Create a Store Commerce Installer Project & Debug Store Commerce Extensions

(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.

To create the extension installer for Store Commerce extension, follow these steps.
You can find the full code samples in Store Commerce Extension samples GitHub repo

  1. In Microsoft Visual Studio 2017, create a new console application (.NET Core), and name it StoreCommerce.ExtInstaller.
  2. Edit the .proj file, and change the target framework to the .NET Framework version 4.6.1, as shown in the following XML.
        <Project Sdk="Microsoft.NET.Sdk">
            <PropertyGroup>
                <OutputType>Exe</OutputType>
                <TargetFramework>net461</TargetFramework>
            </PropertyGroup>
        </Project>
  1. Delete the Program.cs file that was generated.
  2. Add a reference to the Microsoft.Dynamics.Commerce.Sdk.Installers.StoreCommerce NuGet Package:
    1. In Solution Explorer, select and hold (or right-click) the project, and then select Manage NuGet packages.
    2. In the NuGet Package Manager window, on the Browse tab, search for Microsoft.Dynamics.Commerce.Sdk.Installers.StoreCommerce.
    3. Select the package, and then select Install.
    4. Select the version that matches your go-live version.
  3. Add a reference to the Store Commerce Extension csproj projects, Commerce runtime and database scripts project extensions:
    1. In Solution Explorer, select and hold (or right-click) the project, and then select Add > Reference.
    2. In Reference Manager, on the Projects tab on the left, select the extension project that you created earlier.

Sample code:

<Project Sdk="Microsoft.NET.Sdk">
	  <Import Project="..\CustomizationPackage.props " />
	  <PropertyGroup>
	    <OutputType>Exe</OutputType>
	    <TargetFramework>net461</TargetFramework>
	  </PropertyGroup>
	  <ItemGroup>
	    <PackageReference Include="Microsoft.Dynamics.Commerce.Sdk.Installers.StoreCommerce" Version="$(CommerceSdkPackagesVersion)" />
	  </ItemGroup>
	  <ItemGroup>
	    <ProjectReference Include="..\CommerceRuntime\Contoso.GasStationSample.CommerceRuntime.csproj">
	      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
	    </ProjectReference>
	    <ProjectReference Include="..\Pos\Contoso.GasStationSample.Pos.csproj">
	      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
	    </ProjectReference>
	  </ItemGroup>
	  <ItemGroup>
	    <!-- Settings included in the CommerceRuntimeExtensionSettings item group will be added to the generated CommerceRuntime config file and available at runtime in the CommerceRuntime extension. -->
	    <CommerceRuntimeExtensionSettings Include="ext.Contoso.GasolineItemId">
	      <Value>gasoline</Value>
	    </CommerceRuntimeExtensionSettings>
	  </ItemGroup>
	</Project>
  1. 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.
  2. To manually install the extension, open Windows PowerShell in administrator mode, go to the extension installer folder, and run the install command.
PS C:\StoreCommerce.ExtInstaller\bin\Debug\net461> .\ StoreCommerce.ExtInstaller.exe install

To uninstall the extension, run the uninstall command.

PS C:\StoreCommerce.ExtInstaller\bin\Debug\net461> .\ StoreCommerce.ExtInstaller.exe uninstall

Before you install the extension installer, install the Store Commerce app.

  1. 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.

  1. Install Visual Studio Code
  2. Launch the Visual Studio Code and install the Microsoft Edge Tools for VS Code - Visual Studio Marketplace

image

  1. Before deploying the extensions, Install the Store Commerce app, during install please enable the debug option by passing the parameter --enablewebviewdevtools.
Ex:  .\StoreCommerce.Installer.exe install --enablewebviewdevtools
  1. 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.****

  1. Open VS developer command prompt and type code . to open VS code.
  2. Inside the VSCode, Click File > Open Folder and open your Extension Code root folder.
  3. In the VSCode, right click the root folder of your solution directory and create a new folder called .vscode.
  4. Inside the .vscode folder, create a new file and name it as launch.json.

image

  1. 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.

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "pwa-msedge",
            "request": "launch",
            "port": 9222,
            "name": "Debug Store Commerce",
            "useWebView": true,
            "runtimeExecutable": "${env:ProgramFiles}/Microsoft Dynamics 365/10.0/Store Commerce/Microsoft/contentFiles/Microsoft.Dynamics.Commerce.StoreCommerce.exe",
            "userDataDir": "${env:LocalAppData}/Microsoft Dynamics 365/10.0/Data/Store Commerce/Pos",
            "url": "file:///${env:ProgramFiles}/Microsoft Dynamics 365/10.0/Store Commerce/Microsoft/contentFiles/Pos/Pos.html"
        },
        {
            "type": "pwa-msedge",
            "request": "launch",
            "port": 9222,
            "name": "Build and Debug Store Commerce",
            "useWebView": true,
            "runtimeExecutable": "${env:ProgramFiles}/Microsoft Dynamics 365/10.0/Store Commerce/Microsoft/contentFiles/Microsoft.Dynamics.Commerce.StoreCommerce.exe",
            "userDataDir": "${env:LocalAppData}/Microsoft Dynamics 365/10.0/Data/Store Commerce/Pos",
            "url": "file:///${env:ProgramFiles}/Microsoft Dynamics 365/10.0/Store Commerce/Microsoft/contentFiles/Pos/Pos.html",
            "preLaunchTask": "${defaultBuildTask}"
        },
        {
            "name": "Attach debugger to Store Commerce",
            "type": "pwa-msedge",
            "port": 9222,
            "request": "attach",
            "useWebView": true,
            "runtimeExecutable": "${env:ProgramFiles}/Microsoft Dynamics 365/10.0/Store Commerce/Microsoft/contentFiles/Microsoft.Dynamics.Commerce.StoreCommerce.exe"
        }
    ]
}
  1. Inside the .vscode folder, create a new file and name it as tasks.json to create the configurations to build and install the Store Commerce app.

Inside the tasks.json file, copy the below configurations:

		{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Build & Install Store Commerce Extension",
            "type": "shell",
            "command": "msbuild",
            "args": [
                "/p:Configuration=debug",
                "/p:InstallStoreCommerceExtensionsAfterBuild=true",
                "/t:build",
                "/m",
                "/consoleloggerparameters:NoSummary",
                "${workspaceFolder}"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
        }
    ]
}
  1. 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.

image

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.

Tasks Error when using installer

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.

image
Thanks,
Chad

CustomLinesGridItemSubfieldBase computeValue receives a CartLineForDisplay

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.

image

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)

Cloud Scale Unit manifest does not allow for commas in the publisher name

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.

Is there a reference for all Commerce classes and their namespaces? Question about migrating some classes.

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.

Namespaces missing?

  • Microsoft.Dynamics.Commerce.Runtime.TransactionService;
  • Microsoft.Dynamics.Commerce.Runtime.DataServices.SqlServer;

Classes missing?

  • TransactionServiceClient
  • DatabaseErrorCodes
  • SalesTransactionDataService

There is an older reference document for the older RetailSDK, but I'm not seeing it for D365 with the CommerceSDK. If there is a similar link, can you point me to it?
https://docs.microsoft.com/en-us/dynamicsax-2012/appuser-itpro/crt-ref/net-framework-classes-for-microsoft-dynamics-ax-commerce-runtime

Compiler error with tsconfig.json

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?
image

Is there any possibility to split the ChannelDatabase.sql script to many files?

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?

CommerceRuntime sample fails when Nuget reference to Microsoft.Azure.Cosmos is added

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

<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.23.0" />

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.

KNOWN WORKAROUNDS: Use branch 9.32 instead.

ACTION REQUIRED: Microsoft needs this repository to complete compliance info

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.

Microsoft repo admins: Please take a few minutes to complete the tasks at: https://repos.opensource.microsoft.com/orgs/microsoft/repos/Dynamics365Commerce.ScaleUnit/compliance

You can close this work item once you have completed the compliance tasks, or it will automatically close within a day of taking action.

If you no longer need this repository, it might be quickest to delete the repo, too.

QR Code printing Issue

  1. 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.

  1. 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.

  2. 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.

Question: What is the POS.csproj in this sample for?

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?

Asking because I originally followed this sample to port my Modern POS extension to CommerceSDK, but then couldn't find an installer. I'm pretty sure now I should have been following the InStore PackagingSamples instead (https://github.com/microsoft/Dynamics365Commerce.InStore/tree/release/9.35/src/PackagingSamples/ModernPos).

ScaleUnit Installer Cert Issues

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.

image

Buttons with action properties not showing Tooltips

a button that has an action attached doesn't show tooltips.. Payment methods are a good example that show this behavior.

in Pos.Controls.js the tooltip is set correctly on lines 17942/17945/17948. but then is cleared by line 17950.

image

Inside the formatedJoin. method if more then 1 element exists the second element will end up in the format call, with a " " format string.

image

this then returns the " " string from the format call

image

Question: about the access to the POS Url (Commerce SDK) from the other machine.

Hi all

We had installed the new Commerce SDK in a Cloud Hosted (Dev) environment, where the HQ is the same Cloud Hosted Environment.

I have a question about the access to the POS Url from the other machine.

Can you tell me if we have any possible access to the POS Url (https://XXXXXXX:446/pos/#) from outside the RDP (Cloud Hosted Environment)?

This alternative helps our consultants to carry out the tests in a more productive way.

Thank you in advance!

Error while debugging ScaleUnit code in IIS Hosted mode

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

Cannot get sample extensions to load

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).

What am i missing?

POS sample fails when Nuget reference to Microsoft.Azure.Cosmos is added to CommerceRuntime sample

[Possibly related to #8]

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

<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.23.0" />

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

src\ScaleUnitSample\POS\Controls\Dialogs\Create\ExampleCreateDialogModule.ts

Build:Property 'EntityName' is missing in type '{ UnusualEntityId: number; IntData: number; StringData: string; ExtensionProperties: { Key: string; Value: {}; }[]; }' but required in type 'ExampleEntity'.

Activate POS with self hosted RSU

Hi team,

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 .

Unable to build Scale Unit Project.

`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

Thanks,
Aman

how to avoid hardcoding the package name in defineposextension trigger in store commerce

Hello everyone,

Good Day!!!

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?

Thanks,
Chaya Masade

Pivot Control Migration Issues

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.

Store Commerce App - Multiple MPOS extensions migration

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.

  1. 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.

  2. 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?

Knockout Bindings issue when executing installers without activating the Store Commerce App

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?

Following steps we noticed.
Not Working

  1. Install Store Commerce App Base installer.
  2. Install Custom installer.
  3. Activate the Store Commerce App
  4. Start App. Bindings has issues

Working

  1. Install Store Commerce App Base installer.
  2. Activate the Store Commerce App
  3. Install Custom installer.
  4. Start App. Worked!

Thanks
Zubair

Store Commerce Offline Mode Custom proxy issue (Can't find manager)

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().

Hardware Station extension with IController fails to ping

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: 

Store Commerce App - Hybrid Deployment - Activation failure

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.

Followed the below docs link to activate CPOS.

https://docs.microsoft.com/en-us/dynamics365/commerce/dev-itpro/store-commerce#hybrid-deployment

Please provide suggestions on the below issue.

Event Viewer logs :

  1. 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:

  2. RunOutgoingTask - Outgoing task timed out. Correlation ID: correlationId. Task name: Shell.HandleCloudPosLoadResult. Outgoing task id: a1f3314c-cc0e-4d37-8286-d25552707c88. TimeoutInMilliseconds: 30000. Serialized Parameters: (SCRUBBED).

  3. 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.

Retail SDK packages availability

Hello,

Some of the packages that were available before in RetailSDK folder are not available in CommerceSDK NuGet feed (e.g.

  • microsoft.dynamics.commerce.runtime.localization.services.9.32.21271.2.nupkg
  • microsoft.dynamics.commerce.runtime.services.9.32.21271.2.nupkg
  • 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?

More documentation regarding the HardwareStation installer

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.

C# proxy generation not well documented and has some bugs

Repro:

  1. Clone the repo
  2. Change E-CommerceProxyGenerator to generate C# proxies by changing "TypeScriptModuleExtensions" to "CSharpExtensions" in the .csproj.
<CommerceProxyGeneratorApplicationType>CSharpExtensions</CommerceProxyGeneratorApplicationType>
  1. Build the project.

Expected: successfully builds C# proxy.
Actual: Over a hundred compile errors.

It seems there are three different problems here, and three things need to be done to get a successful compilation.

Issue 1: Hyphenated namespace

Generated namespace appears to be based on the project name. Since hyphens are illegal in C# namespaces, this fails to compile

namespace E-CommerceProxyGenerator.Adapters // error: you can't have a hyphen "-" in a C# namespace name

Solution: You must rename the .csproj to remove the hyphen. Renaming the project to "ECommerceProxyGenerator" worked for me.

Issue 2: Missing PackageReference

Generated code has an external dependency. References to things like "IEntityManager" fail to compile.

Solution: Adding a Nuget reference to Microsoft.Dynamics.Commerce.Proxy.ScaleUnit worked for me. Add the following to ECommerceProxyGenerator.csproj:

        <PackageReference Include="Microsoft.Dynamics.Commerce.Proxy.ScaleUnit" Version="$(CommerceChannelPackagesVersion)" />

Note: I'm assuming you've already added dynamics365-commerce Nuget feed to your Nuget.config. If you haven't yet, add it like this:

<add key="dynamics365-commerce" value="https://pkgs.dev.azure.com/commerce-partner/Registry/_packaging/dynamics365-commerce/nuget/v3/index.json" />

Issue 3: Reference to nonexistent types

Generated code in Interface.g.cs refers to types in namespaces where they don't exist.

Task<bool> UpdateExampleEntity(long unusualEntityId, Contoso.CommerceRuntime.Entities.DataModel.ExampleEntity updatedEntity);

But ExampleEntity is actually generated in namespace ECommerceProxyGenerator. So after the C# is generated, it cannot compile unless you alter it:

Task<bool> UpdateExampleEntity(long unusualEntityId, ExampleEntity updatedEntity);

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.

System libraries automatically added to ScaleUnit extension directory cause error at runtime in release/9.39

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.

<PackageReference Include="Newtonsoft.Json" 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

/ChannelDatabase
/POS
(... my custom libraries ...)
Extension.config
Microsoft.Dynamics.Retail.Diagnostics.dll
Microsoft.Dynamics.Retail.PaymentSDK.Portable.dll
Microsoft.Extensions.DependencyInjection.Abstractions.dll
Microsoft.Extensions.DependencyInjection.dll
Microsoft.Extensions.Logging.Abstractions.dll
Microsoft.Extensions.Logging.Debug.dll
Microsoft.Extensions.Logging.dll
Microsoft.Extensions.Options.dll
Microsoft.Extensions.Primitives.dll
Newtonsoft.Json.dll
System.Collections.Concurrent.dll
System.ComponentModel.dll
System.Composition.AttributedModel.dll
System.Composition.Convention.dll
System.Composition.Hosting.dll
System.Composition.Runtime.dll
System.Composition.TypedParts.dll
System.Diagnostics.DiagnosticSource.dll
System.IO.FileSystem.Primitives.dll
System.Linq.dll
System.Private.DataContractSerialization.dll
System.Reflection.Emit.dll
System.Reflection.Emit.ILGeneration.dll
System.Reflection.Emit.Lightweight.dll
System.Reflection.TypeExtensions.dll
System.Runtime.CompilerServices.Unsafe.dll
System.Runtime.Numerics.dll
System.Runtime.Serialization.Json.dll
System.Runtime.Serialization.Primitives.dll
System.Runtime.Serialization.Xml.dll
System.Security.Cryptography.OpenSsl.dll
System.Security.Cryptography.Primitives.dll
System.Text.RegularExpressions.dll
System.Threading.dll
System.Threading.Tasks.Extensions.dll
System.Xml.ReaderWriter.dll
System.Xml.XDocument.dll
System.Xml.XmlDocument.dll
System.Xml.XmlSerializer.dll

### Error
`An error occurred during the Retail Server Request. RequestUri: https://(...retail server address...)/RetailServer/Commerce/(...method name...)?api-version=7.3. RequestId: b4fc2e1e-d7a2-b397-e490-1ceb80013033. Exception: System.TypeLoadException: Could not load type 'Microsoft.Extensions.DependencyInjection.ActivatorUtilitiesConstructorAttribute' from assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=1.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
   at System.ModuleHandle.ResolveType(QCallModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
   at System.ModuleHandle.ResolveTypeHandle(Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
   at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
   at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(MetadataToken caCtorToken, MetadataImport& scope, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder1& derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctorWithParameters, Boolean& isVarArg)
   at System.Reflection.CustomAttribute.IsCustomAttributeDefined(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Int32 attributeCtorToken, Boolean mustBeInheritable)
   at System.Reflection.RuntimeConstructorInfo.IsDefined(Type attributeType, Boolean inherit)
   at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.TryFindPreferredConstructor(Type instanceType, Type[] argumentTypes, ConstructorInfo& matchingConstructor, Nullable1[]& parameterMap)
   at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.FindApplicableConstructor(Type instanceType, Type[] argumentTypes, ConstructorInfo& matchingConstructor, Nullable1[]& matchingParameterMap)
   at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateFactory(Type instanceType, Type[] argumentTypes)
   at Microsoft.AspNetCore.Mvc.Controllers.ControllerActivatorProvider.CreateActivator(ControllerActionDescriptor descriptor)
   at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.CreateControllerFactory(ControllerActionDescriptor descriptor)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvokerCache.GetCachedResult(ControllerContext controllerContext)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvokerProvider.OnProvidersExecuting(ActionInvokerProviderContext context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionInvokerFactory.CreateInvoker(ActionContext actionContext)
   at Microsoft.AspNetCore.Mvc.Routing.ActionEndpointFactory.<>c__DisplayClass9_0.<CreateRequestDelegate>b__0(HttpContext context)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.Invoke(HttpContext httpContext)
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNet.OData.Batch.ODataBatchMiddleware.Invoke(HttpContext context)
   at Microsoft.Dynamics.Retail.RetailServerLibrary.Middlewares.Redirection.RedirectionMiddleware.Invoke(HttpContext context)
   at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService)
   at Microsoft.Dynamics.Retail.RetailServerLibrary.Middlewares.Authentication.ExternalIdentityAuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.Dynamics.Retail.RetailServerLibrary.Middlewares.Authentication.OperatingUnitAuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.Dynamics.Retail.RetailServerLibrary.Middlewares.Authentication.DeviceTokenAuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context)
   at Microsoft.Dynamics.Retail.RetailServerLibrary.Middlewares.Instrumentation.InstrumentationMiddleware.Invoke(HttpContext context). UnscrubbedException: .

After build, ISV DLL's are not included in CommerceRuntime.ext.config or web.config

I am using release 9.31

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
image

But only the assemblies built by my project are in the configs
image

How can I get those files to be included?

Is it possible to have single installer for multiple project in Store commerce..

Hello everyone,

Good Day!!!

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.

Thanks,
Chaya Masade

Commerce Scale Unit Installer fails to install in self-hosted mode if the executing user's name contains a "." (breaking the "F5 experience")

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.

Is it possible to get the product team to relax the constraint on the "." character appearing in usernames since it is valid for windows usernames?
see https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-2000-server/bb726984(v=technet.10)?redirectedfrom=MSDN

The invalid character list is: " / \ [ ] : ; | = , + * ? < >
Whereas the installer framework (Microsoft.Dynamics.Commerce.Installers.Framework.WindowsGroup) enforces the following prohibited character pattern: /"[]:|<>+=;.?*@

Getting stuck during activation

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.

ScaleUnit project build fails if publisher name in repo.props contains special chars

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.

Lines="$([System.IO.File]::ReadAllText(
        $(ManifestFile)).Replace(%(CustomManifestDataToReplace.Identity), %(CustomManifestDataToReplace.ReplacementValue)))"

Error Message:
If the publisher contains special characters (e.g. comma), the build will fail with the following error:

ScaleUnit -> C:\XXX\ScaleUnit\src\ScaleUnitSample\ScaleUnit\bin\Release\netstandard2.0\ScaleUnit.dll
C:\Users\XXX\.nuget\packages\microsoft.dynamics.commerce.sdk.scaleunit\9.30.21211.6\build\Microsoft.Dynamics.Commerce.Sdk.ScaleUnit.targets(90,7): error MSB4184: The expression ""{
C:\Users\XXX\.nuget\packages\microsoft.dynamics.commerce.sdk.scaleunit\9.30.21211.6\build\Microsoft.Dynamics.Commerce.Sdk.ScaleUnit.targets(90,7): error MSB4184:     "sdkVersion": "9.28.0.0",
C:\Users\XXX\.nuget\packages\microsoft.dynamics.commerce.sdk.scaleunit\9.30.21211.6\build\Microsoft.Dynamics.Commerce.Sdk.ScaleUnit.targets(90,7): error MSB4184:     "customPackageName": "Contoso Scale Unit Example Commerce Customization",
C:\Users\XXX\.nuget\packages\microsoft.dynamics.commerce.sdk.scaleunit\9.30.21211.6\build\Microsoft.Dynamics.Commerce.Sdk.ScaleUnit.targets(90,7): error MSB4184:     "customPackageDescription": "MANIFEST_CUSTOM_DESCRIPTION",
C:\Users\XXX\.nuget\packages\microsoft.dynamics.commerce.sdk.scaleunit\9.30.21211.6\build\Microsoft.Dynamics.Commerce.Sdk.ScaleUnit.targets(90,7): error MSB4184:     "customPackagePublisher": "MANIFEST_CUSTOM_PUBLISHER",
C:\Users\XXX\.nuget\packages\microsoft.dynamics.commerce.sdk.scaleunit\9.30.21211.6\build\Microsoft.Dynamics.Commerce.Sdk.ScaleUnit.targets(90,7): error MSB4184:     "customPackageVersion": "MANIFEST_CUSTOM_VERSION"
C:\Users\XXX\.nuget\packages\microsoft.dynamics.commerce.sdk.scaleunit\9.30.21211.6\build\Microsoft.Dynamics.Commerce.Sdk.ScaleUnit.targets(90,7): error MSB4184: }
C:\Users\XXX\.nuget\packages\microsoft.dynamics.commerce.sdk.scaleunit\9.30.21211.6\build\Microsoft.Dynamics.Commerce.Sdk.ScaleUnit.targets(90,7): error MSB4184: ".Replace(MANIFEST_CUSTOM_PUBLISHER, CN=XXX, O=XXX, L=XXX, C=XX)" cannot be evaluated. Method 'System.String.Replace' not found.
1>Done building project "ScaleUnit.csproj" -- FAILED.

Reproduction steps:

  1. Clone the ScaleUnit solution
  2. Edit repo.props file chaning publisher to: CN=Contoso LTD, O=Contoso
  3. 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:

Lines="$([System.IO.File]::ReadAllText(
        $(ManifestFile)).Replace(%(CustomManifestDataToReplace.Identity), '%(CustomManifestDataToReplace.ReplacementValue)'))"

Telemetry for store commerce

Hello everyone,

Good Day!!!

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.

Thanks,
Chaya Masade

Retail SDK to Store Commerce migration issues while configuring:

Hello everyone,

Good Day!!!

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.

Thanks,
Chaya Masade

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.