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

Notification

Icon
Error

NCrunch 2.23.0.2 continually prompts me to 'Save As' any open source files
SteveDunn
#1 Posted : Thursday, June 16, 2016 7:13:14 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/15/2012(UTC)
Posts: 4

Recently, when I close a source file, VS asks me to 'Save As', even though the file is part of my project. It also happens when I do a refactor in ReSharper or when I build the solution. When I press Save in the Save As dialog box, sometimes it saves and sometimes it says 'Cannot create a file when that file already exists'.

If I turn off NCrunch, the problem goes away.

I had this in the last version of NCrunch too - I updated to 2.23.0.2 to see if it fixed it, but it doesn't.

Any ideas? Unfortunately, I'm not in a situation to post my solution, but it's a C# .NET 4.5.2 solution consisting 7 projects, 2 are shared projects, 1 is a console app, and the others are library projects.
Remco
#2 Posted : Thursday, June 16, 2016 10:47:35 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 957 times
Was thanked: 1287 time(s) in 1194 post(s)
Hi,

If I were to guess, I would say that there is a process holding a lock on your source files.

There is nothing in NCrunch that would do this directly, but because NCrunch runs your tests and builds, and leaves test/build processes around after execution has completed, it's possible that user code is opening file locks on your foreground solution and the locks are being left open.

Check for absolute file references from your code to source files in your solution.

Enabling the Terminate Test Runner Tasks When All Test Execution Is Complete may help with this problem as it will cause test processes to be recycled faster, thus dropping any locks introduced by tests.
SteveDunn
#3 Posted : Monday, July 11, 2016 12:27:50 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/15/2012(UTC)
Posts: 4

Turns out it was Tortoise SVN (1.8.6.25415). Turning off NCrunch meant the Save As prompt (almost) completely disappeared (maybe one every 30 minutes), but with NCrunch on, it happened nearly every time I did a ReSharper Refactor or invoke a build.

Kill the Tortoise SVN process (TSVNCache and TortoiseProc) meant that these Save As prompts disappeared fully.
Remco
#4 Posted : Tuesday, July 12, 2016 1:47:22 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 957 times
Was thanked: 1287 time(s) in 1194 post(s)
Thanks for confirming! Maybe check if Tortoise have a fix for this .. I've usually found this project to be fairly reliable (historically anyway).
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.033 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download