All Products
Search
Document Center

Alibaba Cloud SDK:Configure a dependency

Last Updated:Jan 05, 2023

This topic describes how to configure the SDK of an Alibaba Cloud service and the core library as dependencies.

Configure the Darabonba SDK of an Alibaba Cloud service as a dependency

You can configure the Darabonba SDK of Elastic Compute Service (ECS) as a dependency:

  1. Use the .NET CLI to configure the Darabonba SDK of ECS as a dependency. You can use the --version parameter to specify the version of the dependency. The following code provides examples on how to configure the Darabonba SDK of ECS as a dependency:

dotnet add package AlibabaCloud.SDK.Ecs20140526

# Specify the version.
dotnet add package AlibabaCloud.SDK.Ecs20140526 --version 2.1.0

2. Use Package Manager to configure the Darabonba SDK of ECS as a dependency. You can use the -Version parameter to specify the version of the dependency. The following code provides examples on how to configure the Darabonba SDK of ECS as a dependency:

Install-Package AlibabaCloud.SDK.Ecs20140526

# Specify the version.
Install-Package AlibabaCloud.SDK.Ecs20140526 -Version 2.1.0

The Darabonba SDK of each Alibaba Cloud service is named in the AlibabaCloud.SDK.${Service name}${API version number} format. If you want to view the information about the Darabonba SDK of each Alibaba Cloud service and other dependencies, visit SDK Center.

Make API requests without referencing the core library

The Darabonba SDK uses the main API-based logic to process parameters, send requests, and process return values. You do not need to make API requests based on the core library. In the Darabonba SDK, functions are abstracted from common methods and are encapsulated into modules. You can make API requests by installing only the SDK of an Alibaba Cloud service as a dependency. You can run the following command to download the latest modules:

dotnet add package AlibabaCloud.OpenApiClient
Important

We recommend that you use the latest core library. The latest version of the core library is an update of earlier versions and fixes vulnerabilities in the earlier versions.