That's all, I talked with the VS team in BUILD and solved the problem. Thanks Kieran Mokford! It seems that there are several scenarios where the processes are not completely closed, and they can hold layout files and potentially other files during the development workflow.
Three senaria that I know about now:
- When you stop debugging, the user interface of the application is no longer displayed, but WWAHost.exe is still working (Javascript applications), and this has access to the files.
- If you run Simulator, you can start a session that may cause other problems with accessing the file (and not the ones that I described in this post)
- If you use a data exchange agreement with data, it uses brokerage services and this does not always close.
If you are using problems with locked files that you are trying to create or deploy, I would recommend downloading Process Explorer from sysinternals and see which process is stored in your files. Then run it in the task manager.
Note. My problem was number 1. I was creating a JavaScript application and the WWAHost process (Windows Web Application Host) was still running.
source share