Unable to publish with fulltrustprocess and Multiple instances of UWP app

DotNET Fan 271 Reputation points
2024-12-03T06:00:38.49+00:00

UWP experts ,

There are three components here.

  1. Main UWP app with multiple instances supported through package manifest - C# UWP
  2. FullTrustprocess that acts as the appserviceconnection server - C# .NET 8
  3. WAPP Package that bundles UWP app and fulltrustprocess.

When we build it in spite of adding the entry points in package manifests , still it gives publish error.

I have added the desktop4:SupportsMultipleInstances="true" in both package manifest and UWP app manifest

Error DEP0700: Registration of the app failed. [0x80073CF6] AppxManifest.xml(35,10): error 0x80080204: Cannot register the package because EntryPoint must be specified when SupportsMultipleInstances is true.

Package - package manifest



UWP App - package manifest

  

How to enable MultipleInstances for UWP app in this scenario?

Thanks

Universal Windows Platform (UWP)
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,152 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Junjie Zhu - MSFT 19,751 Reputation points Microsoft Vendor
    2024-12-03T08:01:59.7533333+00:00

    Hello @DotNET Fan ,

    Welcome to Microsoft Q&A!

    According to the document,

    Out-of-proc background tasks support multi-instancing. Typically, each new trigger results in a new instance of the background task (although technically speaking multiple background tasks may run in same host process). Nevertheless, a different instance of the background task is created. In-proc background tasks do not support multi-instancing.

    In-processs AppService is not supported for multi-instance apps.

    It is recommended to use out-of-processs AppService. Disable multi-instance for out-of-proc service. Create a new service for each instance of UWP. Create a static field in the background task class to store the AppService for desktop extension and initialize it when you create AppService from the desktop extension.

    Soumya Mahunt shared the solution, you can try it out.

    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.