Unable to add printSupportSettingsUI Extensions for Print Support applications (PSA)

Amitha K 46 Reputation points
2022-12-19T23:05:33.79+00:00

I am getting errors and unable to use windows.printSupportSettingsUI extension is required for the Print support settings UI. I tried the below sample code provided by Microsoft's Print-support-app-design-guide documentation.

xmlns:printsupport="http://schemas.microsoft.com/appx/manifest/printsupport/windows10"
<Extensions>
<printsupport:Extension Category="windows.printSupportSettingsUI"
EntryPoint="PsaSample.PsaSettingsUISample"/>
</Extensions>

According to the MS document, To create a print support settings UI extension, your app must declare a uap4:Extension element with the category windows.printSupportSettingsUI in its package manifest. But Print support setting UI extension package is NOT included in uap4 instead included uap12

https://learn.microsoft.com/en-us/uwp/api/windows.graphics.printing.printsupport.printsupportsettingsuisession?view=winrt-22621

Could please help me with this and let me know the syntax to use windows.printSupportSettingsUI extension

Package.appxmanifest

<?xml version="1.0" encoding="utf-8"?>

<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:uap10="http://schemas.microsoft.com/appx/manifest/uap/windows10/10"
xmlns:uap12="http://schemas.microsoft.com/appx/manifest/uap/windows10/12"
xmlns:printsupport="http://schemas.microsoft.com/appx/manifest/printsupport/windows10"
IgnorableNamespaces="uap uap12 mp printsupport">

......
......
<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="PsaSampleApp_Demo.App">
<uap:VisualElements
DisplayName="PsaSampleApp-Demo"
Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png"
Description="PsaSampleApp-Demo"
BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
<Extensions>
<printsupport:Extension Category="windows.printSupportSettingsUI" EntryPoint="PsaSampleApp_Demo.App"/>
</Extensions>
</Application>
</Applications>
272263-image.png

Universal Windows Platform (UWP)
0 comments No comments
{count} votes

