Installation

Last Updated: Oct 10, 2017

Version dependency

Windows

  • Applicable to .NET 2.0 and later.
  • Applicable to Visual Studio 2010 and later.

Linux/Mac

Applicable to Mono 3.12 and later.

Version iterations

For details about version iterations, see Change Log.

Installation in Windows

Install the SDK through NuGet

  1. If your Visual Studio does not have NuGet installed, first install NuGet.
  2. After NuGet is installed, access Visual Studio to create a project or open an existing project, and then select Tool > NuGet Package Manager > Management Solution NuGet Package.
  3. Type aliyun.oss.sdk in the search box and click Search, find Aliyun.OSS.SDK in the search results, select the latest version, and click Install. After installation, the SDK is added to the project.

Install the SDK through GitHub

  1. If your Visual Studio does not have GitHub installed, first install GitHub.
  2. GitHub clone.
  3. After the source code is downloaded, install the SDK via project introduction.

Install the SDK through DLL reference

  1. Download the SDK package aliyun_oss_dotnet_sdk_2_5_3.zip. Unzip the package and you will find the Aliyun.OSS.dll file in the bin directory.
  2. In the Visual Studio, access Solution Resource Manager, select your project, right click Project Name, select Reference > Add Reference from the pop-up menu. In the Add Reference dialog box, click Browse. Find the directory that the SDK is unzipped to, select the Aliyun.OSS.dll file in the bin directory, and click OK.

Install the SDK through project introduction

  1. If you have downloaded the SDK package or the source code from GitHub and you want to install the SDK package using the source code, you can right click Solution and select Add > Existing Projects from the pop=up menu.
  2. In the pop-up dialog box, select the aliyun-oss-sdk.csproj file, and click Open.
  3. Right click Your Projects and select Reference > Add Reference. In the Add Reference dialog box, click the Project tab, select the aliyun-oss-sdk project, and click OK.

Installation in Unix/Mac

Install the SDK through NuGet

  1. In Xamarin, create a project or open an existing project, and select Tool > Add NuGet Packages.
  2. Type aliyun.oss.sdk in the search box and click Search, find Aliyun.OSS.SDK in the search results, select the latest version, and click Add Package. After installation, the SDK is added to the project.

Install the SDK through GitHub

  1. If you have not installed Git, first install Git.
  2. Git clone
  3. After the source code is downloaded, open it in Xamarin. Compile the aliyun-oss-sdk project in Release mode to generate the Aliyun.OSS.dll file. Then install the SDK through DLL reference.

Install the SDK through DLL reference

  1. Download the SDK package aliyun_oss_dotnet_sdk_2_5_3.zip. Unzip the package and you will find the Aliyun.OSS.dll file in the bin directory.
  2. In the Xamarin, access Solution, select your project, right click Project Name, select Reference > Edit References from the pop-up menu. In the Edit References dialog box, click .Net Assembly > Browse. Find the directory that the SDK is unzipped to, select the Aliyun.OSS.dll file in the bin directory, and click Open.

Example project

OSS C# SDK provides rich example projects for your reference or use. You can get example projects from GitHub.

The example project includes the following content:

Example file Description
PutObjectSample.cs Demonstrates Object Uploading usage.
AppendObjectSample.cs Demonstrates Append Upload usage.
DoesObjectExistSample.cs Demonstrates Identify Whether the Object Exists usage.
DeleteObjectsSample.cs Demonstrates Object Deleting usage.
CopyObjectSample.cs Demonstrates Object Copy usage.
ModifyObjectMetaSample.cs Demonstrates modifying Object Meta usage.
MultipartUploadSample.cs Demonstrates Multipart Upload usage.
ResumableSample.cs Demonstrates Resumable Upload usage.
GetObjectSample.cs Demonstrates Object Downloading usage.
GetObjectByRangeSample.cs Demonstrates Object Downloading by Range usage.
GetObjectAclSample.cs Demonstrates obtaining Object ACL usage.
SetObjectAclSample.cs Demonstrates setting Object ACL usage.
ListObjectsSample.cs Demonstrates List Objects usage.
UrlSignatureSample.cs Demonstrates Authorized Access usage.
UploadCallbackSample.cs Demonstrates Upload Callback usage.
ProgressSample.cs Demonstrates upload/download progress bars usage.
CNameSample.cs Demonstrates the usage of CNAME to access the OSS.
PostPolicySample.cs Demonstrates PostObject usage.
CreateBucketSample.cs Demonstrates Create Bucket usage.
DeleteBucketSample.cs Demonstrates Delete Bucket usage.
DoesBucketExistSample.cs Demonstrates Identify Whether the Bucket Exists usage.
ListBucketsSample.cs Demonstrates List Buckets usage.
SetBucketAclSample.cs Demonstrates setting bucket ACL.
SetBucketLifecycleSample.cs Demonstrates setting a bucket’s object Lifecycle.
SetBucketLoggingSample.cs Demonstrates setting a bucket’s Access Logs.
SetBucketRefererSample.cs Demonstrates setting a bucket’s Anti-leech.
SetBucketWetbsiteSample.cs Demonstrates setting a bucket’s Static Website Hosting.
SetBucketCorsSample.cs Demonstrates setting a bucket’s CORS.
ImageProcessSample.cs Demonstrates Image Processing.
Thank you! We've received your feedback.