title: Win8: Registration of the app in the layout folder ... failed
body: <p>Noob warning. I'm really new to Windows dev tools. </p>
  
  <p>I've got the latest Win8 RC installed, and got VS 2012 RC for it as well. Now I'm trying to create a Metro-style application (C#), but running into problems when executing tests from VS. The error message is:</p>
  
  <pre><code>Error : DEP0700 : Registration of the app in the layout folder "C:\&lt;FOLDER&gt;" failed. 
  
  error 0x80070005: Failed to set access rights to \\?\C:\&lt;FOLDER&gt;
  
  Failed to activate Metro style unit test executor. Error : The parameter is incorrect.
  </code></pre>
  
  <p>If trying to run the unit tests from the command line using <em>vsttest.console.exe</em>, initially it failed because of an untrusted root certificate. The remedy was to add the generated .cer-file using Certutil, and after that running unit tests from the command prompt worked as expected. </p>
  
  <p>However, Visual Studio still refuses to run the tests with the same error message. The *<em>\?*</em> in the path looks like invalid, but I don't have enough experience with VS to know whether it's normal or not. I also tried the instructions found <a href="http://social.msdn.microsoft.com/Forums/en-US/toolsforwinapps/thread/06b0434f-2fbc-403f-9c44-8aa2e4b1f555" rel="nofollow">here</a> and <a href="http://social.msdn.microsoft.com/Forums/en-HK/toolsforwinapps/thread/4d399046-e7fc-4dc2-9aae-51a9e5a765da" rel="nofollow">here</a>, but without any use. </p>
  
  <p>Running</p>
  
  <pre><code>Get-WinEvent -logname Microsoft-Windows-Appx* |Select-Object -first 10|Out-GridView
  </code></pre>
  
  <p>says that "The last successful state reached was PrerequiesitesCheced", but otherwise gives me more or less the same "Failed to set access rights" error as above. </p>
  
  <p>Some more background info: </p>
  
  <ul>
  <li>It's a shared (over vcs) project, and it runs fine on the other devs machine</li>
  <li>The signing certificate is not "mine", but since it runs from cmd I assume it could not be the root cause</li>
  <li>Tests are written using Visual Studios unit test framework, as e.g. NUnit didn't seem to work too well with Metro apps. </li>
  <li>The permissions in the directory should be fine, I checked that all files and dirs are owned by me, and have read/write access</li>
  <li>There has been another user on the laptop, and he's used VS, but the projects are not shared, and Application and signing IDs have been regenerated since. I also removed the username in my search for a solution for the problem.</li>
  </ul>
  
  <p>Has anyone got a similar situation, and managed to fix it somehow? Any help would be greatly appreciated. </p>