views:

801

answers:

4

I have the msbuild plugin installed on my Hudson server, and it's attempting to execute the command, but for some reason the path I'm setting in my configuration is not being used when the msbuild task gets fired.

I have the following set in the configuration of hudson's msbuild plugin:

Path To msbuild.exe C:\Windows\Microsoft.NET\Framework\v3.5\msbuild.exe

I left the name property blank.

When I do a build it outputs this:

Executing command: cmd.exe /C msbuild.exe /p:Configuration=Release ...

Which I know is wrong because all the other examples show the [msbuild.exe] part fully qualified.

I've been searching everywhere trying to figure out why this isn't getting set properly and I've hit a brick wall.

Does anyone know how to fix this?

+3  A: 

This works for me:

  • in the main hudson configuration I set the name to local-msbuild and the path to msbuild to C:\Windows\Microsoft.NET\Framework\v3.5\msbuild.exe

  • select the local-msbuild as the MsBuild Versionin each project, instead of (default)

leeeroy
That was it, for some reason I only had (default) as an option, but I deleted the one I had and recreated like you did and now I have an additional option, thanks!
Joseph
A: 

Of course, this begs the question why there IS a '(Default)' option that never works.

One hacky way around this is to set the name of your msbuild to (Default) in the main hudson configuration. Then in your project configurations, you have two (Default) options, but they both work... so you can leave it set to the default (Default) on new projects and it still works.

Eggplant Jeff
Default works if you have the `PATH` on the windows box configured so that msbuild.exe can be run without being fully qualified.
Guildencrantz
A: 

Here is a follow up question - what are tha allowable options for /p:Platform=? I'm trying to use WinCE-GS3Target (ARM4VI), but it is failing? Also, what does a correct value look like

/p:Platform=Win32

or

/p:Platform="Win32" ??

Dave
A: 

I had this problem. I fixed it by going to the Project Configuration Page to the Build Section. There is an option to set "MsBuild Version" with a dropdown box with 2 options: 1) Default; 2)MSBuild. Mine was set to Default. When I changed it to MSBuild the path set on the System Configuration page was used.

Kim