使用“devenv”和“devenv”有什么区别?和“msbuild”在 CruiseControl.NET 构建中?
使用
我知道它们调用不同的可执行文件,但有时我会得到不同的结果(就编译时的通过/失败而言),我想知道为什么两个构建命令之间存在差异。
What is the main difference between using the <devenv> tag and the <msbuild> tag is in CruiseControl.NET?
I understand they call different executables, but sometimes I get different results (as far as pass/fail at compile time), and I would like to know why there is a difference between the two build commands.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
基本上 devenv (Visual Studio) 包装了 MSBuild 并添加了许多 Visual Studio 特定的属性。
要使用 devenv,您需要在计算机上安装 Visual Studio。要使用 MSBuild,您只需要拥有 .NET 框架。
Basically devenv (Visual Studio) wraps MSBuild and add lots of Visual Studio specific properties.
To use devenv you need Visual Studio installed on your computer. To use MSBuild you only need to have the .NET framework.
对于我们来说,主要区别在于 devenv 将处理安装程序项目 (*.vdproj),而 msbuild 则不会。如果我没记错的话,msbuild 在查找引用的程序集时就不太宽容(特别是当路径稍微偏离时。)
For us, the major difference is that devenv will handle installer projects (*.vdproj) while msbuild will not. If I recall correctly, msbuild is much less forgiving when it comes to finding referenced assemblies (especially if the paths are slightly off.)
当我们从 VSS/CruiseControl.NET(我猜在我们的配置中使用了 devenv)转移到 TFS(它使用 msbuild,至少在我们配置它时)时,我们发现的一件事是,有时 ProjectGuids 会脱离同步。
因此,项目 A 引用项目 B,并且项目 A 的项目或解决方案文件具有 ProjectGuid 和项目 B 的项目文件的路径。但是,无论出于何种原因,项目 B 的 ProjectGuid 已更改,而项目 A 的项目或解决方案文件未更新以反映这一点。
Devenv 很好,因为它要么只使用项目 B 的项目文件的文件路径,要么回退到它。然而,Msbuild 此时就停止了,因为如果 ProjectGuids 不匹配,就无法进行。此时,您可以在 Visual Studio 中修复它(我认为删除并重新添加项目有效),也可以通过记事本或其他方式手动修复它。
我将让您决定哪个更好(严格遵守 ProjectGuid 或在项目路径已知时宽大处理)
One of the things we discovered as we moved to TFS (which uses msbuild, at least as we have it configured) from VSS/CruiseControl.NET (which I'm guessing used devenv in our configuration) is that sometimes the ProjectGuids get out of sync.
So, Project A references Project B and the project or solution file for Project A has the ProjectGuid and path to Project B's project file. However, for whatever reason Project B's ProjectGuid has changed and Project A's project or solution file didn't get updated to reflect this.
Devenv is fine because it either just uses the file path to Project B's project file or it falls back to it. Msbuild, however, stops cold at this point because if the ProjectGuids don't match it's a no-go. At this point you can either fix it in Visual Studio (I think removing and re-adding the project works) or manually through Notepad or something.
I'll leave it up to you to decide which is better (strict adherence to the ProjectGuid or leniency when the path to the project is known)