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

Notification

Icon
Error

nCrunch doesn't build test project, as if it doesn't know about references
tlianza
#1 Posted : Wednesday, December 14, 2011 8:44:50 PM(UTC)
Rank: Member

Groups: Registered
Joined: 12/14/2011(UTC)
Posts: 11
Location: Seattle, WA

Thanks: 1 times
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
Remco
#2 Posted : Wednesday, December 14, 2011 9:24:42 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 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
tlianza
#3 Posted : Wednesday, December 14, 2011 9:43:52 PM(UTC)
Rank: Member

Groups: Registered
Joined: 12/14/2011(UTC)
Posts: 11
Location: Seattle, WA

Thanks: 1 times
Remco;730 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.
Remco
#4 Posted : Wednesday, December 14, 2011 11:49:03 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)
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)..
tlianza
#5 Posted : Thursday, December 15, 2011 12:06:38 AM(UTC)
Rank: Member

Groups: Registered
Joined: 12/14/2011(UTC)
Posts: 11
Location: Seattle, WA

Thanks: 1 times
Remco;733 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>
Remco
#6 Posted : Thursday, December 15, 2011 12:55:33 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)
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?
tlianza
#7 Posted : Thursday, December 15, 2011 1:05:37 AM(UTC)
Rank: Member

Groups: Registered
Joined: 12/14/2011(UTC)
Posts: 11
Location: Seattle, WA

Thanks: 1 times
Remco;736 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.
Remco
#8 Posted : Thursday, December 15, 2011 1:10:46 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)
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.
1 user thanked Remco for this useful post.
tlianza on 12/15/2011(UTC)
tlianza
#9 Posted : Thursday, December 15, 2011 1:38:18 AM(UTC)
Rank: Member

Groups: Registered
Joined: 12/14/2011(UTC)
Posts: 11
Location: Seattle, WA

Thanks: 1 times
Remco;738 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.
Remco
#10 Posted : Thursday, December 15, 2011 1:48:13 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)
No problem. Glad we figured it out :)
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.057 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download