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

Notification

Icon
Error

Unable to get Bond.Csharp to compile via NCrunch 2.16.0.13
lethil
#1 Posted : Tuesday, August 18, 2015 11:48:48 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/18/2015(UTC)
Posts: 2
Location: United States of America

Hello!

I am using NCrunch 2.16.0.13 at work in Visual Studio 2015 and it's awesome (of course :) ). I'm running into a problem with the nuget package Bond.CSharp. We've recently added it to our solution and, since then, we've had some problems with NCrunch compiling it. I'm now tasked to get it working.

I've found that adding the "packages" directory in the "Additional files to include" section of the NCrunch Configuration screen gets it to the point of attempting a build. However, when it attempts to run the Bond.CSharp targets, NCrunch fails to build. It works successfully during a normal build in the IDE otherwise.

Any suggestions?

Jason
Remco
#2 Posted : Tuesday, August 18, 2015 11:55:55 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,974

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Hi Jason,

Thanks for sharing this issue.

Now that you've included the package in the NCrunch workspace, the next thing I would try is placing NCrunch in compatibility mode - http://www.ncrunch.net/documentation/troubleshooting_compatibility-mode.

This can be useful for narrowing down whether a configuration option can solve this problem for you.

If the Bond.CSharp build steps aren't required in preparing the project for NCrunch's test environment, you may also be able to turn them off. Somewhere inside the project file you'll find an import tag pointing towards the Bond.CSharp targets - if you apply an MSBuild condition to this, you can suppress the build steps and NCrunch will work without them. For more information on this see http://www.ncrunch.net/documentation/troubleshooting_ncrunch-specific-overrides.
lethil
#3 Posted : Wednesday, August 19, 2015 12:10:41 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/18/2015(UTC)
Posts: 2
Location: United States of America

Unfortunately, none of the individual compatibility configurations seemed to change the issue. :/

Here's the failure details (same failure after each call):

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
..\packages\Bond.CSharp.3.0.7\build\Bond.CSharp.targets (81, 5): The command ""F:\NCrunch\9020\17\packages\Bond.CSharp.3.0.7\build\..\bin\gbc.exe" c# --import-dir="F:\NCrunch\9020\17\packages\Bond.CSharp.3.0.7\build\..\inc" --jobs=-2 --namespace=bond=Bond --output-dir="obj\Debug\\." @"obj\Debug\bondfiles.tmp"" exited with code 1.

Any other potential ideas?
Remco
#4 Posted : Wednesday, August 19, 2015 5:19:28 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,974

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
I recommend taking a look at the workspace NCrunch has built for this project, and trying to get the build to work yourself using a command-line call to MSBuild, using the files in this workspace.

You can freely modify the files in the workspace to troubleshoot as necessary. Resetting the NCrunch engine will delete and restore them.

I recommend looking closely at the project file and the included bond imports to try and understand why this framework doesn't like the project to be moved to a different area of your disk.

I've just had a try with recreating your situation using the CSharp.Bond framework. Unfortunately this hasn't proved easy to do with my limited knowledge of this framework as it seems rather 'welded together' with the way it handles paths inside the build environment - so I have no idea whether the problems I'm facing are the same as the one you're being hit with. Even making this framework work using its own in-built examples outside of NCrunch seems to be challenging in its own way.

The easiest option may be to simply disable the bond build steps using an NCrunch-specific override, as suggested earlier. You can then rely on the code generation to happen on a manual build and simply let NCrunch work with the generated code.

lukesch
#5 Posted : Monday, November 27, 2017 4:11:02 PM(UTC)
Rank: Member

Groups: Registered
Joined: 5/10/2014(UTC)
Posts: 13

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
I had the same issue. To fix it, turn on the most verbose logging for the build in ncrunch. If you look near where the error appears in those logs, you will see ncrunch say it can't find a certain file. In my case it was a something.Bond file. Go to the ncrunch settings for the project and you will find an option "Additional files to include." Select that missing file and magically everything will work.
1 user thanked lukesch for this useful post.
Remco on 11/27/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.045 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download