【问题标题】:How to add a "Add as link file" in the ProjectTemplate1.vstemplate?如何在 ProjectTemplate1.vstemplate 中添加“添加为链接文件”?
【发布时间】:2012-06-16 09:24:27
【问题描述】:

我在我的项目中的文件夹调用下添加了一个类文件 (LocalInitializer.cs) 作为“添加为链接文件”,例如“Initializer”。我将在 ProjectTemplate1.vstemplate 文件中做什么来添加它。目前的结构是

<TemplateContent>
    <Project File="ProjectTemplate.csproj" ReplaceParameters="true">      

      <ProjectItem ReplaceParameters="true" OpenInEditor="true">Initializer\GlobalInitializer.cs</ProjectItem>

    </Project>   
  </TemplateContent>

但它给出了错误

找不到文件'D:\ProjectTemplate1\ProjectTemplate1\Initializer\GlobalInitializer.cs'

我什至尝试添加

<ItemGroup>     
    <Compile Include="Initializer\GlobalInitializer.cs" />      
</ItemGroup>

进入 ProjectTemplate.csproj 但同样的错误。

知道如何解决这个问题吗?

谢谢

【问题讨论】:

    标签: .net templates vsix visual-studio-extensions


    【解决方案1】:

    我怀疑您需要查看名为“自定义向导”的方法。阅读 VSX MSDN 论坛(Visual Studio 可扩展性)上的这些主题作为起点:

    希望对你有帮助

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-03-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-09-27
      相关资源
      最近更新 更多