Build/Test Issues

NCrunch 1.32b fails to build projects that depend on NCrunch-instrumented projects

Started by jeremygray on 11,210 views

After getting my AssemblyInfo changes (regarding deprecated strong naming attributes) in place and my project file default platform issues addressed on my end I was able to get NCrunch up and running. However, I was only able to do so by disabling instrumentation of every project that is referenced by any other project in the solution.

As a result, only my test projects and top-level applications are instrumented (and I'll probably disable the latter to keep things simple).

Any project set to be instrumented will result in a dependent project failing to be built by NCrunch, with an error of the following form:
[14:42:53.892-BuildTask-70] Error 'Compilation': DEPENDENT_PROJECT_NAME: CLASS_NAME.cs (2): The type or namespace name 'LOCAL_NAMESPACE_IN_INSTRUMENTED_PROJECT' does not exist in the namespace 'FULL_PARENT_NAMESPACE_IN_INSTRUMENTED_PROJECT' (are you missing an assembly reference?)

NCrunch is ticking along nicely, shortening the test feedback cycle more than I've seen any other tool do, and this is awesome enough already, but it would sure be nice to instrument my SUTs.

Is there any information that I can provide to you to help diagnose this issue?
This looks very strange. Would it be possible for you to use the 'Submit Bug Report' option? (accessible via the top menu)

This will send through a log file that I can run through to figure out what's going on under the hood.

It may also be worth turning on the 'CopyReferencedAssembliesToWorkspace' option to see if this makes any difference?
Submitted, along with some details in the bug report regarding how CopyReferencedAssembliesToWorkspace doesn't change the outcome. Let me know if I can be of any further assistance.
For anyone else experiencing this problem:

Jeremy and I had a detailed look into this and confirmed it to be a compatibility issue between NCrunch v1.32b and instrumentation of assemblies that compile for v2.0 of the .NET framework.

This means that if you are attempting to use NCrunch on projects set to build to v2.0, you will either need to upgrade the project to v3.5 or turn off instrumentation for this project in your configuration.

A fix for this issue will be released as part of 1.33b.
For anyone interested, this issue should be fixed in the recently released 1.33b.
I can confirm that 1.33b resolves the issue I originally reported.

So, Remco, when can we start giving you money for NCrunch? :)
Still too early for me to say I'm afraid.

You can pay me with bug reports for now! :)

Post a reply

Log in to reply.