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

Notification

Icon
Error

NCrunch locks DLLs
warappa
#1 Posted : Thursday, June 27, 2019 11:46:12 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/19/2016(UTC)
Posts: 5
Location: Austria

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Hi,

I'm developing NuGet packages and one issue with NCrunch is that it locks the DLLs. In my case I need to replace the DLLs in the NuGet cache folder (C:\Users\<username>\.nuget\packages\) for faster development and testing.
When I need to test a new version in another project which uses NCrunch, the files are locked. I need to disable NCrunch, copy the DLLs, and enable NCrunch again (or leave it off).

This problem bugs me since 2016 but I never reported it.

As Visual Studio can work with the DLLs without locking them: can NCrunch do the same?
Remco
#2 Posted : Thursday, June 27, 2019 10:02:39 PM(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 sharing this issue.

The problem here isn't actually NCrunch; it's the .NET runtime.

Packages that are referenced using Nuget are now stored in a global location (under the user profile) and the correct procedure for loading them is to do so from this location. In earlier versions we tried sandboxing these binaries but we ended up with endless problems because the runtime and its packages were simply not designed to work that way.

Something you can try is to turn on the terminate test runners when all test execution is complete setting. This will reduce the amount of file locking because the runner processes won't be left around after they've finished the test run.

Another option is to change your deployment model to avoid interacting with the packages in your user profile. Try referencing the binaries using the MSBuild <AssemblyReference> tag instead of <PackageReference>. This will prevent them from being loaded from a global location.
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