开发者

After removing a Visual Studio Project from a Solution cannot delete the folder in windows [closed]

开发者 https://www.devze.com 2023-01-05 09:40 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.

Closed 1 year ago.

Improve this question

When I 'Remove' a project from a Visual Studio solution I often want to delete it. As some other posts on SO have mentioned this does not delete the physical project from the file system.

The larger problem here is that after removing the project form the solution开发者_开发技巧 when I attempt to delete the directory from windows Explorer or the command line it will not delete because Visual Studio still has it locked.

Usually, I am able to resolve this by exiting Visual Studio then doing the delete. But, occasionally I have had to log off and back on before being able to delete the directory.

I have had this problem in VS2008, VS2010 and probably the earlier versions as well.

My question is, if there is no way to do this delete from inside Visual Studio, is there at least a way to get it to let go of the file(s) that it has locked?


You could use Process Explorer, which allows you to close specific handles a program is holding onto. Just open it up, find the Visual Studio process (devenv.exe), use View/Lower Pane View/Handles, locate the proper handle in the lower pane, right-click it and choose "Close Handle". May not be ideal, but sometimes this is better than closing your app or killing the process.


Besides devenv.exe which goes away when you close Visual Studio, you might try killing mspdbsrv.exe. It will restart as soon as an instance of Visual Studio needs it.


  1. Open Task Manager ( Ctrl + Shift + Esc )
  2. Find "adb.exe" and click End Task
  3. Simply delete the folder.

Like in the image image1

0

精彩评论

暂无评论...
验证码 换一张
取 消