Prerequisites for exposing metro applications to the Windows Logo Certification GUI application?

提議的解答 Prerequisites for exposing metro applications to the Windows Logo Certification GUI application?

  • mercredi 19 octobre 2011 15:25
     
     

    I wanted to put a sample metro application I developed through the Windows Logo Certification GUI application (wslkui.exe) however it does not appear in the applications list after I have selected "Validate Metro style App".

    For reference I have built and deployed the application from Visual Studio; also it appears in my start screen.

    I have noticed that some of the metro app samples from the dev center have the same issue... After being built and deployed only some of them appear in the wslkui application. This doesn't seem to be limited to the programming language that the samples are written in. I've seen this occur with samples written in C++  / C# / (HTML5 / JS).

    What are the prerequisites for a metro app to appear in this list so that I can run it through its paces?

    Is there a way I can force the testing of the application even if it doesn't appear in the list? Perhaps using the none GUI version (wslk.exe)? I looked into this briefly, however the command line help suggested that when running the wslk against a "tailored" app you provide a packagename rather than a particular file or set of files. Presumably this means that the none GUI version will be searching for the app in the same list that the GUI version presents to the user.

    Also for reference I've tried building and deploying the app in all configurations, just in case the wslkui bundled with the Windows Developer Preview can only see exposed applications of a certain architecture, for example x86.


    Liam

