0

i want to create a PSA (Print Support Application) using dotnet 9.0.300 and Windows 11 SDK. I'm using VS Professional 17.14.2. OS is Windows 11 Pro Version 10.0.26100.

The deploy results in the following error:

DEP0700: Registration of the app failed. [0x80073CF6] Error 0x80080204: The package "617e6418-6847-4fa1-bec6-3a3668d09f6d_1.0.0.0_x86__g0j7nbxh9a4mw" cannot be registered due to the following error: The appx package manifest is invalid. 

I need help for understanding this issue, because i have no more information about the problem. Hopy you folks can help. THX

I have a simple blank UWP application project with the following 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:uap11="http://schemas.microsoft.com/appx/manifest/uap/windows10/11"
  xmlns:printsupport="http://schemas.microsoft.com/appx/manifest/printsupport/windows10"
  xmlns:printsupport2="http://schemas.microsoft.com/appx/manifest/printsupport/windows10/2"
  IgnorableNamespaces="uap mp printsupport printsupport2 uap11">

    <Identity
      Name="617e6418-6847-4fa1-bec6-3a3668d09f6d"
      Publisher="CN=patrick"
      Version="1.0.0.0" />

    <mp:PhoneIdentity
      PhoneProductId="617e6418-6847-4fa1-bec6-3a3668d09f6d"
      PhonePublisherId="00000000-0000-0000-0000-000000000000" />

    <Properties>
        <DisplayName>PrintingApp</DisplayName>
        <PublisherDisplayName>patrick</PublisherDisplayName>
        <Logo>Assets\StoreLogo.png</Logo>
    </Properties>

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

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

    <Applications>
        <Application
          Id="App"
          Executable="$targetnametoken$.exe"
          EntryPoint="PrintingApp.App">
            <uap:VisualElements
              DisplayName="PrintingApp"
              Square150x150Logo="Assets\Square150x150Logo.png"
              Square44x44Logo="Assets\Square44x44Logo.png"
              Description="PrintingApp"
              BackgroundColor="transparent">
                <uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" />
                <uap:SplashScreen Image="Assets\SplashScreen.png" />
            </uap:VisualElements>

            <Extensions>
                 <!--1. Virtueller Drucker-Workflow--> 
                <printsupport2:Extension
                  Category="windows.printSupportVirtualPrinterWorkflow"
                  EntryPoint="PrintingApp.Tasks.PrintSupportWorkflowBackgroundTask"
                  uap11:SupportsMultipleInstances="true">
                    <printsupport2:PrintSupportVirtualPrinter
                      DisplayName="ms-resource://PRINTER_NAME1"
                      PrinterUri="contoso-psa:printer1"
                      PreferredInputFormat="application/postscript"
                      OutputFileTypes="ps;pdf"
                      PdcFile="Config\PRINTER_PDC1.xml">
                        <printsupport2:SupportedFormats>
                            <printsupport2:SupportedFormat Type="application/postscript" />
                            <printsupport2:SupportedFormat Type="application/pdf" MaxVersion="1.7" />
                        </printsupport2:SupportedFormats>
                    </printsupport2:PrintSupportVirtualPrinter>
                </printsupport2:Extension>

                 <!--2. Print-Support-Extension--> 
                <printsupport:Extension
                  Category="windows.printSupportExtension"
                  EntryPoint="PrintingApp.Tasks.PrintSupportExtensionBackgroundTask"
                  uap11:SupportsMultipleInstances="true" />

                 <!--3. Print-Support-SettingsUI--> 
                <printsupport:Extension
                  Category="windows.printSupportSettingsUI"
                  EntryPoint="PrintingApp.Tasks.PrintSupportSettingsUIBackgroundTask"
                  uap11:SupportsMultipleInstances="true" />

                 <!--4. Print-Support-JobUI--> 
                <printsupport:Extension
                  Category="windows.printSupportJobUI"
                  EntryPoint="PrintingApp.Tasks.PrintSupportJobUIBackgroundTask"
                  uap11:SupportsMultipleInstances="true" />
            </Extensions>
        </Application>
    </Applications>

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

The Entry Point classes are within the defined namespace and declared as public sealed partial class, e.g.

using Windows.ApplicationModel.Background;
using Windows.Graphics.Printing.PrintSupport;

namespace PrintingApp.Tasks
{
    /// <summary>
    /// Background-Task für PrintTicket-Validierung und -Erweiterungen.
    /// </summary>
    public sealed partial class PrintSupportExtensionBackgroundTask : IBackgroundTask
    {
        public void Run(IBackgroundTaskInstance taskInstance)
        {
            var deferral = taskInstance.GetDeferral();


            deferral.Complete();
        }
    }
}

Note that the PRINTER_PDC1 is of type content and copied always with this "dummy" content:

<?xml version="1.0" encoding="UTF-8"?>
<!--
  Beispiel einer PDC (Print Device Capabilities) für einen virtuellen Drucker (PSA).
  Namespace psk steht hier für das PrintSchemaKernel (siehe Schema-Definitionen).
