This topic describes how to configure both the SDK of an Alibaba Cloud service and the core library as dependencies.
Configure the Classic SDK of an Alibaba Cloud service as a dependency
For example, you can configure the Classic SDK of Elastic Compute Service (ECS) as a dependency.
Use the .NET CLI to configure the Classic 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 Classic SDK of ECS as a dependency:
dotnet add package aliyun-net-sdk-ecs
# Specify the version of the dependency.
dotnet add package aliyun-net-sdk-ecs --version 4.24.4
2. Use Package Manager to configure the Classic 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 Classic SDK of ECS as a dependency:
Install-Package aliyun-net-sdk-ecs
# Specify the version of the dependency.
Install-Package aliyun-net-sdk-ecs -Version 4.24.4
The Classic SDK of each Alibaba Cloud service is named in the aliyun-java-sdk-${Service name}
format. If you want to view the information about the Classic SDK of each Alibaba Cloud service and how to configure a dependency by using other methods, visit SDK Center.
Configure the core library as a dependency
The Classic SDK of each Alibaba Cloud service contains information such as the request and response objects in the API and the unmarshaller object that can be used to serialize the return value. You must also configure the core library as a dependency. The core library contains the logic for HTTP-based API calls, authentication information, signature algorithms, and exception handling. We recommend that you configure the core library as a Maven dependency. The following code provides an example on how to configure the core library:
dotnet add package aliyun-net-sdk-core
We recommend that you use the latest core library. The latest version of the core library is an update of previous versions and fixes vulnerabilities in the previous versions.