Why is LINQPad directly referencing (and locking) my assemblies
Options
I added some references to my assemblies in My Extensions, so they're automatically available to all queries. "Do not shadow assembly references" is false - I never changed it. After I run some stuff in LINQPad I cannot rebuild my assemblies in Visual Studio - the files are in use. Using Process Hacker I can see that they're open by LINQPad.UserQuery.exe (handle types File, Section and Mapped Image). I can reproduce this every time.
On occasion I've even seen some assemblies opened by LINQPad.exe, though I cannot reproduce that.
Why is this happening and how do I stop it? I want to be able to rebuild my assemblies easily.
On occasion I've even seen some assemblies opened by LINQPad.exe, though I cannot reproduce that.
Why is this happening and how do I stop it? I want to be able to rebuild my assemblies easily.
Comments
-
Also, LINQPad.UserQuery.exe sometimes continues to lock the assemblies even after I press Control-Shift-F5. That's not reliably reproducible, but it seems to happen when there are some compilation errors in My Extensions.
-
Thanks for reporting. I've found the cause of the problem and will include a fix in the next beta build.
-
Great, thanks! Could you update this thread when it's release, please?
-
-
This beta version (5.06.02) still has LINQPad.UserQuery.exe directly opening my assemblies. (Note that they're loaded via My Extenions, not directly by the query.)
So far I haven't run into the problem where LINQPad.exe opens the assembly or where it fails to unload. I'll update this thread if I do. -
Where abouts on your filesytem is the assembly located?
LINQPad won't shadow the assembly if it's in Program Files or your windows directory.
Also, if you attach Visual Studio to the LINQPad or LINQPad.UserQuery process, VS will lock the .pdb file, preventing your assembly from being rebuilt. -
It's a normal directory, "C:\G it\....." LINQPad is also under that directory, so I reference the assemblies using a parent paths, like "..\..\Build\....."
I haven't attached VS or any other debugger to LINQPad.