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

Notification

Icon
Error

There is a circular dependency in the target dependency graph involving target "ReBuild"
devdept
#1 Posted : Friday, February 8, 2019 3:03:27 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 10/13/2012(UTC)
Posts: 36
Location: Italy

Was thanked: 1 time(s) in 1 post(s)
Hi Remco,

We are considering NCruch again after many years, we are a team of 8 developers. Can you help me with this error? I've checked the Microsoft.Common.CurrentVersion.targets and the specified row does not even exist: the file has only 377 lines.

NCrunch: If you are experiencing problems in getting this project to build, have a look at http://www.ncrunch.net/d...ng_project-build-issues
..\..\..\..\..\..\..\..\program files (x86)\microsoft visual studio\2017\professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets (929, 7): There is a circular dependency in the target dependency graph involving target "ReBuild".

Thanks,

Alberto
Remco
#2 Posted : Friday, February 8, 2019 11:11:18 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 5,620

Thanks: 732 times
Was thanked: 931 time(s) in 887 post(s)
Hi Alberto,

Thanks for sharing this problem.

This is a new one for me. Does this particular project have any custom build targets or post/pre build events configured?

Something to check is whether the platform configurations you have in the project file are lining up with the project defaults. If this is wrong, it can cause some crazy downstream things, especially if the project file is heavily customised - https://www.ncrunch.net/documentation/considerations-and-constraints_project-build-platform-and-configuration.

Also worthwhile is to enable compatibility mode to see if there is any easily adjustable NCrunch feature interfering with your normal build operation.
devdept
#3 Posted : Saturday, February 9, 2019 11:04:51 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 10/13/2012(UTC)
Posts: 36
Location: Italy

Was thanked: 1 time(s) in 1 post(s)
No luck Remco, I've set the compatibility mode for the problematic project but the same error is present.

Two questions:

1) We write code and run tests mainly in Release mode. Can this be a problem? All the units tests are running under .NET runner and NUnit.
2) Two o our solution projects are compiled at x64 the others to AnyCPU. Does it matter?

I wish I could show NCrunch to the team next week.

Thanks,

Alberto
Remco
#4 Posted : Saturday, February 9, 2019 9:56:45 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 5,620

Thanks: 732 times
Was thanked: 931 time(s) in 887 post(s)
Hi Alberto,

It should normally be totally OK for you to work in Release mode and in any combination of platforms, thought there is a good chance that these settings are resulting in the problem you're experiencing, as NCrunch will use the project defaults for the build configuration/platform rather than the ones selected in Visual Studio.

Probably the best approach would be to try setting the 'Use Build Configuration' and 'Use Build Platform' settings for each of your projects inside your NCrunch configuration. This will let you align the NCrunch build with the VS one and might resolve the problem.

If that doesn't solve the problem, we'll be out of easy answers ... it'll be down to trying to reproduce the problem in a sample solution by slowly moving code over until you identify what is triggering it. This kind of deductive troubleshooting takes time but always results in a deep understanding of the problem and very often a solution.
devdept
#5 Posted : Sunday, February 10, 2019 1:57:54 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 10/13/2012(UTC)
Posts: 36
Location: Italy

Was thanked: 1 time(s) in 1 post(s)
Sorry, not even this works. Why AnyCPU as in VStudio Platform Target is not listed?

Before giving up again (this is the second attempt in so many years), do you think that connecting remotely to my machine could help to resolve the problem?

Thanks again,

Alberto
Remco
#6 Posted : Sunday, February 10, 2019 9:08:54 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 5,620

Thanks: 732 times
Was thanked: 931 time(s) in 887 post(s)
Hi Alberto,

I'm sorry to hear that. To analyse this further, I'll need to get a sample solution that can produce it so that I can trace through the build logic in detail. I've never seen this problem before and I'm not sure why your solution is different. If you're able to isolate the problem in code that you can share with me, you can freely ZIP up this code and send it to me through the NCrunch contact form (must be under 10MB).
devdept
#7 Posted : Friday, February 15, 2019 7:11:53 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 10/13/2012(UTC)
Posts: 36
Location: Italy

Was thanked: 1 time(s) in 1 post(s)
Hi Remco,

I've just sent you our unit test solution to investigate. The error is always:

NCrunch: If you are experiencing problems in getting this project to build, have a look at http://www.ncrunch.net/d...ng_project-build-issues
..\..\..\program files (x86)\microsoft visual studio\2017\professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets (929, 7): There is a circular dependency in the target dependency graph involving target "ReBuild".

Please keep me updated.

Thanks,

Alberto
Remco
#9 Posted : Friday, February 15, 2019 10:09:47 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 5,620

Thanks: 732 times
Was thanked: 931 time(s) in 887 post(s)
Hi Alberto,

Thanks for sending through the sample solution.

The problem you're experiencing here seems to relate to a strange modification that has been made to these project files. At the top of the file, the project has been set to use a default target of 'Rebuild'. This seems to cause some really crazy things to happen inside the project file logic. Is there a reason this was done? Removing the default target resolves the problem.
devdept
#10 Posted : Sunday, February 17, 2019 11:36:30 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 10/13/2012(UTC)
Posts: 36
Location: Italy

Was thanked: 1 time(s) in 1 post(s)
Thanks a lot Remco,

I didn't remember if there was a specific reason for this. I will try immediately to remove it.

Alberto
devdept
#11 Posted : Sunday, February 17, 2019 1:03:21 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 10/13/2012(UTC)
Posts: 36
Location: Italy

Was thanked: 1 time(s) in 1 post(s)
Now, after removing the:

DefaultTargets="ReBuild"

from this VStudio project tag:

<Project ToolsVersion="4.0" DefaultTargets="ReBuild" xmlns="(- BROKEN LINK -)">

All our unit tests started to run !!!! This will allow NCrunch testing on all our thousands of tests. I can't wait to see the outcome Remco.

One last thing. Can you please help me to run the test in Release mode?

Now I see a dialog saying "Assertion Failed: Abort, Retry, Ignore" now and then and I need to manually dismiss them.

Thanks again,

Alberto


devdept
#12 Posted : Sunday, February 17, 2019 5:11:43 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 10/13/2012(UTC)
Posts: 36
Location: Italy

Was thanked: 1 time(s) in 1 post(s)
Resolved setting Configuration = Release for all projects.

I'll be back with soon with some feedback.

Thanks again,

Alberto
1 user thanked devdept for this useful post.
Remco on 2/17/2019(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.050 seconds.