将项目从自定义模板添加到VS不会将其添加到TFS [英] Adding project from custom template to VS does not add it to TFS

查看:187
本文介绍了将项目从自定义模板添加到VS不会将其添加到TFS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用VS 2015社区版,我通过导出解决方案中的现有项目来创建自定义模板.

Using VS 2015 community edition, I created a custom template by exporting an existing project in my solution.

我使用自定义模板将新项目添加到解决方案中.该解决方案受TFS的源代码控制.

I used the custom template to add a new project to my solution. The solution is under source control in TFS.

添加后,解决方案在TFS中进行了修改,以反映出添加新项目后所做的更改,但是新项目的实际文件夹未添加到TFS中.

After the adding, the solution is modified in TFS, reflecting the changes adding the new project, but the actual folder of the new project is not added to the TFS.

作为一种解决方法,我当然可以将新项目的文件夹手动添加到TFS,但是我希望它会自动添加.

As a workaround, I can of course add the folder of the new project to the TFS manually, but I would expect it to be added automatically.

这里有问题吗?

推荐答案

您可以修改导出的项目模板,否则新添加的项目将被视为已在源代码管理中.

You can modify the exported project template, otherwise the new added project will be considered already in source control.

请按照以下步骤修改模板:

Please follow below steps to modify the template:

  1. 提取模板"* .zip"文件
  2. 使用记事本编辑项目文件(例如: *.csproj ),删除源控制部分,例如<SccProjectName>SAK</SccProjectName>
  3. 保存项目文件,选择所有文件并压缩为新的模板zip文件
  4. 将包含模板的zip复制到该 ProjecTemplates 文件夹.(用户文件夹\ Documents \ Visual Studio 2015 \ Templates \ ProjectTemplates.)
  1. Extract the template ‘*.zip‘ file
  2. Edit the project file (eg: *.csproj) with notepad, delete the source control section such as <SccProjectName>SAK</SccProjectName>
  3. Save the project file , select all the files and compress to a new template zip file
  4. Copy the zip containing the template to that ProjecTemplates folder.(User folder\Documents\Visual Studio 2015\Templates\ProjectTemplates.)

另一种方法是在将解决方案添加到源代码管理之前导出项目模板.

Another way is exporting the project template before adding the solution to source control.

这篇关于将项目从自定义模板添加到VS不会将其添加到TFS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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