VS2017中的导出项目模板缺少源文件 [英] Exported project template in VS2017 misses source files

查看:182
本文介绍了VS2017中的导出项目模板缺少源文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用 Project->时,在Visual Studio 2017中使用导出模板选项,生成的ZIP文件包括主项目文件,但不包括任何 *。cpp 和<$ c我添加的$ c> *。hpp 文件。如何在模板中包含所有内容?我还应该注意,这种行为似乎在某个时刻的更新中已更改。

When I use the Project -> Export template option in Visual Studio 2017, the resulting ZIP file includes the main project files, but not any of the *.cpp and *.hpp files that I've added. How do I include everything with the template? I should also note that this behavior seems to have changed in an update at some point.

推荐答案

您需要手动编辑 .vstemplate 文件,并在< TemplateData> < CreateInPlace> true< / CreateInPlace> c>标签,因此它看起来像这样:

You need to manually edit the .vstemplate file and add <CreateInPlace>true</CreateInPlace> in the <TemplateData> tag so it looks like this:

<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Project">
    <TemplateData>
        <Name>TemplateTest</Name>
        <Description><No description available></Description>
        <ProjectType>JavaScript</ProjectType>
        <ProjectSubType>
        </ProjectSubType>
        <SortOrder>1000</SortOrder>
        <CreateNewFolder>true</CreateNewFolder>
        <CreateInPlace>true</CreateInPlace>
        <DefaultName>CodovaTemplateTest</DefaultName>
        <ProvideDefaultName>true</ProvideDefaultName>
        <LocationField>Enabled</LocationField>
        <EnableLocationBrowseButton>true</EnableLocationBrowseButton>
        <Icon>__TemplateIcon.ico</Icon>
  </TemplateData>

这篇关于VS2017中的导出项目模板缺少源文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