MS在 Hudson 服务器上构建 VC Express 项目 (InincludePath)
我尝试在 Windows Server 2008 R2 上运行的 Hudson 上编译 Visual C++ 2010 Express 解决方案,但由于缺少包含路径而失败。
该项目需要在 Microsoft.Cpp.Win32.user.props
中定义的其他包含目录,该目录位于 %LOCALAPPDATA%\Microsoft\MSBuild\v4.0
中。 当我登录到服务器时,cd 到 hudson 工作区目录并运行 MSBuild 项目进行编译(道具文件位于我的用户 localappdata 目录中)。由于 hudson 服务作为“本地系统”运行,因此 %LOCALAPPDATA%
为 C:\Windows\System32\config\systemprofile\AppData\Local\
。因此,我将 Microsoft.Cpp.Win32.user.props 的副本放置在 C:\Windows\System32\config\systemprofile\AppData\Local\Microsoft\MSBuild\v4.0
中。
当我在 Hudson 中启动构建(使用 MSBuild ... /verbosity:diag)时,我
UserRootDir = C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\MSBuild\v4.0
在输出中看到,但在 IncludePath
中没有看到包含路径。 当我将 .props 文件设置为无效的 xml 文件(这使得手动构建一开始就失败)时,Hudson 构建不会报告此失败。当 MSBuild 在 Hudson 中运行时,它似乎不会解析该文件。
这里出了什么问题?我必须在哪里放置 props 文件或者如何定义附加的包含目录?
问候...
I try to compile a Visual C++ 2010 Express solution on Hudson running on a Windows Server 2008 R2 but it fails due to missing include paths.
The project need additional include directories that are defined in Microsoft.Cpp.Win32.user.props
which is located in %LOCALAPPDATA%\Microsoft\MSBuild\v4.0
.
When I logon to the server ,cd to the hudson workspace dir and run MSBuild the project compiles (with the props file located in my users localappdata dir). Since the hudson service runs as "Local System", %LOCALAPPDATA%
is C:\Windows\System32\config\systemprofile\AppData\Local\
. So I placed a copy of the Microsoft.Cpp.Win32.user.props in C:\Windows\System32\config\systemprofile\AppData\Local\Microsoft\MSBuild\v4.0
.
When I start the build in Hudson (with MSBuild ... /verbosity:diag) I see
UserRootDir = C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\MSBuild\v4.0
in the output but non of the include paths in IncludePath
.
When I make the .props file an invalid xml file (which lets the manual build fail right at the beginning), the Hudson build does not report this failure. Seems that MSBuild doesn't parse the file, when it runs in Hudson.
What is going wrong here? Where do I have to place the props file or how can I define the additional include Dirs?
Regards...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议您为 Hudson 任务手动设置 UserRootDir 。对于MDBuild,您可以设置命令行参数:
I can recommend to set UserRootDir manually for your Hudson task. For MDBuild you can set Command Line Parameters :