Events
Mar 31, 11 PM - Apr 2, 11 PM
The ultimate Microsoft Fabric, Power BI, SQL, and AI community-led event. March 31 to April 2, 2025.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
This article describes how to create a Microsoft Dynamics 365 Commerce Store Commerce extension installer package.
Note
You can find the full code samples in the Store Commerce Extension samples GitHub repository (repo).
To create the extension installer for Store Commerce extension, follow these steps.
In Microsoft Visual Studio 2022, create a new .NET console application project named "StoreCommerce.ExtInstaller". For Framework, select .NET 7.0 (Standard Term Support).
In the .proj file, change the target framework to the .NET Framework version 4.7.2, as shown in the following XML example.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net472</TargetFramework>
</PropertyGroup>
</Project>
Delete the Program.cs file that was generated.
Add a reference to the Microsoft.Dynamics.Commerce.Sdk.Installers.StoreCommerce NuGet package:
Add a reference to the Store Commerce extension .csproj projects, Commerce runtime (CRT), and database script project extensions:
Compile and build the project. The output of this project contains the Store Commerce extension installer. When you select the F5 key and build the project, the installer is deployed automatically.
To manually install the extension, open Windows PowerShell in administrator mode, go to the extension installer folder, and run the following install command.
PS C:\StoreCommerce.ExtInstaller\bin\Debug\net472> .\ StoreCommerce.ExtInstaller.exe install
Note
Before you install the extension installer, install the Store Commerce app.
To uninstall the extension, run the following uninstall command.
PS C:\StoreCommerce.ExtInstaller\bin\Debug\net472> .\ StoreCommerce.ExtInstaller.exe uninstall
After you finish installing the extension, close Store Commerce if it's running. Then, to load the extension, open Store Commerce by using the Store Commerce shortcut on the desktop.
Note
Although code signing isn't a strict requirement for the Store Commerce extension installer like for Modern POS (MPOS), Microsoft recommends using code signing to verify the authenticity of any executable run on POS registers. You can configure your Azure DevOps pipeline to use the Trusted Signing - Visual Studio Marketplace task to digitally sign your files using a Trusted Signing certificate during an Azure Pipelines run.
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\CustomizationPackage.props " />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net472</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>
Events
Mar 31, 11 PM - Apr 2, 11 PM
The ultimate Microsoft Fabric, Power BI, SQL, and AI community-led event. March 31 to April 2, 2025.
Register today