2

我想知道在为新项目类型制作 MonoDevelop 插件时如何将“复制到输出目录”选项设置为“如果更新则复制”?

以这段代码为例,......我需要添加什么才能在构建时将“manifest.json”复制到输出目录?

<?xml version="1.0"?>
<Template originator = "Andrew Witte">

    <TemplateConfiguration>
        <_Name>MonoNaCl Project</_Name>
        <_Category>C#/MonoNaCl</_Category>
        <LanguageName>C#</LanguageName>
        <_Description>Creates a MonoNaCl project.</_Description>
    </TemplateConfiguration>

    <!-- Actions -->
    <Actions>
        <Open filename = "Internal.c"/>
        <Open filename = "Main.cs"/>
    </Actions>

    <Combine name = "${ProjectName}" directory = ".">
        <Options>
            <StartupProject>${ProjectName}</StartupProject>
        </Options>
        <References>
            <Reference type="Gac" refto="System" />
        </References>
        <Project name = "${ProjectName}" directory = "." type = "MonoNaCl">
            <Options Target = "Exe"/>
            <Files>
<File name="manifest.json">
<![CDATA[{
"name": "MonoNaCl",
  "description": "Mono for NaCl project.",
  "version": "1.0.0",
  "icons": {
  },
  "requirements": {
    "3D": {
      "features": ["css3d", "webgl"]
    }
  },
  "app": {
    "launch": {
      "local_path": "${ProjectName}.html"
    }
}
}
]]></File>
</Files>
        </Project>
    </Combine>
</Template>
4

1 回答 1

1

如果不修改核心为此添加属性或注册自定义模板类型,目前是不可能的。

但是,TBH 而不是复制到输出,我将使用自定义构建操作和构建扩展,该构建扩展将使用该构建操作复制文件。

于 2012-11-06T21:55:22.633 回答