Wednesday, March 14, 2012 10:44 PM
When I try to deploy metro style app from VS11 Beta, i'm getting following error.
Error : DEP0740 : Access denied. This may be because the application state is locked. A possible cause is "RuntimeBroker.exe" retaining a lock on the storage data for your application. The workarounds are (1) Wait for the "RuntimeBroker.exe" to quit. This may take up to 6 minutes. (2) Kill the "RuntimeBroker.exe" process and redeploy. (Note that option (2) may cause loss of data.)
Error 2 Opening file from location: F:\...bin\Debug\AppX\AppxManifest.xml failed with error code: 0x80070005. Access is denied.
Any idea, why?
- Moved by Rob CaplanMicrosoft Employee, Moderator Wednesday, March 14, 2012 10:47 PM (From:Building Metro style apps with C# or VB )
Wednesday, March 14, 2012 11:20 PMModerator
are the project files encrypted out of curiosity? In explorer, the filename is green in color or you can right click on the file and select properties, in the general tab, attributes section, click on advanced, checkbox "Encrypt contents to secure data"
Does this reproduce consistently?
Wednesday, March 14, 2012 11:37 PM
Project files are not encrypted.
"Encrypt contents to secure data" is not checked, it worked few times and seeing this issue consistently.
Thursday, March 15, 2012 12:06 AMCopied whole project to My Documents folder and rebuild, issue is gone. Strange!
Monday, April 09, 2012 1:47 PMThis worked for me as well, but is only a temporary solution since it's outside the directory structure for my git repository. There needs to be a quick answer for those of us who have an existing project hierarchy where the Metro project is only one component. As it is, I'm going to have to install some kind of folder sync tool to make sure the files exist where they need to be.
Wednesday, April 11, 2012 10:46 PMI ran into the same problems It appears to be a permission problem on the directory. For some reason my git clone doesn't set the properties properly so that Visual Studio Express 11 Beta can execute on the folder. While this isn't recommended, I gave "Everyone" Full control to the directory.
Thursday, April 19, 2012 12:09 AMThe proper solution is to give the SYSTEM account full access to the top level directory containing your project. You can do this by right clicking on the directory in Windows Explorer > Properties menu > Security Tab > Edit button > Add button > type SYSTEM in the edit field > Check Names button > OK button on all remaining dialogs.
Thursday, April 19, 2012 1:30 PMThank you, this worked for me. Now the project can live where it belongs.
Thursday, July 19, 2012 10:01 AM
I am facing same problem.Even i have copied project in My Document folder but no luck.
varsf = awaitPackage.Current.InstalledLocation.GetFileAsync(@"ContactXML.xml");
using(varstream = awaitsf.OpenAsync(FileAccessMode.ReadWrite)).
Access denied issue.
Thursday, July 19, 2012 1:11 PM
That's a different error. You can't open files for read/write in the package install location, you can only read. If you need to write, you will first have to copy the file to local storage, (Windows.Storage.ApplicationData.Current.LocalFolder, etc.)
- Edited by Anatoly_LP Thursday, July 19, 2012 1:12 PM