Accepted answer
  1. Roy Li - MSFT 31,526 Reputation points Microsoft Vendor
    2022-12-20T07:28:29.333+00:00

    Hello,

    Welcome to Microsoft Q&A!

    Could please help me with this and let me know the syntax to use windows.printSupportSettingsUI extension

    You need to create a multi-instanse UWP application to use this extension. This is mentioned in the Print support app design guide- The Print Support App is expected to handle multiple simultaneous activations for different print jobs, so such an app must support multiple instances using the SupportsMultipleInstances element in the package.appxmanifest file.

    When you create the uwp app, please make sure that you are selecting the multi-instance app template. You could refer to this document how to create a multi-instance uwp app. You just need to install a VS extension.

    Thank you.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Woods Sea 5 Reputation points
    2024-01-04T10:15:07.89+00:00

    Hi,

    How about this issue? I am facing the same situation.

    It seems windows.printSupportSettingsUI doesn't work, and there is no updating of MS documents.

    Any further information please? thanks.

    1 person found this answer helpful.
    0 comments No comments

  2. Amitha K 46 Reputation points
    2022-12-21T22:25:25.047+00:00

    Thanks for your quick response. @Roy Li - MSFT

    I did try to follow the steps given in this document https://learn.microsoft.com/en-us/windows/uwp/launch-resume/multi-instance-uwp to create multi-instance UWP app using the extension.

    The document says, to create a new multi-instance application, we need to install the Multi-Instance App Project Templates.VSIX .
    However, Extensions for Visual Studio (Multi-Instance App Project Templates) does not support VS2022 (version 17.4.3) and my Sample application is targeted for Windows SDK 11

    Without installing the multi-instance extension, just adding SupportsMultipleInstances element in the package.appxmanifest file didn't help


    12/20/2022 12:56:28 PM - References :
    12/20/2022 12:56:28 PM - Prerequisites :
    12/20/2022 12:56:28 PM - -------------------------------------------------------
    12/20/2022 12:56:28 PM - Identifier : Microsoft.VisualStudio.Component.CoreEditor
    12/20/2022 12:56:28 PM - Name : Visual Studio core editor
    12/20/2022 12:56:28 PM - Version : [15.0,)
    12/20/2022 12:56:28 PM -
    12/20/2022 12:56:28 PM - -------------------------------------------------------
    12/20/2022 12:56:28 PM - Identifier : Microsoft.VisualStudio.Component.Roslyn.LanguageServices
    12/20/2022 12:56:28 PM - Name : C# and Visual Basic
    12/20/2022 12:56:28 PM - Version : [15.0,)
    12/20/2022 12:56:28 PM -
    12/20/2022 12:56:28 PM - -------------------------------------------------------
    12/20/2022 12:56:28 PM - Identifier : Microsoft.VisualStudio.ComponentGroup.UWP.VC
    12/20/2022 12:56:28 PM - Name : C++ Universal Windows Platform tools
    12/20/2022 12:56:28 PM - Version : [15.0,)
    12/20/2022 12:56:28 PM -
    12/20/2022 12:56:28 PM - -------------------------------------------------------
    12/20/2022 12:56:28 PM - Identifier : Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core
    12/20/2022 12:56:28 PM - Name : Visual C++ core desktop features
    12/20/2022 12:56:28 PM - Version : [15.0,)
    12/20/2022 12:56:28 PM -
    12/20/2022 12:56:28 PM - Signature Details...
    12/20/2022 12:56:28 PM - Extension is signed with a valid signature.
    12/20/2022 12:56:28 PM -
    12/20/2022 12:56:28 PM - Searching for applicable products...
    12/20/2022 12:56:28 PM - Found installed product - Global Location
    12/20/2022 12:56:28 PM - Found installed product - Visual Studio Enterprise 2022
    12/20/2022 12:56:28 PM - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.
    at VSIXInstaller.ExtensionService.GetInstallableDataImpl(IInstallableExtension extension, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable1& skuData) at VSIXInstaller.ExtensionService.GetInstallableData(String vsixPath, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable1& skuData)
    at VSIXInstaller.ExtensionPackService.IsExtensionPack(IStateData stateData, Boolean isRepairSupported)
    at VSIXInstaller.ExtensionPackService.ExpandExtensionPackToInstall(IStateData stateData, Boolean isRepairSupported)
    at VSIXInstaller.App.Initialize(Boolean isRepairSupported)
    at VSIXInstaller.App.Initialize()
    at System.Threading.Tasks.Task`1.InnerInvoke()
    at System.Threading.Tasks.Task.Execute()


  3. Amitha K 1 Reputation point
    2022-12-22T21:45:40.457+00:00

    Thanks @Roy Li - MSFT for your quick response. The followed the below steps but still facing the same issue unable to add printSupportSettingsUI Extensions

    Step 1: Installed V2019 16.11.22 and installed the Multi-instance extension
    Step 2. Created Sample Multi-instance UWP Application for PSA(Print Support Application). As you can see, SupportsMultipleInstances is enabled.
    Step 3: Added the xmlns:printsupport="http://schemas.microsoft.com/appx/manifest/printsupport/windows10" in my Package.appxmanifest
    Step 4: Added extension in my Package.appxmanifest and I am unable to add this extension for printSupportSettingsUI

    <?xml version="1.0" encoding="utf-8"?>

    <Package
    xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
    xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
    xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
    xmlns:uap10="http://schemas.microsoft.com/appx/manifest/uap/windows10/10"
    xmlns:uap12="http://schemas.microsoft.com/appx/manifest/uap/windows10/12"
    xmlns:printsupport="http://schemas.microsoft.com/appx/manifest/printsupport/windows10"
    xmlns:desktop4="http://schemas.microsoft.com/appx/manifest/desktop/windows10/4"
    xmlns:iot2="http://schemas.microsoft.com/appx/manifest/iot/windows10/2"
    IgnorableNamespaces="uap uap12 mp desktop4 iot2 printsupport">

    <Identity
    Name="6f7dbd2e-36ce-42ec-b51e-7c0e4d34b9d9"
    Publisher="CN=AKundapur"
    Version="1.0.0.0" />

    <mp:PhoneIdentity PhoneProductId="6f7dbd2e-36ce-42ec-b51e-7c0e4d34b9d9" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

    <Properties>
    <DisplayName>PSASampleApp</DisplayName>
    <PublisherDisplayName>AKundapur</PublisherDisplayName>
    <Logo>Assets\StoreLogo.png</Logo>
    </Properties>

    <Dependencies>
    <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
    </Dependencies>

    <Resources>
    <Resource Language="x-generate"/>
    </Resources>

    <Applications>
    <Application Id="App"
    Executable="$targetnametoken$.exe"
    EntryPoint="PSASampleApp.App"
    desktop4:SupportsMultipleInstances="true"
    iot2:SupportsMultipleInstances="true">
    <uap:VisualElements
    DisplayName="PSASampleApp"
    Square150x150Logo="Assets\Square150x150Logo.png"
    Square44x44Logo="Assets\Square44x44Logo.png"
    Description="PSASampleApp" BackgroundColor="transparent">
    <uap:DefaultTile
    Wide310x150Logo="Assets\Wide310x150Logo.png"
    Square310x310Logo="Assets\Square310x310Logo.png"
    Square71x71Logo="Assets\Square71x71Logo.png">
    </uap:DefaultTile>
    <uap:SplashScreen Image="Assets\SplashScreen.png" />
    </uap:VisualElements>
    <Extensions>
    <printsupport:Extension Category="windows.printSupportSettingsUI"
    EntryPoint="PsaSample.PsaSettingsUISample"/>
    </Extensions>
    </Application>
    </Applications>

    <Capabilities>
    <Capability Name="internetClient" />
    </Capabilities>
    </Package>

    273409-image.png