PlugBotSharp.MetaGen 0.0.2

dotnet add package PlugBotSharp.MetaGen --version 0.0.2
                    
NuGet\Install-Package PlugBotSharp.MetaGen -Version 0.0.2
                    
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="PlugBotSharp.MetaGen" Version="0.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PlugBotSharp.MetaGen" Version="0.0.2" />
                    
Directory.Packages.props
<PackageReference Include="PlugBotSharp.MetaGen" />
                    
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 PlugBotSharp.MetaGen --version 0.0.2
                    
#r "nuget: PlugBotSharp.MetaGen, 0.0.2"
                    
#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 PlugBotSharp.MetaGen@0.0.2
                    
#: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=PlugBotSharp.MetaGen&version=0.0.2
                    
Install as a Cake Addin
#tool nuget:?package=PlugBotSharp.MetaGen&version=0.0.2
                    
Install as a Cake Tool

PlugBotSharp.MetaGen

PlugBotSharp 组件构建工具包:构建组件工程时自动读取 Meta.cs,生成 Meta.json,再把清单和 Dlls 里声明的文件打成一个组件 zip。

安装

dotnet add package PlugBotSharp.MetaGen --version 1.0.0

包里的 build / buildTransitive targets 会自动导入,组件工程不需要手写 Import。

组件工程

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net10.0</TargetFramework>
    <AssemblyName>DemoPlugin</AssemblyName>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="PlugBotSharp.Api" Version="1.0.0" />
    <PackageReference Include="PlugBotSharp.MetaGen" Version="1.0.0" />
  </ItemGroup>
</Project>

Meta.cs:

public static class Meta
{
    public static MetaObj Info = new()
    {
        Name = "Demo",
        Id = "demo",
        Version = "1.0.0",
        Type = ComponentType.Plugin,
        Dlls = ["DemoPlugin.dll"],
        Deps = []
    };
}

构建后输出:

bin/Debug/net10.0/Meta.json
bin/Debug/net10.0/DemoPlugin.zip   # Meta.json + dll + pdb

配置

MSBuild 属性 默认 说明
ComponentMeta Meta.cs 清单源文件
ComponentManifestName Meta.json 包内清单名
MetaGenTool 包内 tools/net10.0 生成器 dll 路径,仓库内构建时可覆盖
ComponentPackageName $(AssemblyName).zip 组件包文件名
ComponentPackagePath $(TargetDir)名称 组件包输出路径

命令行

dotnet tools/net10.0/PlugBotSharp.MetaGen.dll --assembly DemoPlugin.dll --output Meta.json

参数:--assembly、--output、--type(默认 Meta)、--field(默认 Info)。

许可

MIT,见仓库根目录 LICENSE-MIT。

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.2 56 12/3/2026