Visual Studio 2015 locks DLL during debugging

Shea

I have 3 C# projects A, B, and C. Both A and B reference C. The references to C from A and B are set to "Copy Local" implying that after C is built to C.dll (in the output directory of C), it is copied to the output directory of A or B (whichever is being compiled)

I have 2 solutions, SA and SB. SA contains A and C and SB contains B and C. I launch 2 instance's of Visual Studio 2015. I open SA in one instance and SB in the other.

I am finding that if I Start Debugging (F5) A from SA, and then (while A is still debugging), make a change to C from SB and attempt to compile SB, I receive a compile error stating that C.dll can not be over-written because it is in use by another process (the instance of devenv.exe which is running SA).

This does not make sense to me because after compiling C to C.dll and copying to the output directory of A, Visual Studio should release the lock on the file.

I have verified (via the Modules window in SA) that the version of C.dll loaded is the one which has been copied to the output directory of A.

This started occurring yesterday when I began using Visual Studio 2015 (instead of Visual Studio 2013).

Does anyone have any ideas? My current solution is to run SA via CTRL-F5 (start without debugging), but this becomes annoying when I want to run SA and SB in debug mode simultaneously.

Thanks.

UPDATE

I did some research into why the "Edit and Continue" feature could cause the described behavior, and according to this page https://msdn.microsoft.com/en-us/library/ms164926.aspx> Edit and Continue allows one to make source code modifications while in a debugging session and have the results take effect without stopping debugging, recompiling, and restarting the debugging session (what a gnarly problem that must have been). With that feature enabled, Visual Studio might be required to recompile any dependent DLL's at any time which explains the lock.

Matmok

I had the same problem. I changed my VS2015 settings and it seems the problem is gone:

  • disabled Options\Debugging\Edit and continue
  • -Options\Sourcecodemanagement from TFS to none-
  • -disabled Options\Debugging\Diagnostictools while debugging-

Not sure wich one caused the locking, but i suspect the diagnostictools wich I did not have in VS2013. (The settings names I translated from German to english, don't know if it is exactly how they are called in english VS version.)

Edit: As researched by Shea it was the Edit-And-Continue feature that locked the DLL.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Visual Studio 2015 moves undocked windows during debugging

From Dev

Visual Studio 2015 Debugging vs Not Debugging Views

From Dev

Visual Studio 2015 Debugging not stopping at breakpoints

From Dev

Visual studio 2015 not responding while debugging

From Dev

Is there Visual Studio 2015 Debugging step skipping?

From Dev

Visual studio 2015 debugging with older dlls

From Dev

Visual Studio 2015 debugging annoying boxes

From Dev

Visual Studio 2015 intellisense not appearing during debug

From Dev

Visual Studio 2015 intellisense not appearing during debug

From Dev

Reference dll without version visual studio 2015

From Java

Visual Studio 2017 is too slow during building and debugging

From Dev

Sudden Bad Request - Invalid Verb on during debugging Visual Studio

From Dev

Cannot connect to Oracle database during Visual Studio debugging

From Dev

Where is user.config loaded from during Visual Studio debugging

From Dev

How to make Visual Studio go into the #define during debugging?

From Dev

visual studio 2010 shows const int 0 during debugging

From Dev

I'm getting strange error during debugging in Visual Studio

From Dev

Debugging with specific browser in Visual Studio 2015 not possible anymore?

From Dev

Debugging Typemock test case in Visual Studio 2015 throws TypeMockException

From Dev

Classic asp "Application debugging is disabled" in visual studio 2015

From Dev

Visual Studio 2015 Debugging: Can't expand local variables?

From Dev

Visual Studio 2015 diagnostics tool does not support current debugging configuration

From Dev

Debugging Cordova App (android) with Visual Studio 2015 New Emulator

From Dev

Visual Studio 2015 does not hit breakpoint when debugging WF workflow

From Dev

Debugging with specific browser in Visual Studio 2015 not possible anymore?

From Dev

console debugging visual studio 2015, like Xcode feature

From Dev

Debugging Appcelerator Windows Phone App with Visual Studio 2015

From Dev

Stop debugging in Visual Studio 2015 after the browser is closed

From Dev

Query-string in ASP.NET in Visual Studio 2015 for debugging?

Related Related

  1. 1

    Visual Studio 2015 moves undocked windows during debugging

  2. 2

    Visual Studio 2015 Debugging vs Not Debugging Views

  3. 3

    Visual Studio 2015 Debugging not stopping at breakpoints

  4. 4

    Visual studio 2015 not responding while debugging

  5. 5

    Is there Visual Studio 2015 Debugging step skipping?

  6. 6

    Visual studio 2015 debugging with older dlls

  7. 7

    Visual Studio 2015 debugging annoying boxes

  8. 8

    Visual Studio 2015 intellisense not appearing during debug

  9. 9

    Visual Studio 2015 intellisense not appearing during debug

  10. 10

    Reference dll without version visual studio 2015

  11. 11

    Visual Studio 2017 is too slow during building and debugging

  12. 12

    Sudden Bad Request - Invalid Verb on during debugging Visual Studio

  13. 13

    Cannot connect to Oracle database during Visual Studio debugging

  14. 14

    Where is user.config loaded from during Visual Studio debugging

  15. 15

    How to make Visual Studio go into the #define during debugging?

  16. 16

    visual studio 2010 shows const int 0 during debugging

  17. 17

    I'm getting strange error during debugging in Visual Studio

  18. 18

    Debugging with specific browser in Visual Studio 2015 not possible anymore?

  19. 19

    Debugging Typemock test case in Visual Studio 2015 throws TypeMockException

  20. 20

    Classic asp "Application debugging is disabled" in visual studio 2015

  21. 21

    Visual Studio 2015 Debugging: Can't expand local variables?

  22. 22

    Visual Studio 2015 diagnostics tool does not support current debugging configuration

  23. 23

    Debugging Cordova App (android) with Visual Studio 2015 New Emulator

  24. 24

    Visual Studio 2015 does not hit breakpoint when debugging WF workflow

  25. 25

    Debugging with specific browser in Visual Studio 2015 not possible anymore?

  26. 26

    console debugging visual studio 2015, like Xcode feature

  27. 27

    Debugging Appcelerator Windows Phone App with Visual Studio 2015

  28. 28

    Stop debugging in Visual Studio 2015 after the browser is closed

  29. 29

    Query-string in ASP.NET in Visual Studio 2015 for debugging?

HotTag

Archive