-->
<psk:PrintDeviceCapabilities
    xmlns:psk="http://schemas.microsoft.com/windows/2003/08/printing/printschemakernel"
    psk:Version="1.0">

    <!-- Feature: PageMediaSize (Papierformat) -->
    <psk:Feature psk:Name="PageMediaSize">
        <psk:Option psk:Name="ISOA4">
            <psk:DisplayName xml:lang="en">A4</psk:DisplayName>
        </psk:Option>
        <psk:Option psk:Name="ISOB5">
            <psk:DisplayName xml:lang="en">B5</psk:DisplayName>
        </psk:Option>
        <psk:Option psk:Name="Letter">
            <psk:DisplayName xml:lang="en">Letter</psk:DisplayName>
        </psk:Option>
    </psk:Feature>

    <!-- Feature: PageOrientation (Ausrichtung) -->
    <psk:Feature psk:Name="PageOrientation">
        <psk:Option psk:Name="Portrait">
            <psk:DisplayName xml:lang="en">Hochformat</psk:DisplayName>
        </psk:Option>
        <psk:Option psk:Name="Landscape">
            <psk:DisplayName xml:lang="en">Querformat</psk:DisplayName>
        </psk:Option>
    </psk:Feature>

    <!-- Feature: PageOutputColor (Farbausgabe) -->
    <psk:Feature psk:Name="PageOutputColor">
        <psk:Option psk:Name="Color">
            <psk:DisplayName xml:lang="en">Farbe</psk:DisplayName>
        </psk:Option>
        <psk:Option psk:Name="Monochrome">
            <psk:DisplayName xml:lang="en">Schwarzweiß</psk:DisplayName>
        </psk:Option>
    </psk:Feature>

    <!-- Feature: Duplex (Beidseitig drucken) -->
    <psk:Feature psk:Name="Duplex">
        <psk:Option psk:Name="OneSided">
            <psk:DisplayName xml:lang="en">Einseitig</psk:DisplayName>
        </psk:Option>
        <psk:Option psk:Name="TwoSidedLongEdge">
            <psk:DisplayName xml:lang="en">Beidseitig (lange Kante)</psk:DisplayName>
        </psk:Option>
        <psk:Option psk:Name="TwoSidedShortEdge">
            <psk:DisplayName xml:lang="en">Beidseitig (kurze Kante)</psk:DisplayName>
        </psk:Option>
    </psk:Feature>

    <!-- Feature: Copies (Anzahl Kopien) -->
    <psk:Feature psk:Name="Copies">
        <psk:Option psk:Name="CopiesSupported"/>
    </psk:Feature>

</psk:PrintDeviceCapabilities>
0

1 Answer 1

0

The problem is that the application has not registered multiple instances in the appx manifest file, because you are using the highest version of the Windows SDK (10.0.26100)

This is the modified appx manifest file:

<?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:uap11="http://schemas.microsoft.com/appx/manifest/uap/windows10/11"
  xmlns:printsupport="http://schemas.microsoft.com/appx/manifest/printsupport/windows10"
  xmlns:printsupport2="http://schemas.microsoft.com/appx/manifest/printsupport/windows10/2"
  IgnorableNamespaces="uap mp printsupport printsupport2 uap10 uap11">

    <Identity
      Name="617e6418-6847-4fa1-bec6-3a3668d09f6d"
      Publisher="CN=patrick"
      Version="1.0.0.0" />

    <mp:PhoneIdentity
      PhoneProductId="617e6418-6847-4fa1-bec6-3a3668d09f6d"
      PhonePublisherId="00000000-0000-0000-0000-000000000000" />

    <Properties>
        <DisplayName>PrintingApp</DisplayName>
        <PublisherDisplayName>patrick</PublisherDisplayName>
        <Logo>Assets\StoreLogo.png</Logo>
    </Properties>

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

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

    <Applications>
        <Application
          Id="App"
          uap10:SupportsMultipleInstances="true"
          Executable="$targetnametoken$.exe"
          EntryPoint="PrintingApp.App">
            <uap:VisualElements
              DisplayName="PrintingApp"
              Square150x150Logo="Assets\Square150x150Logo.png"
              Square44x44Logo="Assets\Square44x44Logo.png"
              Description="PrintingApp"
              BackgroundColor="transparent">
                <uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" />
                <uap:SplashScreen Image="Assets\SplashScreen.png" />
            </uap:VisualElements>

            <Extensions>
                 <!--1. Virtueller Drucker-Workflow--> 
                <printsupport2:Extension
                  Category="windows.printSupportVirtualPrinterWorkflow"
                  EntryPoint="PrintingApp.Tasks.PrintSupportWorkflowBackgroundTask"
                  uap11:SupportsMultipleInstances="true">
                    <printsupport2:PrintSupportVirtualPrinter
                      DisplayName="ms-resource://PRINTER_NAME1"
                      PrinterUri="contoso-psa:printer1"
                      PreferredInputFormat="application/postscript"
                      OutputFileTypes="ps;pdf"
                      PdcFile="Config\PRINTER_PDC1.xml">
                        <printsupport2:SupportedFormats>
                            <printsupport2:SupportedFormat Type="application/postscript" />
                            <printsupport2:SupportedFormat Type="application/pdf" MaxVersion="1.7" />
                        </printsupport2:SupportedFormats>
                    </printsupport2:PrintSupportVirtualPrinter>
                </printsupport2:Extension>

                 <!--2. Print-Support-Extension--> 
                <printsupport:Extension
                  Category="windows.printSupportExtension"
                  EntryPoint="PrintingApp.Tasks.PrintSupportExtensionBackgroundTask"
                  uap11:SupportsMultipleInstances="true" />

                 <!--3. Print-Support-SettingsUI--> 
                <printsupport:Extension
                  Category="windows.printSupportSettingsUI"
                  EntryPoint="PrintingApp.Tasks.PrintSupportSettingsUIBackgroundTask"
                  uap11:SupportsMultipleInstances="true" />

                 <!--4. Print-Support-JobUI--> 
                <printsupport:Extension
                  Category="windows.printSupportJobUI"
                  EntryPoint="PrintingApp.Tasks.PrintSupportJobUIBackgroundTask"
                  uap11:SupportsMultipleInstances="true" />
            </Extensions>
        </Application>
    </Applications>

    <Capabilities>
        <Capability Name="internetClient" />
    </Capabilities>
</Package>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.