none
win8 stores上调用 PackageManager 的FindPackages,会报错! RRS feed

  • 问题

  •  报如下的错误   FindPackage eror: 拒绝访问。 (异常来自 HRESULT:0x80070005 (E_ACCESSDENIED))

    需要什么权限吗?


    PackageManager packageManager = new PackageManager();
     try
    {
        IEnumerable<Package> packages = (IEnumerable<Package>)packageManager.FindPackages();

    。。。

    }

    catch

    {

    ..

    }

    2014年4月18日 3:38

答案

  • 你好,请看说明文档(http://msdn.microsoft.com/en-us/library/windows/apps/windows.management.deployment.packagemanager.aspx),这是desktop下才可以使用的API,在Windows Store App中是无法使用的。

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    2014年4月18日 14:31
    版主