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

Notification

Icon
Error

Dlls for nuget packages copied to solution root
mworley
#1 Posted : Tuesday, August 20, 2013 1:02:29 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/20/2013(UTC)
Posts: 3
Location: Australia

Thanks: 1 times
Hi, I'm finding that there's a strange interaction between NuGet and NCrunch.

Steps to reproduce.

1. Create a new solution and add project (the type doesn't matter, so say a console application).
2. Add a NuGet package to the project (again, it doesn't matter so long as it's a DLL, so say Json.NET).
3. Enable NCrunch (I'm not sure if the settings affect this issue, but I selected No Parallel, Automatic Execution, Let my tests run).
4. Close, then reopen the solution.
5. Tools > Library Package Manager > Manage Nuget Packages For Solution > Installed Packages.
6. The files Newtonsoft.Json.dll and Newtonsoft.Json.xml will have been copied to the solution root folder.

This is in VS2012, using NCrunch 1.46 (I also rolled back and tested with 1.45), NuGet Package Manager 2.6, Windows 8.

I have tested this repeatedly in numerous new, clean solutions and have been able to reproduce consistently.

In the example, a couple of files are no real issue. However, in large solutions the number of files copied to the root become disruptive and cause problems with source control. Steps 4 and 5 are part of daily workflow. Interacting with NuGet via the console while NCrunch is running seems to have the same effect.

Thanks.
Remco
#2 Posted : Tuesday, August 20, 2013 4:09:49 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,987

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi, thanks for reporting this issue.

I haven't been able to reproduce the exact problem you've described above, but looking into what is happening here, I think I can construct a fairly concrete theory on what is happening.

It seems that when the Nuget package manager is accessed, it touches the projects within the solution and triggers some kind of build logic to activate. Because the projects are marked as changed by Visual Studio, NCrunch reloads them and attempts to build them. This creates a situation where the Nuget build and NCrunch build overlap. The overlap creates all sorts of interesting race conditions that can skew build logic and cause files to be copied randomly to the wrong places.

A fix for this will be included in the next version of NCrunch.

For the time being, I recommend disabling NCrunch before accessing the Nuget package manager - as this will prevent the builds from overlapping.


Cheers,

Remco
1 user thanked Remco for this useful post.
mworley on 8/20/2013(UTC)
mworley
#3 Posted : Tuesday, August 20, 2013 11:49:49 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/20/2013(UTC)
Posts: 3
Location: Australia

Thanks: 1 times
Hi Remco

Thank you very much for this - great news and excellent support!

Disabling NCrunch when working with NuGet will be no problem at all in the short term.

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