Before you use SDK for C# to send and subscribe to messages, you must prepare the environment by following the instructions provided in this topic.

Environment requirements

After .NET is installed, you can run the dotnet --version command to check the version of NET.

Install SDK for C#

Perform the following steps to install SDK for C#:
  1. Download SDK for C# and the project file to your on-premises machine and decompress them. Aliyun_MQ_SDK is the directory where the SDK is located. Aliyun_MQ_SDK.sln is the project file.
  2. Use Visual Studio to open the Aliyun_MQ_SDK.sln file and import it to the Aliyun_MQ_SDK project.
  3. Execute the Samples.cs file. In the Aliyun_MQ_SDK project, the Samples.cs file appears. This file provides the sample code about how to send and subscribe to messages by using SDK for C#. Replace the example values in the code with the values used in your application. Then, save the file and execute it.