翁布拉科&TFS - 包括隐藏文件 [英] Umbraco & TFS - Including hidden files

查看:23
本文介绍了翁布拉科&TFS - 包括隐藏文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 VS2012 中设置了一个 umbraco 6.* 站点,并且正在使用 TFS 进行源代码控制.

如果我通过 umbraco 后端向 umbraco 站点添加模板、媒体项目等,新文件不会自动包含在解决方案中,我必须手动包含这些文件,以便将它们签入源代码管理.

在安装软件包等或在不同文件夹位置创建大量文件的任何内容时,这可能会很快变得无法管理.

有没有人有办法保证所有文件都被签入源代码控制?

更改源代码管理不是一种选择.

谢谢

解决方案

我遇到了 这篇文章 解释了如何在 .csproj 文件中一揽子"包含文件或文件夹.简而言之,您可以添加以下引用:

因此,对于 Umbraco,您首先需要从项目中排除以下文件夹:

  • /umbraco
  • /umbraco_client
  • /媒体
  • /masterpages
  • /视图
  • /宏脚本
  • /xslt

然后在测试编辑器中打开 .csproj 文件并添加:

<Content Include="umbraco_client\**"/><Content Include="media\**"/><Content Include="masterpages\**"/><Content Include="views\**"/><Content Include="宏脚本\**"/><Content Include="xslt\**"/>

保存它,然后在 VS 中重新加载您的项目.

I have an umbraco 6.* site set up in VS2012 and am using TFS for source control.

If I add templates, media items etc to the umbraco site through the umbraco backend the new files are not automatically included in the solution and I have to manually include the files so that they can be checked in to source control.

This can become quickly unmanageable when installing packages etc. or anything that creates a lot of files throughout different folder locations.

Does anyone have a solution to guarantee all files are checked into source control?

Changing source control is not an option.

Thanks

解决方案

I came across this article which explains how to 'blanket' include files or folders in a .csproj file. In a nutshell you can add the following references:

<Content Include="Path\To\Folder\**" />
<Content Include="Path\To\Folder\*.*" />
<Content Include="Path\To\Folder\*.jpg" >

So in the case of Umbraco you will first need to exclude the following folders from the project:

  • /umbraco
  • /umbraco_client
  • /media
  • /masterpages
  • /views
  • /macroscripts
  • /xslt

then open up the .csproj file in a test editor and add:

<Content Include="umbraco\**" />
<Content Include="umbraco_client\**" />
<Content Include="media\**" />
<Content Include="masterpages\**" />
<Content Include="views\**" />
<Content Include="macroscripts\**" />
<Content Include="xslt\**" />

Save it, and then in VS reload your project.

这篇关于翁布拉科&amp;TFS - 包括隐藏文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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