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.
Daily Usage Issues
Force console tool to use grid nodes instead of local
Started by GreenMoose on 5,166 views
Remco NCrunch Developer
#9471
02 Dec 2016 22:45 UTC
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.
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.
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)
(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 NCrunch Developer
#9480
05 Dec 2016 00:08 UTC
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.
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.
Edited 05 Dec 2016 00:09 UTC
Post a reply
Log in to reply.