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

Notification

Icon
Error

Project References lost in Ncrunch Generated Project File
Adamm
#1 Posted : Friday, February 14, 2014 4:33:52 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/31/2014(UTC)
Posts: 4
Location: United Kingdom

I can email in the Project files.
But since we upgraded to 2.4.0.2
a number of projects fail to build.

The reason is that the NCrunch generated csproj file is missing a reference.

The original csproj references a project called Core (Project Reference)
The ncrunch project file does not?


This is happening for all test projects that reference this core project.
Other non test projects build successfully.
Adamm
#2 Posted : Friday, February 14, 2014 4:40:21 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/31/2014(UTC)
Posts: 4
Location: United Kingdom

It turns out the failing projects are duplicated in NCrunch.
One is succeeding and one is failing.

I think NCrunch may be barfing due to this.
In our solution file we have duplicate names (VS allows it)


Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core", "Core\Code\Core\Core.csproj", "{B42A20F2-74CA-4702-9721-252396FE44C5}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core", "Infrastructure\Core\Core.csproj", "{D3454A30-3418-45B8-8CD5-95D1B6731DBF}"

I didn't name them :)
Remco
#3 Posted : Friday, February 14, 2014 11:50:56 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Hi, thanks for sharing this issue.

NCrunch should normally be using the project file paths to differentiate between projects, rather than their names.. for exactly the reason that the names may not be unique :)

So this is a bit of a mystery to me. You must have managed to find a hole in the logic somewhere.

Now, the tough part is that I probably won't have much luck being able to isolate this problem with just a bug report or the project files involved. I'd need to follow through every step of the analysis, workspacing and build process to find out where it's going wrong.

This means that I can solve the problem for you (and actually, would very much like to), but I'll need a code sample that can fully reproduce it. I realise that creating code samples like this takes valuable time so I will understand if you find it easier to simply rename the project to get NCrunch to work. Probably I would recommend renaming it anyway, just because it's very confusing to have two projects under the same name :)


Cheers,

Remco
Adamm
#4 Posted : Tuesday, February 18, 2014 12:59:26 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/31/2014(UTC)
Posts: 4
Location: United Kingdom

Example on its way
Remco
#5 Posted : Wednesday, February 19, 2014 12:11:23 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Thanks for the code sample!

I had a good look at this one ... tore it to pieces, couldn't figure out why it wasn't working even though it was almost identical to several test cases I have for the same situation.

Then I noticed that the second 'Core' project has the 'Ignore this project completely' setting put as 'True'. I guess it all makes sense in the end :)

Something I thought I'd also check with you is whether you regularly work with the 'Include static references in workspace' turned off. Unless this is correcting a compatibility issue with your project, I'd recommend leaving this setting on. Turning it off can result in file locking issues during source control operations etc.
Adamm
#6 Posted : Wednesday, February 19, 2014 12:36:42 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/31/2014(UTC)
Posts: 4
Location: United Kingdom

If only you didnt need users! :)
Ncrunch 2 : Adam 0

Thanks for the quick response.
I think the static reference settings was just me randomly trying settings.
Tend not to touch config, except to ignore certain projects. (Like core!)
Remco
#7 Posted : Wednesday, February 19, 2014 2:07:59 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
I think you did manage to highlight a serious usability issue though :)

This is not the first time a support request has been raised because of the 'Ignore this project completely' flag. It tends to create obscure build errors. I've also noticed that the configuration window wasn't showing the project as greyed out the way it should be.

So there's some good that's come from this:

- I've fixed the configuration window so it's more obvious now when projects are ignored
- I've added a warning to the project loader so it will let you know if other projects are referencing ignored projects

Hopefully we'll be the last people caught out by this!


Cheers,

Remco
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.044 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download