Installation

Last Updated: Jun 05, 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, refer to Change Log

Installation in Windows

Install the SDK through NuGet

  • If your Visual Studio does not have NuGet installed, first install NuGet.
  • 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.
  • 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

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

Install the SDK through DLL reference

  • Download the SDK package aliyun_oss_dotnet_sdk_2_5_0.zip. Unzip the package and you will find the Aliyun.OSS.dll file in the bin directory.
  • 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

  • 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.
  • In the pop-up dialog box, select the aliyun-oss-sdk.csproj file, and click Open.
  • 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

  • In Xamarin, create a project or open an existing project, and select Tool > Add NuGet Packages.
  • 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

  • If you have not installed Git, first install Git.
  • Git clone
  • 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

  • Download the SDK package aliyun_oss_dotnet_sdk_2_5_0.zip. Unzip the package and you will find the Aliyun.OSS.dll file in the bin directory.
  • 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 Example content
PutObjectSample.cs Demonstrate Object Uploading usage
AppendObjectSample.cs Demonstrate Append Upload usage
DoesObjectExistSample.cs Demonstrate Identify Whether the Object Exists usage
DeleteObjectsSample.cs Demonstrate Object Deleting usage
CopyObjectSample.cs Demonstrate Object Copy usage
ModifyObjectMetaSample.cs Demonstrate modifying Object Meta usage
MultipartUploadSample.cs Demonstrate Multipart Upload usage
ResumableSample.cs Demonstrate Resumable Upload usage
GetObjectSample.cs Demonstrate Object Downloading usage
GetObjectByRangeSample.cs Demonstrate Object Downloading by Range usage
GetObjectAclSample.cs Demonstrate obtaining Object ACL usage
SetObjectAclSample.cs Demonstrate setting Object ACL usage
ListObjectsSample.cs Demonstrate List Objects usage
UrlSignatureSample.cs Demonstrate Authorized Access usage
UploadCallbackSample.cs Demonstrate Upload Callback usage
ProgressSample.cs Demonstrate upload/download progress bars usage
CNameSample.cs Demonstrate the usage of CNAME to access the OSS
PostPolicySample.cs Demonstrate PostObject usage
CreateBucketSample.cs Demonstrate Create Bucket usage
DeleteBucketSample.cs Demonstrate Delete Bucket usage
DoesBucketExistSample.cs Demonstrate Identify Whether the Bucket Exists usage
ListBucketsSample.cs Demonstrate List Buckets usage
SetBucketAclSample.cs Demonstrate setting bucket ACL
SetBucketLifecycleSample.cs Demonstrate setting a bucket’s object Lifecycle
SetBucketLoggingSample.cs Demonstrate setting a bucket’s Access Logs
SetBucketRefererSample.cs Demonstrate setting a bucket’s Anti-leech
SetBucketWetbsiteSample.cs Demonstrate setting a bucket’s Static Website Hosting
SetBucketCorsSample.cs Demonstrate setting a bucket’s CORS
ImageProcessSample.cs Demonstrate Image Processing
Thank you! We've received your feedback.