Set up the Content Hub ONE Client SDK

To use the Content Hub ONE Client SDK, you add a NuGet or NPM package source when you import the Content Hub ONE Client package into your project.

NuGet

The Content Hub ONE Client SDK packages are available on the following NuGet V3 feed (Visual Studio 2015+):

https://nuget.sitecore.com/resources/v3/index.json

To set up and install the package:

  1. Add the NuGet feed to your local NuGet configuration:

    RequestResponse
    dotnet nuget add source --name sitecore-resources https://nuget.sitecore.com/resources/v3/index.json
    
  2. Add the Content Hub ONE Client SDK NuGet package (ContentHubOne.Sdk) to your project. For information about adding a NuGet package, see Install and manage packages in Visual Studio.

    RequestResponse
    dotnet add package Sitecore.ContentHubOne.Sdk
    

    The target project must be .NET Standard 2.0 compatible. See the supported .NET implementations and version in the .NET Standard compatibility matrix.

Warning

The Content Hub ONE SDK package depends on other NuGet packages from the default NuGet feed. Make sure you have the default NuGet feed configured in addition to the public feed.

NPM

The Content Hub ONE Client SDK packages are available on the following NPM registry:

https://npm.sitecore.com/resources/

Important

To register a repository using an existing alias, update the .npmrc file located at C:\Users\[your user]\.npmrc. You can also open this file by running the command npm config edit.

To set up and install the package:

  1. Add the following package registry to your local NPM configuration:

    RequestResponse
    npm config set @sitecore:registry=https://npm.sitecore.com/resources/
    
  2. Install the package to your project by running the following command:

    RequestResponse
    npm install @sitecore/contenthub-one-sdk
    
Important

The Content Hub ONE SDK package depends on other NPM packages from the default NPM registry. Make sure you have the default NPM registry configured in addition to the public registry.

Do you have some feedback for us?

If you have suggestions for improving this article,