Toutes les réponses

  • mercredi 19 octobre 2011 17:26
    Modérateur
     
     

    Hi Liam,

    Intersting--we will look into this.  What happens if you run the application after deploying it?  Are you then able to see it in the Windows App Certification Kit tool? 

    There isn't a way from the GUI to force testing of an app that isn't registered with the system.  The app must be registered with the system and the developer license attached to it.  Deploying the app should get it registered, but running it definitely will.

    Sincerely,

    Dan

    • Proposé comme réponse Matthew_Thepc samedi 13 octobre 2012 04:05
    • Non proposé comme réponse Matthew_Thepc samedi 13 octobre 2012 04:05
    •  
  • jeudi 20 octobre 2011 08:48
     
     

    Hi Dan,

    I'm afraid running it doesn't seem to have alleviated the issue. I've tried running it from both Visual Studio (debugging) and launching it from the start screen.

    You mentioned that it's not possible to force the testing of an app that isn't registered with the system from the GUI client. Is it possible to do that with the non GUI client or was I correct in my presumption that the non GUI client uses the same mechanism for locating a tailored application as the GUI client?

    Thanks for your help.


    Liam
  • jeudi 20 octobre 2011 22:47
    Modérateur
     
     

    Hi Liam,

    They use the same underlying mechanism.  You may need to uninstall the app and then re-build/deploy it.  There is an app package interface and class that give you programmatic access to managing Metro style applications.  You could call these from an app or PowerShell script similar to this one for the developer license APIs.

    Sincerely,

    Dan

  • mercredi 26 octobre 2011 14:57
     
      A du code
    Hi Dan,
    First of all sorry for my tardiness in responding.
    The app package and classes that you suggested I look at are within the assembly Windows.Management.Deployment.dll and I cannot seem to find a none "native image" of this assembly in the Windows Developer Preview or the SDK for that matter. Furthermore the relevant related functions in the PackageManager class are instance methods so using DllImport mechanism to utilise this becomes incredibly difficult and I was unable to get past the standard "The type or namespace name 'PackageManager' could not be found (are you missing a using directive or an assembly reference?)" errors. Also note I did attempt to use Add-Type with the -Path switch however this did not yield successful results, only the following error message:
    PS C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools> Add-Type -Path C:\Windows\assembly\NativeImages_v4.0.30319_32\Windows.Man64a5d1b0c\dae6c0dec596817b5d1909fd8e873003\Windows.Management.Deployment.ni.dll
    Add-Type : Could not load file or assembly 'file:///C:\Windows\assembly\NativeImages_v4.0.30319_32\Windows.Man64a5d1b0c\dae6c0dec596817b5d1909fd8e873003\Windows.Management.Deployment.ni.dll' 
    or one of its dependencies. The module was expected to contain an assembly manifest.
    
    Another route I attempted was to create a C++ WinRT (CX) component DLL which utilised PackageManager class / members and then have a standard desktop application access call this over COM, displaying whatever was returned. I was actually able to get a this compiling and running however experienced the following runtime error when attempting to run the PackageManager class consrtuctor:
    A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in WindowsFormsApplication1.exe
    
    Additional information: The process has no package identity. Call this API only from immersive applications. (Exception from HRESULT: 0x80073D54)
    Presumably this means that this particular class and functionality is something that isn't going to be exposed to the desktop "none tailored" world and by extension probably means one couldn't access this via PowerShell like the developer license APIs?
    Finally I have also attempted to simply access this functionality via a Metro / Tailored style app. I actually did this first but it seemed easier to write about everything in reverse chronological order. I made a simple C# metro app that on a button press attempted to instantiate a PackageManager class, run FindPackages(), enumerated through all the returned packages and dump their Id.FullName properties to a textblock. This provided me with the following error at runtime:
    System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
       at System.__ComObject.WinRTDefaultConstructor()
       at MetroPackages.MainPage.FindMetroPackages() in c:\devt\metro\MetroPackages\MetroPackages\MainPage.xaml.cs:line 27
    Please note that added all capabilities in the application's appxmanifest. Did I miss anything relating to this? Possibly a declaration in the appxmanifest?
    I also failed to mention in my previous posts that I had already "uninstalled" and redeployed the tailored applications when I was originally attempting to get them to appear in the wslkui.exe list of tailored applications prior to making my original post. I did this via the Win8 start screen by right clicking on the app tiles and then the context sensitive "uninstall" option that appears. This is probably worth noting even if this approach isn't as thorough as the programmatic approach in the develop preview, although I'd expect this method simply calls the same code anyway.
    Thanks again,

    Liam
    • Modifié Liam Flanagan mercredi 26 octobre 2011 14:59 Tried to fix formatting...
    •  
  • mercredi 26 octobre 2011 21:55
    Modérateur
     
     

    Hi Liam,

    Thank you for the updated information.  In the mean time, we were able to get a machine into a similar state where we could build and deploy the application and could run it in both Visual Studio and from the start screen, but it wouldn't show up in the App Certification Kit UI (wslkui.exe).  We are currently investigating why this is so. 

    Here is a blog entry with a PowerShell script that automates the package enumeration and such; I should have found this sooner for you:  http://blogs.msdn.com/b/howardk/archive/2011/09/14/appx-powershell-cmdlets.aspx.

    While we have a machine that reproduces this issue, we want to make sure we get the right info including your log files.  Would you please also submit feedback using the Windows Feedback Tool from the Connect Site associated with your Windows Developer Preview program? If you’re an MSDN subscriber, the information on how to join the Connect program is included on the download page where you installed Windows Developer Preview.  There’s a link to the Connect site and an invitation code that you can click on to join using a Windows Live ID account. If you’re not an MSDN subscriber follow this limited use link to join the Connect program and then follow the steps here

    I'm hoping we'll find some steps that you can take to resolve this on your machine.  We'll keep you posted.

    Sincerely,

    Dan

     

     

  • jeudi 27 octobre 2011 10:43
     
     

    Hi Dan,

    That powershell cmdlet is really useful, thanks for the reference. To be honest I should have been able to find it myself, especially since it's utilised in the Add-AppxDevPackage.bat created by VS Developer Preview when you create an app package (.appx, via Project->Store->Create App Package). Oh well no point in dwelling =).

    For your information I've created and submitted a fairly comprehensive example of this issue using the feedback tool as requested.

    Furthermore I'd like to just confirm that the problem still persists even when you use the appx cmdlets to remove and deploy the tailored app. Out of curiosity, is there any way I can add further details to the feedback I've submitted? For example I didn't add information about the problem persisting even when using the appx cmdlets to the report sent. 

    Regards,


    Liam
  • jeudi 27 octobre 2011 20:37
    Modérateur
     
     

    Hi Liam,

    Yes, we saw the problem persist even after using the appx cmdlets to remove and redeploy the Metro style app.  So, you're seeing just what we saw.  Thank youi for confirming this.

    There is a way to edit an existing feedback item.  After you log into Connect, choose "Dashboard" from the top menu, then click the item you want to edit, then you can choose "Edit this item" or "Attach a file".

    Again, many thanks for filing a detailed report!

    Sincerely,

    Dan

  • vendredi 28 octobre 2011 10:19
     
     

    Hi Dan,

    I checked the Windows Ecosystem Readiness Program homepage in my Connect dashboard and it doesn't seem to know about the feedback that I've sent using the Send Feedback Tool.

    Presumably it can take some time for the web client to display this information? I only uploaded sent the feedback yesterday so I'll hang fire for a while. I just thought I'd mention it in case I've done something wrong and might need to re-submit the content.

    Regards,


    Liam
  • lundi 31 octobre 2011 21:45
    Modérateur
     
     

    Hi Liam,

    Thanks for your reply.  You should be able to see the feedback you submitted; if you can't, I would assume it didn't get saved somehow.  If you have a copy of what you already submitted, please please resubmit it.  The worst that can happen is that we get two reports.  I'm sorry for this extra step, but it is highly appreciated!

    Sincerely,

    Dan

  • mercredi 16 novembre 2011 00:06
     
     

    I got the same issue here as well. the wslkui.exe won't show the metro app I just created.

    Any update to this issue and work arounds?

    Thanks,

    Jennifer


    Jennifer
  • mercredi 16 novembre 2011 00:17
    Modérateur
     
     

    Hi Jennifer,

    We don't have an update on this.  As far as a workaround, I suspect that refreshing the system will reset this, but I don't know for sure.  If you do so please let us know how it works.

    --Rob

  • mercredi 16 novembre 2011 08:38
     
     

    I did try this but it didn't work in my case. Maybe you'll have more luck Jennifer.


    Liam
  • mardi 13 décembre 2011 07:23
     
     

    Hi all,

      I got the same problem, too.  

      I have ever run the certification tool once, and it works well. However, after that, I cannot find my app in the list anymore.

      Is there any update? Thanks.

     

  • mercredi 14 décembre 2011 01:54
    Modérateur
     
     

    Hi ChikC,

    Once a system is in this state there is no known workaround.

    --Rob

  • mercredi 14 décembre 2011 12:39
     
     

    Presumably doing a clean install of the OS or one of the new restores might alleviate the issue? Obviously backup your personal documents first…


    Liam
  • mardi 27 décembre 2011 14:53
     
     
    I have the same question, I don't known why, but when I do it on another PC, it works!!!My App can be seen in the applications list. The code is all the same check out from svn server.
    Windows Developer Preview 64bit
    Visual Studio 11 Developer Preview
    • Modifié linyehui mardi 27 décembre 2011 14:55
    •  
  • vendredi 2 mars 2012 00:07
     
     

    Has anyone had a chance to try this out using the Consumer Preview? Are you still running into the same issue? Note that with Visual Studio 11 Beta, you are now able to run the windows app certification kit directly as part of building a package in Visual Studio.

    Thanks.

  • mardi 20 mars 2012 12:56
     
     

    A search led me here. Yes, I am having this problem on the Consumer Preview. I am just trying some sample code, and found this problem. Under the Microsoft ID account, App Cert Kit can find none of my test programs or even downloaded apps, but only the preinstalled apps.

    Interestingly, when I switch to the local Administrator account, App Cert Kit can work. It runs till the end, and it always reports errors, because the Metro style app cannot start under the Administrator account.

  • mercredi 21 mars 2012 00:36
     
     Réponse proposée

    Hi Adah,

    The App Cert Kit will display only the apps that were installed for the current user. Did you install your test apps while logged in using the Microsoft ID account? If no, then you will have to install the apps after you login using Microsoft ID account. If you have already done that and still see this problem then please try the following:

    1) Open a powershell window (hitting Start and typing 'powershell' will show you shortcut to "Windows PowerShell")
    2) Do a “Get-AppxPackage > out.txt”
    3) Open out.txt and look at InstallLocation field of all the apps installed.
    4) For the apps whose InstallLocation is blank, do a “Remove-AppxPackage <packageFullName>”.

    Once you have removed all the apps without InstallLocation, re-run the app cert kit.

    Thanks,

    Salil

  • jeudi 22 mars 2012 03:27
     
     

    I reinstalled Windows 8 Consumer Preview. This time I created a local administrator account that is not "Administrator". Everything is OK now.

    I think the problem was that the Microsoft ID account did not have the administrator privilege. App Cert Kit requires that, and when it got the escalated rights, it could "see" only the local "Administrator", but not my account.

  • mercredi 2 mai 2012 14:20
     
     
    I'm trying to access functionality offered by the packagemanager using the assembly Windows.Management.Deployment.dll .... but as far as I can see my Win8 Consumer preview install doesn't have this assembly. Is this possible...? In particular I'm looking at SetPackageState()
  • dimanche 1 juillet 2012 15:31
     
     
    I'm trying to access functionality offered by the packagemanager using the assembly Windows.Management.Deployment.dll .... but as far as I can see my Win8 Consumer preview install doesn't have this assembly. Is this possible...? In particular I'm looking at SetPackageState()

    look here:

    http://iinspectable.wordpress.com/2012/06/12/how-to-call-winrt-apis-from-c-desktop-applications-list-the-installed-metro-packages/