# How to install?
You can either directly reference the Senparc.Weixin source code for development, or you can reference the packaged dlls (via Nuget packages, recommended) to get official updates at any time. Note: You can only use either the source code or the Nuget package.
# Referencing the source code
You can reference (copy) the assemblies you need to reference in the current solution, under the Libraries directory, to the solution of your development environment, please note that you need to reference the dependent projects at the same time, e.g., Senparc.Weixin
is a project that all projects need to depend on.
The current example project uses a direct reference to the source code by default, which can be seen in the .csproj file:
<ItemGroup>
<ProjectReference Include="..\..\..\src\Senparc.Weixin.MP.Middleware\Senparc.Weixin.MP.Middleware.net6.csproj" />
<ProjectReference Include="..\..\..\src\Senparc.Weixin.MP.MvcExtension\Senparc.Weixin.MP.MvcExtension\Senparc.Weixin.MP.MvcExtension.net6.csproj" />
<ProjectReference Include="..\..\..\src\Senparc.Weixin.MP\Senparc.Weixin.MP\Senparc.Weixin.MP.net6.csproj" />
</ItemGroup>
# Referencing assemblies (recommended)
You can install Nuget packages automatically through Visual Studio
, Visual Studio Code
, dotnet command line
, and many other ways.
# Visual Studio
In the development project [Solution Explorer], right click on the module where you need to add Senparc.Weixin.MP
, click [Manage Nuget Packages], enter Senparc.Weixin.MP in the [Browse] tab, and click the [Install] button on the right side. MP, and then click the [Install] button on the right side:
# Visual Studio Code
First of all, make sure that you have installed VS Code (opens new window) and the dotnet command line (it will be installed automatically after installing the .NET SDK (opens new window)).
Then, open the solution or project directory and press Ctrl+~ to open the Terminal panel:
Go to the directory of the project where you need to add the module Senparc.Weixin.MP and type:
dotnet add package Senparc.Weixin.MP
To install the Senparc.Weixin.MP module
After the installation is complete, you can see the corresponding .csproj file, being added references such as:
<ItemGroup>
<PackageReference Include="Senparc.Weixin.MP" Version="16.17.7" />
</ItemGroup>
# dotnet command line
First of all, make sure that you have installed the dotnet command line (it will be installed automatically after installing the .NET SDK (opens new window)).
Go to the directory of the project where you want to add the module Senparc.Weixin.MP and enter:
dotnet add package Senparc.Weixin.MP
After the installation is complete, you can view the corresponding .csproj file that was added to the reference, for example:
<ItemGroup>
<PackageReference Include="Senparc.Weixin.MP" Version="16.17.7" />
</ItemGroup>