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

Notification

Icon
Error

Can't build on grid node
xiaomingtu
#1 Posted : Monday, July 18, 2016 5:19:30 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/18/2016(UTC)
Posts: 3
Location: United Kingdom

Hi,

I got this error when I build my project on a grid node:

..\..\..\..\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets (917, 7): The target "AssignLinkMetadata" does not exist in the project.

I use VS2015 Professional locally and have VS2015 Community installed on the grid node.

I have seen a similar issue on this post but there is not solution provided.
http://forum.ncrunch.net...-across-Grid-Nodes.aspx

Thanks!
Xiaoming
Remco
#2 Posted : Monday, July 18, 2016 10:48:01 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi Xiaoming,

This problem is caused by a cross-version issue between your dev machine and the grid node.

Basically, your dev machine is building the project using the VS2015 build tools, while the grid node is using an older set of tools.

NCrunch will normally use the same set of build tools on a grid node as it does on the client machine. Where it can't resolve the same tools, it will use an older version as a fallback.

Can you check if you have the file 'Microsoft.Build, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL' installed in the GAC on the grid node server? NCrunch looks for this assembly when deciding whether it can use MSBuild for VS2015.

A way to work around this is to try adding the missing build target directly to your project files. For example:

<Target Name="AssignLinkMetadata" Condition="'$(NCrunch)' == '1'">
</Target>

This may get you past the problem, though it may cause some differences in behaviour around how Link files are copied for the project (usually not a problem as most people don't use this feature).
xiaomingtu
#3 Posted : Monday, July 18, 2016 11:03:06 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/18/2016(UTC)
Posts: 3
Location: United Kingdom

Hi Remco,

I have checked that the file 'Microsoft.Build, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL' is installed in the GAC on the grid node server.

I do not want to change the project file since it works fine on my dev machine.
Remco
#4 Posted : Monday, July 18, 2016 11:21:04 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Would it be possible for you to get hold of a log on the grid node server of when it tries to build one of these projects?

You can turn on logging in the grid node configuration tool. Make sure you point it to an area of your hard drive where you can easily find the log. The grid node should specify in the log if it's using a different version of MSBuild than was requested by the grid client. This will help us to determine whether the grid node is using the wrong version of MSBuild, or whether it's the build logic itself going wrong.

If you haven't already, I do also recommend copying one of these projects over to the node and trying to run MSBuild 14 over it to see what happens. You can normally find this at C:\Program Files (x86)\MSBuild\14.0\Bin
xiaomingtu
#5 Posted : Thursday, July 21, 2016 8:29:14 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/18/2016(UTC)
Posts: 3
Location: United Kingdom

Thanks Remco! I copied one project to the grid node and use MSBuild to build it directly. It succeeds. Then I enabled the log and try to reproduce the problem but it all works fine from then on. Even if I have disabled logging, it works now. No idea what happened.
Remco
#6 Posted : Thursday, July 21, 2016 9:22:06 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
xiaomingtu;9017 wrote:
Thanks Remco! I copied one project to the grid node and use MSBuild to build it directly. It succeeds. Then I enabled the log and try to reproduce the problem but it all works fine from then on. Even if I have disabled logging, it works now. No idea what happened.


We have a mystery! I'm glad you're working again. Let me know if you find a consistent way to reproduce it.
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.042 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download