问题描述
我的问题与此有关: Visual Studio 2013待更改项不包括新添加的项
我有一个已经签入的csproj文件.现在有人向项目中添加了一些新文件,例如类文件或某些资源文件.由于我正在与TFS断开连接,因此直到我转到源代码管理并添加文件后,才将新添加的文件检测为更改.
I have one csproj file that is already checked in. Now somebody add some new file to project like class file or some resource file. As I am working in disconnected to TFS newly added file is not detected as change until I go to source control and add file.
问题是有人签入了CSProj文件而没有新文件,因此在构建服务器上它失败了,因为他/她由于未自动检测到而忘记添加新添加的文件.
Problem is somebody check-in the CSProj file without new file so at build server it get failed because he/she forgot to add newly added file because it is not detected automatically.
有什么方法可以在CSProj文件签入之前检查其完整性,从而使构建不会因此而失败?
Is there any way we can check integrity of CSProj file before it get check-in so build will not get failed for this reason ?
注意:我想要一种没有任何自定义开发(例如Policy或类似工具)的方法.
Note : I want a way without any custom development like Policy or something.
推荐答案
TFS在签入之前无法检查CSProj文件的完整性.您可以使用门控-签入构建.当您进行检查时,此构建定义将运行.如果此构建成功,它将检入代码;如果失败,则将不检入您的代码.这会提醒您并强制您添加那些缺少的类文件.
TFS can't check integrity of CSProj file before it gets check-in. You could use a Gate-check in build. When you do a check, this build definition will run. If this build succees, it will check in code, if it failes, it won't check in your code. This will give you a remind and force to your add those missing class files.
这篇关于在没有自定义开发的情况下提交之前,先找到CSProj中的更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!