Before you use Content Moderation SDK for .NET, you must install the required dependencies.

Prerequisites

  • .NET Framework 4.5 or later is installed.
  • .NET Standard 2.0 or later is installed.
  • C# 4.0 or later is installed.

Install the SDK

  1. Download Content Moderation SDK for .NET.
  2. Install Content Moderation SDK for .NET.
    • Install the SDK by using the .NET Core command line interface (CLI)
      Note To install the SDK of a specified version, you must add --version <Version number> to the command. Example: dotnet add package aliyun-net-sdk-core --version 1.0.0. If you do not specify the version number of Content Moderation SDK for .NET, the latest version of the SDK is installed.
      dotnet add package aliyun-net-sdk-core
      dotnet add package aliyun-net-sdk-green
    • Install the SDK by running the dotnet build command
      1. Add the following code to the .csproj file:
        <PackageReference Include="aliyun-net-sdk-core" Version="1.5.10" />
        <PackageReference Include="aliyun-net-sdk-green" Version="3.6.5" />
      2. Run the following command to install the SDK:
        dotnet build