Skip to content

Tool.Config.props文件

依赖本项目之后,会在生成过程中生成一份Tool.Config.props文件到你的项目目录中

该文件示例如下:

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>false</IsPlugin>
        <!-- Whether the current project is a built-in Plugin -->
        <BuiltIn>false</BuiltIn>
        <!-- Auto Pack Plugin When IsPlugin == True-->
        <AutoPluginPackage>true</AutoPluginPackage>
        <!-- Auto Generate I18N -->
        <AutoGenerateI18N>true</AutoGenerateI18N>
    </PropertyGroup>
</Project>
名称类型说明
IsPluginLoaderbool该项目是否是插件加载器项目,详见IsPluginLoader
IsPluginbool该项目是否是插件项目,详见IsPlugin
BuiltInbool该项目是否是内置插件项目,详见BuiltInPlugin
AutoPluginPackagebool是否自动打包为插件(仅在IsPlugintrue时有效),详见插件打包
AutoGenerateI18Nbool是否自动生成I18N帮助类,详见I18N国际化

注意

IsPluginLoaderIsPlugin只能有一个为true

IsPluginLoader

IsPluginLoader指明该项目是否是插件加载器项目

如果为true:

IsPlugin

IsPlugin指明该项目是否是插件项目

如果为true:

  • .csproj文件中自动生成出plugin.json
  • 允许使用插件打包功能

BuiltInPlugin

BuiltIn指明该项目是否是内置插件项目

内置插件:

  • 直接以项目依赖,一同打包进主项目中的插件