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/documentation/troubleshooting_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
Build/Test Issues
There is a circular dependency in the target dependency graph involving target "ReBuild"
Started by devdept on 6,452 views
Remco NCrunch Developer
#13053
08 Feb 2019 23:11 UTC
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.
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.
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
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 NCrunch Developer
#13060
09 Feb 2019 21:56 UTC
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.
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.
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
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 NCrunch Developer
#13062
10 Feb 2019 21:08 UTC
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).
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).
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/documentation/troubleshooting_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
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/documentation/troubleshooting_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
Deleted post
#13082
15 Feb 2019 14:50 UTC
Remco NCrunch Developer
#13083
15 Feb 2019 22:09 UTC
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.
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.
Thanks a lot Remco,
I didn't remember if there was a specific reason for this. I will try immediately to remove it.
Alberto
I didn't remember if there was a specific reason for this. I will try immediately to remove it.
Alberto
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
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
Resolved setting Configuration = Release for all projects.
I'll be back with soon with some feedback.
Thanks again,
Alberto
I'll be back with soon with some feedback.
Thanks again,
Alberto
Post a reply
Log in to reply.