What is the difference between using 'devenv' and 'msbuild' in CruiseControl.NET builds?

柔情痞子 提交于 2020-01-01 02:32:43

问题


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.


回答1:


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.




回答2:


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.)




回答3:


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)



来源:https://stackoverflow.com/questions/4980836/what-is-the-difference-between-using-devenv-and-msbuild-in-cruisecontrol-net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!