当存储库需要在签入之前进行代码分析时,如何使用 git-tfs?
我正在使用 git-tfs,并尝试使用 git tfs checkintool 将我的 Git 更改提交到 TFS。它会打开 TFS 提交窗口,我填写我的提交注释并关联我的工作项;但是当我单击“确定”时,它会显示“策略失败 - 签入无法继续,因为尚未满足策略要求”对话框。以下是政策警告的说明:
代码分析中出现内部错误。无法加载文件或程序集“Microsoft.VisualStudio.CodeAnalysis.Sdk.UI,Version=10.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a”或其依赖项之一。系统找不到指定的文件。
屏幕截图:
毫不奇怪,无论我是否“,它都会给出相同的 DLL-not-found 错误”我们已经在 Visual Studio 中构建并运行代码分析。
我在 C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies 中找到了 Microsoft.VisualStudio.CodeAnalysis.Sdk.UI.dll,只是为了好玩,我尝试暂时将该目录添加到我的 PATH 中(从命令行:set path=%path%;C:\Program Files\...
),然后再次运行git tfs checkintool
。但当我单击“确定”时,它再次出现相同的错误。
我可以覆盖策略失败并提交,但我不想每次签入时都这样做。我也可以完全禁用代码分析策略,但这似乎没有道理。
有没有办法让 git tfs checkintool 能够找到这个 DLL,以便它可以成功提交?
I'm using git-tfs, and trying to use git tfs checkintool
to commit my Git changes to TFS. It brings up the TFS commit window, and I fill in my commit comment and associate my work items; but when I click OK, it gives me the "Policy Failure - Checkin cannot proceed because the policy requirements have not been satisfied" dialog. Here's the description of the policy warning:
Internal error in Code Analysis. Could not load file or assembly 'Microsoft.VisualStudio.CodeAnalysis.Sdk.UI, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Screenshot:
Not surprisingly, it gives this same DLL-not-found error regardless of whether or not I've already built and run code analysis in Visual Studio.
I found Microsoft.VisualStudio.CodeAnalysis.Sdk.UI.dll in C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies, and just for fun, I tried temporarily adding that directory to my PATH (from the command line: set path=%path%;C:\Program Files\...
) and then running git tfs checkintool
again. But it just gave the same error again when I clicked OK.
I can override the policy failure and commit, but I'd rather not do that every time I check in. I could also disable the code analysis policy entirely, but that hardly seems justified.
Is there a way I can make git tfs checkintool
able to find this DLL so it can commit successfully?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来同样的问题已在 github 的 git-tfs 网站上作为问题提交,并在那里进行了一些进一步的研究,但仍然没有最终解决方案:
https://github.com/git-tfs/git-tfs/issues/82
这似乎是 TFS 中的一个错误。
Looks like the same question was filed as an issue on the git-tfs site in github and got some further research there, but still no final resolution:
https://github.com/git-tfs/git-tfs/issues/82
It appears to be a bug in TFS.