Win8: Registration of the app in the layout folder … failed

懵懂的女人 提交于 2020-01-03 14:13:08

问题


Noob warning. I'm really new to Windows dev tools.

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:

Error : DEP0700 : Registration of the app in the layout folder "C:\<FOLDER>" failed. 

error 0x80070005: Failed to set access rights to \\?\C:\<FOLDER>

Failed to activate Metro style unit test executor. Error : The parameter is incorrect.

If trying to run the unit tests from the command line using vsttest.console.exe, 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.

However, Visual Studio still refuses to run the tests with the same error message. The *\?* 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 here and here, but without any use.

Running

Get-WinEvent -logname Microsoft-Windows-Appx* |Select-Object -first 10|Out-GridView

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.

Some more background info:

  • It's a shared (over vcs) project, and it runs fine on the other devs machine
  • The signing certificate is not "mine", but since it runs from cmd I assume it could not be the root cause
  • Tests are written using Visual Studios unit test framework, as e.g. NUnit didn't seem to work too well with Metro apps.
  • The permissions in the directory should be fine, I checked that all files and dirs are owned by me, and have read/write access
  • 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.

Has anyone got a similar situation, and managed to fix it somehow? Any help would be greatly appreciated.


回答1:


I solved this by changing the package name by app manifest




回答2:


In my case it turned out to be the fact that I have every folder encrypted. To run the application I had to disable encryption for the complete solution folder (and subfolder/files).


How to:

First right click the folder then properties:

Then clicked advanced:

Then deselect

Encrypt contents to secure data

At last, click apply. You are then asked where to apply the changes to. Select

Apply changes to this folder, subfolders and files

Now you are done.




回答3:


We never managed to figure out a reason for this, and in order to save time I finally wiped the whole environment, and ended up re-installing windows. I'm using a dedicated machine for this, and MS has made the installation process very easy, so this was not a big deal. Problems with the pre-release I guess, because I haven't encountered a similar problem anymore, and neither has anyone else on my team.



来源:https://stackoverflow.com/questions/11047277/win8-registration-of-the-app-in-the-layout-folder-failed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!