---
title: "顧客のサンプルソリューションを活用してください"
slug: "use-the-customer-sample-solution"
abstract: ""
---
# 顧客のサンプルソリューションを活用してください

Sitecore Experience Commerce(XC)には、Commerce Engineを拡張するための出発点として使えるサンプルソリューションが含まれています。このサンプルソリューション(Customer.Sample.Solution)はSitecore.Commerce.Engine.SDKの一部です。Sitecoreはまた、公式のSitecore Commerce NuGet Feedから入手可能なプラグインプロジェクトテンプレートのサンプルも提供しています。

> !重要Sitecore.Commerce.Engine.SDKで働く際は、2019 Visual Studio必ずご利用ください。

Customer.Sample.Solutionには以下が含まれています:

-   Sitecore.Commerce.Engineプロジェクト(ASP.NETコアホスト)。
-   サンプルプラグインは以下の通りです:
    -   Plugin.Sample.AdventureWorks - ソリューションの開発やテストに使用できるサンプルデータ。
    -   Plugin.Sample.Habitat\- ソリューションの開発やテストに使用できるサンプルデータ。
    -   Plugin.Sample.Payments.Braintree - Braintree決済統合の動作。

Sitecore.Commerce.Engine.SDKにはSitecore.Commerce.Sample.Console.slnも含まれており、これはサンプルを提供し、標準シナリオのエンドツーエンドデモンストレーションや機能テストを可能にするサンプルコンソール[アプリケーション](https://doc.sitecore.com/xp/ja/developers/101/sitecore-experience-commerce/sample-console-application.html "Sample console application")です。2つ目のVisual Studioインスタンスで読み込み、不要なシナリオを削除したり、自分でシナリオを追加して特定のシナリオをテストしたりして強化できます。これは拡張性と統合の迅速かつ反復的な開発に役立ちます。バックエンドシナリオをSitecore実行せずに構築・テストが可能です。

顧客サンプルソリューションを使用するには:

1.  Sitecore.Commerce.WDPパッケージの一部として、[Sitecore XCリリースパッケージ](https://dev.sitecore.net/Downloads/Sitecore_Commerce.aspx)に含まれるSitecore.Commerce.Engine.SDK.\*.\*.\*.ZIPアーカイブを解凍してください。
    
    > !注デフォルトでは、Microsoftはパス(ファイル名とそのディレクトリ経路)の最大長さを260文字に設定しています。そのため、抽出されたファイルのフォルダパスと名前はできるだけ短く保つことが重要です。
    
2.  [公式Sitecore Commerce NuGetフィード](https://nuget.sitecore.com/resources/v3/index.json)から、以下のパッケージをダウンロードしてください:
    
    -   Sitecore.Commerce.Plugin.Template.\*.\*.\*.nupkg
3.  サンプルプラグインテンプレートをインストールするには、管理者としてWindows Powershellを開き、以下のコマンドを実行します。
    
    dotnet new -i "<path>\\Sitecore.Commerce.Plugin.Template.\*.\*.\*.nupkg"
    
    例えば、dotnet new -i "C:\\Sitecore.Commerce.Plugin.Template.\*.\*.\*.nupkg".これにより、以下の画像に示されているSitecore Commerce Sample Pluginテンプレートがインストールされます。
    
    ![List of installed templates](https://doc.sitecore.com/api/markdown-image/xp/ja/developers/101/sitecore-experience-commerce/images/CustomerSampleSolutionTemplates.png)
    
4.  Visual StudioでCustomer.Sample.Solution.sln溶液を開けます。
    
    これは、Commerce Engineのプラグインを開発したり、新しいエンジンインスタンスを構築・デプロイしたりするために使うVisual Studioのソリューションです。
    
5.  システムが動作しているか確認するには、**Solution Explorer**でCustomer.Sample.Solutionを右クリックして「 **ソリューション構築**」をクリックします。
    
    もしうまくビルドできれば、プラグイン [の作成](https://doc.sitecore.com/xp/ja/developers/101/sitecore-experience-commerce/create-your-first-plugin.html "Create your first plugin")準備が整います。