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
- Download Content Moderation SDK for .NET.
- 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- 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" />
- Run the following command to install the SDK:
dotnet build
- Add the following code to the .csproj file:
- Install the SDK by using the .NET Core command line interface (CLI)