Changng MSBuild version

The Pulse Support forums are here so that you can ask questions or leave comments related to pulse. They are watched by Zutubi staff who will endeavour to answer your questions promptly.

Changng MSBuild version

Postby scoobydoo on Fri Feb 06, 2015 3:45 am

I just installed MS VS2013 and i'm trying to get Pulse to use the MSBUild 12.0 that matches VS2013 but Pulse keeps on picking up MSBuild 4.0. I added MSBuild 12.0 as a new resource and made it default, but the builds still seem to use MSBuild 4.0.

I also tried restarting Pulse as i thought the auto-discovery might do the trick, but no luck. Any idea what could be wrong? Is there a config file i need to alter somewhere.

Thanks
scoobydoo
 
Posts: 28
Joined: Tue Oct 14, 2014 6:39 pm

Re: Changng MSBuild version

Postby jason.sankey on Fri Feb 06, 2015 4:21 am

Hi,

The Pulse MsBuild command will try to find msbuild.exe by first looking for an msbuild.bin property, then if that is not found just using the PATH. The usual way to introduce a value for msbuild.bin is using an msbuild resource, which it sounds like you are at least part way along to doing. To ensure the resource is used, you need to have a resource requirement defined in the project (or build stage) that requires the version of the resource you want to use (or, indeed, accepts the default version if you have defined the default you want).

Cheers,
Jason
jason.sankey
 
Posts: 1815
Joined: Sun Apr 30, 2006 12:26 pm

Re: Changng MSBuild version

Postby scoobydoo on Tue Feb 10, 2015 12:21 am

Hi Jason,

I tried adding a new msbuild.bin and then setting it to the default but Pulse keeps on using MSBuild 4. When i look at the resource browser for required resource i'm not seeing MSBuild V12.0 which is installed as part of Visual Studio 2013 (which is installed on the Agent machine)

msbuild [default] Windows Slave
2.0.50727 Windows Slave
2.0.50727 (64-bit) Windows Slave
3.5 Windows Slave
3.5 (64-bit) Windows Slave
4.0.30319 Windows Slave
4.0.30319 (64-bit) Windows Slave


I noticed that with Visual Studio 2013 MSBuild is now included and previously it was part of .NET framework. Not sure if that's an issue.
scoobydoo
 
Posts: 28
Joined: Tue Oct 14, 2014 6:39 pm

Re: Changng MSBuild version

Postby jason.sankey on Tue Feb 10, 2015 12:39 am

Hi,

I'm a bit confused by the fact that the new MsBuild 12.0 resource you added (mentioned in your original post) is not showing up in the browser. Did you add this resource to the Windows slave's configuration? The setup I expect to work is to have an MsBuild resource defined in the Windows Slave agent configuration, and for this resource to have a version 12.0 that is set as the default. This version 12.0 should defined the msbuild.bin property with the value set to the full path to the MsBuild binary.

Then the project should have a requirement on the MsBuild resource, default version. Even the specific 12.0 version should be available in the browser if things are set up as above.

Cheers,
Jason
jason.sankey
 
Posts: 1815
Joined: Sun Apr 30, 2006 12:26 pm

Re: Changng MSBuild version

Postby scoobydoo on Tue Feb 10, 2015 12:51 am

For now as a work around i have started to build using an executable command rather than the build in msbuild resource as that's working OK
scoobydoo
 
Posts: 28
Joined: Tue Oct 14, 2014 6:39 pm

Re: Changng MSBuild version

Postby jason.sankey on Tue Feb 10, 2015 1:55 am

OK, if the executable command works then that suggests the problem is just the msbuild command locating the msbuild binary and nothing more complicated (I was starting to wonder if there was something else in the environment that caused a different msbuild to run). I'm not sure why but it seems the msbuild.bin property is not making into the context, perhaps it is defined in the wrong spot, the resource is not imported as it is not required, or perhaps another resource or msbuild.bin definition is overriding it. You could check the implicit env.txt artifact for this command for more clues -- it should show the value of msbuild.bin (if any, also set as PULSE_MSBUILD_BIN), and it will also show the PATH which may be interesting.

Note you can force a specific msbuild exe even when using the msbuild command by specifying the full path to the exe in the msbuild command configuration using the "custom msbuild executable" field. If this field is set it is used directly and no further logic is used to find msbuild.

Cheers,
Jason
jason.sankey
 
Posts: 1815
Joined: Sun Apr 30, 2006 12:26 pm


Return to Pulse Support

Who is online

Users browsing this forum: No registered users and 3 guests

cron