Install the .NET Core SDK
Install the Simple Log Service SDK for .NET Core to manage logs from your .NET applications.
Prerequisites
-
Simple Log Service is activated.
-
An AccessKey pair is created and obtained. AccessKey pair.
An Alibaba Cloud account AccessKey pair has full API permissions and poses a high security risk. Use a Resource Access Management (RAM) user with only the required SLS permissions to make API calls or perform routine O&M. Create and authorize a RAM user.
-
The .NET Core SDK and Visual Studio are installed. Microsoft .NET Core Download, Visual Studio.
Supported platforms
The SDK supports these platforms:
-
.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
Required packages:
|
Feature |
Dependency |
|
Http |
|
|
Json |
|
|
Protobuf |
|
|
Zlib |
|
|
Lz4 |
Installation
Install using the CLI
Use the .NET CLI (Install .NET) to install the SDK from NuGet. Run this command in your project root:
dotnet add package aliyun-log-dotnetcore-sdk
Install from source code
You can import the SDK source code into your project. These steps use Visual Studio 2019.
-
Extract the aliyun-log-dotnetcore-sdk-master.zip package.
-
Open the aliyun-log-dotnetcore-sdk-master\Aliyun.Api.LogService.Examples\Aliyun.Api.LogService.Examples.csproj file in Visual Studio 2019 and build the project.