Zongsoft.Externals.Wechat 7.7.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Zongsoft.Externals.Wechat --version 7.7.0
                    
NuGet\Install-Package Zongsoft.Externals.Wechat -Version 7.7.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Zongsoft.Externals.Wechat" Version="7.7.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Zongsoft.Externals.Wechat" Version="7.7.0" />
                    
Directory.Packages.props
<PackageReference Include="Zongsoft.Externals.Wechat" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Zongsoft.Externals.Wechat --version 7.7.0
                    
#r "nuget: Zongsoft.Externals.Wechat, 7.7.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Zongsoft.Externals.Wechat@7.7.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Zongsoft.Externals.Wechat&version=7.7.0
                    
Install as a Cake Addin
#tool nuget:?package=Zongsoft.Externals.Wechat&version=7.7.0
                    
Install as a Cake Tool

Zongsoft.Externals.Wechat Extension Plugin Library

License NuGet Version NuGet Downloads GitHub Stars

English | 简体中文


WeChat Third-Party Platform

Concepts

Authorization Flow

  1. Wait for the component_verify_ticket callback pushed by WeChat.
  2. Get or asynchronously refresh the platform access token component_access_token.
  3. Use the platform access token to get the pre-authorization code pre_auth_code.
  4. Generate two authorization page URLs from the pre-authorization code.
    1. Scan page: https://mp.weixin.qq.com/cgi-bin/componentloginpage?component_appid=xxxx&pre_auth_code=xxxxx&redirect_uri=xxxx&auth_type=xxx
    2. WeChat share: https://mp.weixin.qq.com/safe/bindcomponent?action=bindcomponent&no_scan=1&component_appid=xxxx&pre_auth_code=xxxxx&redirect_uri=xxxx&auth_type=xxx&biz_appid=xxxx#wechat_redirect
  5. After the user authorizes, WeChat pushes a callback. Read the authorization binding information in that callback.

    Use https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/api/authorization_info.html to obtain authorizer_appid, authorizer_access_token, and authorizer_refresh_token.

  6. Periodically refresh the authorizer access credential.

References

Tools

Plugin-Based Integration

Compose this feature through the host; a package reference supplies compile-time APIs, while plugin loading also requires deployed manifests and runtime assets. See the complete plugin workflow.

The manifest exposes the Wechat components and services. Keep account, certificate and payment settings under application-owned options. API and callback gateway plugins are optional, separate host contributions.

Runtime artifact Source of truth
Zongsoft.Externals.Wechat Zongsoft.Externals.Wechat.plugin
File copying and dependencies Zongsoft.Externals.Wechat.deploy

Add this fragment to an existing host .deploy (retain Main and the host’s other base manifests; do not replace the whole file):

[plugins zongsoft externals wechat]
nuget:Zongsoft.Externals.Wechat

Run dotnet deploy against a test deployment as explained in the workflow, with the host's framework, platform, architecture and, where needed, site. Pin compatible versions in real deployments; application dependencies such as databases, caches or commercial runtimes are still separate prerequisites.

Additional artifacts listed by the deployment manifest include Zongsoft.Externals.Wechat.plugin, Zongsoft.Externals.Wechat.option. Retain assemblies, dependencies and satellite resource directories as well. Restart the host after deployment, check plugin loading and service/driver registration, then verify the workflow above; copied files alone do not prove that the feature is active.

Publishing

Set NUGET_API_KEY and use the Release pack task. The --project option selects a project or solution. Publish the main package first, wait until it is available from NuGet, and then publish the API and gateway packages that reference it:

dotnet cake build.cake --target=pack --edition=Release --project=src/Zongsoft.Externals.Wechat.csproj
dotnet cake build.cake --target=pack --edition=Release --project=api/Zongsoft.Externals.Wechat.Web.csproj
dotnet cake build.cake --target=pack --edition=Release --project=gateway/Zongsoft.Externals.Wechat.Gateway.csproj

Without --project, the task builds the complete solution.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Zongsoft.Externals.Wechat:

Package Downloads
Zongsoft.Externals.Wechat.Web

This is a web api library about Wechat.

Zongsoft.Externals.Wechat.Gateway

This is a library about Wechat Gateway.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
8.0.0 117 11/15/2026
7.11.0 137 11/8/2026
7.10.0 170 10/23/2026
7.8.0 142 10/22/2026
7.7.0 114 10/20/2026
7.6.0 151 10/10/2026
7.5.0 221 2/11/2026
7.4.0 216 1/11/2026
7.2.0 308 6/27/2025
7.1.0 594 4/14/2025
7.0.0 459 2/24/2025