hansmaad
hansmaad

Reputation: 18905

MSBuild a VC Express Project on Hudson Server (IncludePath)

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

Upvotes: 3

Views: 1720

Answers (1)

Sergio Rykov
Sergio Rykov

Reputation: 4286

I can recommend to set UserRootDir manually for your Hudson task. For MDBuild you can set Command Line Parameters :

 /p:Configuration=Release;Platform=Win32;UserRootDir=c:\MSBuild

Upvotes: 5

Related Questions