Exported project template in VS2017 misses source files(VS2017中导出的项目模板遗漏源文件)
问题描述
当我使用 Project ->Visual Studio 2017 中的导出模板 选项,生成的 ZIP 文件包括主要项目文件,但不包括任何 *.cpp 和 *.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文件并添加<CreateInPlace>true</CreateInPlace> 在 <TemplateData> 标记中,所以它看起来像这样:
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中导出的项目模板遗漏源文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:VS2017中导出的项目模板遗漏源文件
基础教程推荐
- 为什么 typeid.name() 使用 GCC 返回奇怪的字符以及如 2022-09-16
- 如果我为无符号变量分配负值会发生什么? 2022-01-01
- 初始化列表*参数*评估顺序 2021-01-01
- 非静态 const 成员,不能使用默认赋值运算符 2022-10-09
- 为什么派生模板类不能访问基模板类的标识符? 2021-01-01
- 我应该对 C++ 中的成员变量和函数参数使用相同的名称吗? 2021-01-01
- CString 到 char* 2021-01-01
- 为什么 RegOpenKeyEx() 在 Vista 64 位上返回错误代码 2021-01-01
- 通过引用传递 C++ 迭代器有什么问题? 2022-01-01
- GDB 显示调用堆栈上函数地址的当前编译二进制文 2022-09-05
