I downloaded the new version of NCrunch and I have the following problem (which I didn't have previously). I have a VB Imports statement with this form:
Imports ShortName = Some.Long.Path.To.Namespace
NCrunch 1.36b doesn't seem to like it. I have the following error:
'ShortName' is not declared. It might be unaccessible due to its protection level.
Thanks for posting. Does it make any difference if you turn off the IncludeStaticReferencesInWorkspace setting for the project exhibiting the build error?
Thanks for sending through the bug report. I'm wondering if you might be able to help me by providing a little more information about the type you are having trouble resolving.
Is it referenced directly from a .dll file? Or is it within a project held within your solution?
Is there anything that could be considered 'interesting' or different about this reference compared with others in your solution? For example, does it make use of an assembly reference alias, or COM? Are you relying on any special build steps around the reference? I.e. 3rd party AOP frameworks, IL merge+manipulation, etc.
Is this the first time that you've used NCrunch? Or did this project work on any previous version?
Finally, does it make any difference if you disable instrumentation (in your NCrunch configuration) for all the projects in your solution?
I know what the real issue is... We have two projects with the same name (one of them in a subfolder), but different namespaces. NCrunch seems to ignore the second one. That would explain why the reference to types inside those projects can't be found.
Renaming projects so that they all have distinct names fixed the issue.
Remco wrote:Interesting. Thanks for letting me know. I'm sure this is quite a rare case but I'll see what I can do about supporting it in a future revision.
Yes, I'm sure too ;-)
We might just rename those projects to make it work with NCrunch. Thanks for the great support and good work!