Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Force console tool to use grid nodes instead of local
GreenMoose
#1 Posted : Friday, December 2, 2016 3:58:08 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 507

Thanks: 145 times
Was thanked: 66 time(s) in 64 post(s)
v2.26

For new projects I am trying to utilize NCRunch console runner on TeamCity, the problem is the build agents do not have VS 2015 installed so I have created a grid node which has that.

The problem when I start NCrunch.exe it connects to the grid node properly but then it also starts compiling locally (vs2010) and results in compile errors due to CS6 language syntax and quits due to build error.

I can disable "(local)" in vstudio but that setting I cannot seem to get into the global xml configuration used by the console tool.

Is there a way/hack I can do this so I can proove for the team members how valuable NCrunch is ? :)

Thanks.
Remco
#2 Posted : Friday, December 2, 2016 10:45:39 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,123

Thanks: 957 times
Was thanked: 1287 time(s) in 1194 post(s)
Hi,

NCrunch.exe carries with it integration with all supported versions of VS. By default, it will use the highest available version of VS installed on the machine. You can force it to use a specific version of VS/MSBuild using the /VS command line parameter, for example:

NCrunch.exe mysolution.sln /VS 2015

Note that if the tool is connecting to grid nodes that don't have the same version of VS installed, the grid node will fall back to the closest available version.

Under v2.26, the disabling of grid nodes is actually stored in the .v2.ncrunchsolution.user file in binary form. This has been changed in v3, where it is now stored in .v3.ncrunchsolution.user in text form instead.
GreenMoose
#3 Posted : Sunday, December 4, 2016 10:10:21 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 507

Thanks: 145 times
Was thanked: 66 time(s) in 64 post(s)
Hrm so you mean vs 2015 doesn't even have to be installed in order to build that with Ncrunch.exe (if so it should work without vstudio installed as well?)?
(The problem I have is Ncrunch.exe runs on machine with vs2012, grid node on vs2015, and I get compile errors on machine with Ncrunch.exe)
Remco
#4 Posted : Monday, December 5, 2016 12:08:25 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,123

Thanks: 957 times
Was thanked: 1287 time(s) in 1194 post(s)
Unfortunately, the machine running NCrunch.exe will usually need to have the same version of MSBuild installed as is intended to be used on the grid node servers.

This is because NCrunch.exe still needs to load the projects on its local machine before it can farm out the work to connected nodes. The act of loading projects requires integration with MSBuild.

It's possible in some cases for the version of MSBuild to be different between NCrunch.exe and the grid node, but as you've noted VS2015 contains several language changes that make interoperability difficult here. VS2015 also introduced some changes to the build system that make it impossible for projects to be loaded on a prior version of MSBuild then built on a later version. This means that if VS2015 is involved, you'll need to have the versions consistent between the console tool and the grid node. When using only older versions of VS/MSBuild, there is still a chance that it may work through the grid node's fallback system.
2 users thanked Remco for this useful post.
GreenMoose on 12/5/2016(UTC), Grendil on 8/5/2017(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.037 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download