none
[UWP]Package Sanity Test RRS feed

  • Question

  • Okay so I was publishing an app on the Store and the certification failed. They mentioned it got rejected cause the app was crashing when launching it. 
    So I did a test using Windows App Certification Kit and  I was passed overall but when looked at my report and scrolled down I saw I failed in Package Sanity Test's Blocked Executable part and received the following error:

            • Error Found: The blocked executables test has detected the following errors:
              • File Notepad1\Notepad1.exe contains a reference to a "Launch Process" related API System.Diagnostics.Process.Start
          • File Notepad1.exe contains a blocked executable reference to "CdB".
      • File SQLite-net.dll contains a blocked executable reference to "cmd".
    • Impact if not fixed: Launching executable files is restricted on Windows 10 S systems. Apps that rely on this capability might not run correctly on Windows 10 S systems.
    • How to fix: Identify which of the flagged entries represent a call to launch an executable file that is not part of your app and remove those calls. If the flagged files are part of your application, you may ignore the warning.

    Can someone tell me if it's necessary to fix this error for my app to get the certification, cause I read somewhere online that Package Sanity Test are not mandatory.
    So, do I fix these errors cause I would have to remove few key features of my app just so that it works on Windows S systems?

    What do I do?

     
    Wednesday, August 14, 2019 6:51 PM

Answers

  • Hi,

    First, UWP apps only allow to open their own "packaged" executables. Please make sure the Notepad1.exe is packaged inside the UWP package.

    Second, it seems like that you are using System.Diagnostics.Process.Start, right? This API is not supported in UWP apps. To open the executables inside the UWP packages. you need to use FullTrustProcessLauncher Class

    Declare the exe file you need to launch and add the Restricted capability -"runFullTrust " in the manifest file.

    Like this:

    <Capabilities>
        <rescap:Capability Name="runFullTrust"/>
      </Capabilities>
      <Applications>
           …
          <Extensions>
            <desktop:Extension Category="windows.fullTrustProcess" Executable="fulltrustprocess.exe">
            </desktop:Extension>
          </Extensions>
        </Application>
      </Applications>

    Then you could call it in the code :

      await FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync();

    Please note that due to security reason, runFullTrust capability is a restricted capability. The use of these capabilities is highly restricted and subject to additional Store onboarding policy and review. Note that you can sideload apps that declare restricted capabilities without needing to receive any approval. Approval is only required when submitting these apps to the Store.

    For more information, please refer : Restricted capabilities

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Jayesh Betala Thursday, August 15, 2019 5:34 PM
    Thursday, August 15, 2019 2:29 AM
    Moderator
  • Hi,

    Where you call the Process.Start() method? Just call that in the same place. 

    Note: to call this line of code, please make sure you had added the Microsoft desktop extension to the references of you UWP app.

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Jayesh Betala Friday, August 16, 2019 9:04 AM
    Friday, August 16, 2019 4:06 AM
    Moderator

All replies

  • Hi,

    First, UWP apps only allow to open their own "packaged" executables. Please make sure the Notepad1.exe is packaged inside the UWP package.

    Second, it seems like that you are using System.Diagnostics.Process.Start, right? This API is not supported in UWP apps. To open the executables inside the UWP packages. you need to use FullTrustProcessLauncher Class

    Declare the exe file you need to launch and add the Restricted capability -"runFullTrust " in the manifest file.

    Like this:

    <Capabilities>
        <rescap:Capability Name="runFullTrust"/>
      </Capabilities>
      <Applications>
           …
          <Extensions>
            <desktop:Extension Category="windows.fullTrustProcess" Executable="fulltrustprocess.exe">
            </desktop:Extension>
          </Extensions>
        </Application>
      </Applications>

    Then you could call it in the code :

      await FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync();

    Please note that due to security reason, runFullTrust capability is a restricted capability. The use of these capabilities is highly restricted and subject to additional Store onboarding policy and review. Note that you can sideload apps that declare restricted capabilities without needing to receive any approval. Approval is only required when submitting these apps to the Store.

    For more information, please refer : Restricted capabilities

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Jayesh Betala Thursday, August 15, 2019 5:34 PM
    Thursday, August 15, 2019 2:29 AM
    Moderator
  • await FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync();

    where do i call this function in the code? which part?

    Thursday, August 15, 2019 5:45 PM
  • Hi,

    Where you call the Process.Start() method? Just call that in the same place. 

    Note: to call this line of code, please make sure you had added the Microsoft desktop extension to the references of you UWP app.

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Jayesh Betala Friday, August 16, 2019 9:04 AM
    Friday, August 16, 2019 4:06 AM
    Moderator
  • I think you don't know about this.

    My app is not an UWP app

    It's a windows form application. I create a package using Visual Studios and then I create a package from the Project->Store->Create App Packages.

    Then I submit it to the store.

    I followed these steps and was able to publish my first developed app 'Word 2 PDF Converter' 2 days ago.

    But I got this error in my Package Sanity Test. And I've been trying for the last 2 days to get this app published. I even removed the functions/features in my application and then performed the test in Windows App Certification Kit but i still failed in the Package Sanity Test with the same error as before.

    Please help me!!

    This project is really important to me, and I really want to see it in the store just like my other app.


    Friday, August 16, 2019 9:55 AM