Visual Studio 11 Dev Preview: Cannot delete thumbs.db
I'm running into a serious issue with my development workflow in Visual Studio 11 Developer开发者_如何学C Preview under Windows 8 Developer Preview. Here's what I am seeing and other friends are seeing the same.
- Open Visual Studio
- Create New Blank Javascript Application
- Add very basic code to add a label (code and project doesn't seem to matter)
- Start With Debugging (Local Machine)
- Work Fine
- Stop Debugging
- Run Again
- Build Completes
Fails on Deploy Step
1>------ Build started: Project: MyProject, Configuration: Debug Any CPU ------ 1> MyProject-> C:\Users\mmoser\Documents\Visual Studio 11 \Projects\MyProject\MyProject\Debug\MyProject.build.appxrecipe 2>------ Deploy started: Project: MyProject, Configuration: Debug Any CPU ------ 2>Error DEP0500 : Cannot delete the folder "C:\Users\mmoser\AppxLayouts\MyProject.Debug.AnyCPU.mmoser" for the following reason: 2>The process cannot access the file 'Thumbs.db' because it is being used by another process. 2>One or more errors occurred. ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== ========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
Try to delete folder from Windows Explorer, same error
- Wait an anywhere from a few seconds to a minute-ish
- Try again and it works
This is very disruptive and I'm unable to continue development on my application. I am developing this with a friend and he is now seeing the same problem.
We are wondering if Visual Studio is not properly releasing access to the deployment folders?
Any help with this would be amazing! I am finding myself stuck and our project stalled...please help!
The thumbs.db file is a file created by Explorer and contains the thumbnail preview images.
Do you by chance have an Explorer window open in the AppX layout folder? The layout folder in this case is "C:\Users\mmoser\AppxLayouts\MyProject.Debug.AnyCPU.mmoser". Locked files prevent us from updating the layout folder, and hence deployment will fail.
FYI: I work for MS on the VS Pro team. If you continue to have an issue, please file a Connect bug, and we can take a look. (http://connect.microsoft.com/)
All, I spoke with the VS team at BUILD and resolved the issue. Thanks Kieran Mockford! It looks like there are several senarios where processes are not fully shut down and they can hold on to the layout files and potentially other files during the development workflow.
The three senarios I know of now are:
- When you stop debugging, your app's UI is not longer showing, but the WWAHost.exe is still runing (Javascript applications) and this has acess to the files.
- If you run the Simulator, you can have a session running that can cause other file access issues (not the onces I described in this post)
- If you're using sharing data data contract, it uses a brokerservice and this does not always get shut down.
If you are running into locked file issues what trying to build or deploy, I would recommend downloading Process Explorer from sysinternals and seeing what process is holding onto your files. Then kill it in Task Manager.
Note: My issue was #1. I was building a JavaScript application and the WWAHost (Windows Web Application Host) process was still running.
精彩评论