Skip to content

插件打包

前置要求

Tool.Config.propsIsPluginAutoPluginPackage设置为true

xml
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <PropertyGroup>
        <!-- Whether the current project is a PluginLoader -->
        <IsPluginLoader>false</IsPluginLoader>
        <!-- Whether the current project is a Plugin -->
        <IsPlugin>true</IsPlugin>
        <!-- Auto Pack Plugin -->
        <AutoPluginPackage>true</AutoPluginPackage>
        <!-- Auto Generate I18N -->
        <AutoGenerateI18N>true</AutoGenerateI18N>
    </PropertyGroup>
</Project>

打包

在生成结束后会自动打包为zip文件

默认路径为:$(ProjectDir)Packages(项目文件夹的Packages文件夹内)

说明

如果要修改默认配置,请查阅: 自定义打包

排除文件

有些不需要的文件我们不想打包进zip文件中

在项目文件夹新建文件Plugin.Build.exclude

例如:

txt
/Fluent/*
/hello.*

仅能使用

  • ? 通配一个字符
  • * 通配多个字符

这样Fluent文件夹和名为hello的文件都不会被打包