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

Notification

Icon
Error

Coverage isn't updated when using Assembly References
webmanAv
#1 Posted : Wednesday, April 18, 2012 8:03:44 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/18/2012(UTC)
Posts: 2
Location: Israel

I use Assembly References on my product, and not project References( I have good reasons to do it, msbuild dependencies doesn't work no mixed assembly/project references )
However the coverage coloring isn't updated.

I reproduce it in simple scenario such as:

Project1.Tests ------(DLLReference)----> Project1

Project1.Tests coloring is OK, But Project1 Coloring isn't updated.
Only if I change the reference to Project Reference it works.

Thanks,
Aviram











Remco
#2 Posted : Wednesday, April 18, 2012 10:10:06 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi Aviram,

Thanks for posting!

In its current state, I see no way to make NCrunch work correctly with your current solution structure. While it is referencing static assemblies on disk (and not projects), NCrunch doesn't have a way to make a connection between projects that need to be hosted inside the same test environment.

I'm surprised this solution structure is working for you. MSBuild uses project references to identify the sequence in which a solution needs to be built, so you may need to run your build multiple times before you have a reliable output that can be used (unless your solution structure is quite shallow).

Are you able to share any more details about why you can't use project references? Perhaps I can help find you another approach.


Cheers,

Remco
webmanAv
#3 Posted : Thursday, April 19, 2012 8:22:59 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/18/2012(UTC)
Posts: 2
Location: Israel

We have product with ~200 Projects / 6 Sln
we use assembly references,Therfore for each project we manually declare project dependencies in visual studio
The dependencies are persisted to SLN file ProjectSection(ProjectDependencies)
All projects build output is the same bin folder. (also third parties are copied to this directory)
The advantage is that Each developer can also create his own small solutions with only few projects he needs.
If we use project reference we have to open many solutions with a lot of projects which can slow the development.
Thanks,
Aviram

Remco
#6 Posted : Thursday, April 19, 2012 10:41:43 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Thanks for sharing this. Having had a good think about this, I'm not sure if I can recommend an approach that would allow you to use NCrunch on this solution without having most of your project tree loaded into memory. NCrunch is able to load and work with projects that exist outside the current solution, though this still would require the use of project references and I think it would still place you in the situation that you are trying to avoid (i.e. having your entire project tree sitting in memory). In theory it's possible to set this up by introducing <ProjectReference> tags side-by-side with your <AssemblyReference> tags in the .proj files, and making these conditional on NCrunch vs Visual Studio builds - though this would be a nightmare to set up and maintain.

I have some long term plans to introduce features that may make your situation much easier, but I'm still working out the details of this and any reliable implementation is still many months away.

In a more general sense, when I think to projects I've worked on of a similar size, generally we would split the entire project tree up into smaller solutions that were well published within the team. While working between the solutions, we would often have multiple instances of the VS IDE open. It wasn't ideal, so we would often try to split projects between the solutions based on natural lines of architectural separation within the product to make the dependencies easier to control. Often when products reach the size you've described, they tend to be split up between multiple development teams anyway, which I think is how many people deal with this problem. I find your approach very interesting as it suggests there may be other ways to manage 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.064 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download