Build/Test Issues

nCrunch doesn't build test project, as if it doesn't know about references

Started by tlianza on 11,955 views

Hi All,

I have a project of nUnit tests in my solution, and though nCrunch can build most of my projects, it fails on this one with errors like this:

Agent\JobDispatcherTest.cs (10): The type or namespace name 'TeamAgile' could not be found (are you missing a using directive or an assembly reference?)

The TeamAgile assembly is referenced under "References" and a right-click build in Visual Studio works fine for that project.

Very mysterious. I'm wondering if the fact that one of my projects doesn't build (nor does it need to in VS or nCrunch - the tests don't apply to it) might be affecting this? That's the only out-of-the-ordinary thing I see.

Thanks,
Tom
Hi Tom -

Thanks for reporting this issue. Would you be able to submit a bug report using the 'NCrunch' menu as soon as this issue occurs? It looks like a resolution problem inside the engine.


Cheers,

Remco
Remco wrote:Hi Tom -

Thanks for reporting this issue. Would you be able to submit a bug report using the 'NCrunch' menu as soon as this issue occurs? It looks like a resolution problem inside the engine.


Cheers,

Remco


Done! Also included a link to this forum post in the report.
Excellent thank you! I've had a look through the bug report and it seems that something really strange is going on with NCrunch's resolution of the assemblies you have in the target\dev\x86\checked\ directory.

Would you be able to show me how these files are being included in your build? (i.e. copy/paste of the one of the <Reference> tags from your project file would be great).

Are you using any known build customisations or packaging frameworks? (i.e. Nuget, Openwrap, etc)..
Remco wrote:
Would you be able to show me how these files are being included in your build? (i.e. copy/paste of the one of the <Reference> tags from your project file would be great).

Are you using any known build customisations or packaging frameworks? (i.e. Nuget, Openwrap, etc)..


I'm not using anything interesting for building these projects. My references seem to be split into "References" and "ProjectReferences" and the reference in question is under "ProjectReferences":

<ProjectReference Include="TeamAgile.XtUnit\TeamAgile.XtUnit.csproj">
<Project>{2A8B9AEE-2400-4829-AC47-4D1094587272}</Project>
<Name>TeamAgile.XtUnit</Name>
</ProjectReference>
Thanks. As the bug report only contains a limited log capacity, I'm wondering if you might be able to give me a fresh capture. Would you be able to do a complete reset of NCrunch (disable/enable) then submit the report as soon as all the builds complete?
Remco wrote:Thanks. As the bug report only contains a limited log capacity, I'm wondering if you might be able to give me a fresh capture. Would you be able to do a complete reset of NCrunch (disable/enable) then submit the report as soon as all the builds complete?


Done.
Thanks again. It looks as though the TeamAgile.XtUnit project isn't included in the same solution as your test project. Is this the case?

Right now NCrunch has a known issue with building against references to projects outside the current solution. It's on the list of things to be addressed (as it is somewhat annoying). Naturally there are a number of ways to work around this, such as changing your solution structure or referencing a pre-built binary instead of the project file.
Remco wrote:Thanks again. It looks as though the TeamAgile.XtUnit project isn't included in the same solution as your test project. Is this the case?

Right now NCrunch has a known issue with building against references to projects outside the current solution. It's on the list of things to be addressed (as it is somewhat annoying). Naturally there are a number of ways to work around this, such as changing your solution structure or referencing a pre-built binary instead of the project file.


You're right! I even read that in the docs, but had forgotten that we were building that as a project - I thought we were using the pre-built binary. Sorry for taking all of your time - thank you for the help.
No problem. Glad we figured it out :)

Post a reply

Log in to reply.