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

Notification

Icon
Error

NCrunch locks folders
ernow
#1 Posted : Friday, May 18, 2012 9:19:21 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/18/2012(UTC)
Posts: 2
Location: Home

Thanks: 1 times
First of all: great work! I really like this and can't help but wonder why Microsoft did not include it.

I noticed a 'bug': when NCrunch is running it is impossible to rename a folder in a project.

A 'work-around' is to temporarily disable NCrunch.
Remco
#2 Posted : Saturday, May 19, 2012 12:17:44 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
Hi, thanks for posting and I'm glad your enjoying NCrunch!

NCrunch will only perform builds and run tests within a workspace it has created for itself, so if you're experiencing file locking problems inside your solution, there is a high likelihood that you have absolute file path references somewhere in your solution that are pointing to a fixed part of your drive (and within the folder you are trying to rename).

When using NCrunch, make sure that ALL file references within your source code are using relative paths. One way you can test for this is by closing down your IDE, renaming your solution folder, then reloading your IDE and trying to build/run tests.
ernow
#3 Posted : Saturday, May 19, 2012 7:25:50 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/18/2012(UTC)
Posts: 2
Location: Home

Thanks: 1 times
Here is how to reproduce what I am seeing:
  1. Create a new Solution (console project)
  2. Enable NCrunch (background threads: 1, run tests in parallel, run tests automatically, let my tests run)
  3. Add a folder named Folder1
  4. Add a subfolder to Folder1 named Folder2
  5. Add a class to Folder2 named Class1
  6. Try to rename Folder1

Fix:
  1. Disable NCrunch
  2. Rename folder
  3. Enable NCrunch
Remco
#4 Posted : Saturday, May 19, 2012 11:11:55 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
Thanks, I've been able to reproduce the problem perfectly using the steps you've described above. It looks as though the methods NCrunch is using to watch files are interfering with nested rename operations.

I'll have a deeper look into this to see what I can do.


Cheers,

Remco
1 user thanked Remco for this useful post.
ernow on 5/19/2012(UTC)
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.035 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download