Before you can use the .NET Core SDK to perform operations in Simple Log Service, you must install the SDK. This topic describes how to install the .NET Core SDK.
Prerequisites
Simple Log Service is activated. For more information, see .
An AccessKey pair is created and obtained. For more information, see AccessKey pair.
Using the AccessKey pair of an Alibaba Cloud account poses a high security risk because it grants full permissions for all API operations. We recommend that you create and use a Resource Access Management (RAM) user to make API calls or perform routine O&M. The RAM user must have the required permissions to manage Simple Log Service resources. For more information, see Create and authorize a RAM user.
The .NET Core SDK and the Visual Studio development environment are installed. For more information, see Microsoft .NET Core Download and Visual Studio.
Supported platforms
The .NET Core SDK for Simple Log Service supports the following platforms and versions:
.NET Core 2.0
.NET Framework (with .NET Core 1.x SDK) 4.6.2
.NET Framework (with .NET Core 2.0 SDK) 4.6.1
Mono 5.4
Xamarin.iOS 10.14
Xamarin.Mac 3.8
Xamarin.Android 8.0
Universal Windows Platform 10.0.16299
Dependencies
The .NET Core SDK for Simple Log Service has the following dependencies. You must install the required packages.
Feature | Dependency |
Http | |
Json | |
Protobuf | |
Zlib | |
Lz4 |
Install the .NET Core SDK
Install using the CLI
You can install dependencies from NuGet using the .NET command-line interface (CLI) tool (Install .NET). In the root directory of your project, run the following command to install the aliyun-log-dotnetcore-sdk dependency.
dotnet add package aliyun-log-dotnetcore-sdkInstall from source code
You can install the .NET Core SDK by importing it into a project. The following steps use Visual Studio 2019 as an example.
Decompress the aliyun-log-dotnetcore-sdk-master.zip package to a directory.
Use Visual Studio 2019 to open the aliyun-log-dotnetcore-sdk-master\Aliyun.Api.LogService.Examples\Aliyun.Api.LogService.Examples.csproj file. Then, build the project.