Tech Community Live: Windows edition
Jun 05 2024, 07:30 AM - 11:30 AM (PDT)
Microsoft Tech Community

Appinstaller not working

Copper Contributor

the appinstaller file for my c++ winrt app is not working and gives error saying "error in parsing app package" but the appx bundle file works fine

the appinstallers of any c++ apps do not work but they work for c# apps

 

3 Replies
There isn't enough information here to provide much help. Any installation failure of an appx/msix/bundle is logged in the event log Microsoft\Windows\AppXPackagingOM\Operational log. This would usually contain ane event that points out the line of the appxmanifest generating the error and why. You might need to package using "full trust".

@TIMOTHY MANGAN 

But how do you 'full trust'

@ABDULMATEEN

 

I did not say you need this, but only that you might.  Read the error to know what is wrong and fix the manifest appropriately.

 

If full trust is needed, in the manifest, you need to first set the capability like this,

 

    <Capabilities>
        <rescap:Capability Name="runFullTrust" />
        ...
    </Capabilities>

 

 which is what starts the container to allow for msix.  Then on the application,

 

    <Applications>
        <Application Id="XXX" Executable="YYY.exe" EntryPoint="Windows.FullTrustApplication">
            ...
        </Application>
        ...
    </Applications

 

which makes the application run using full trust (which really means more trust than AppX gets).

 

rescap, aka "restrictedcapabilities" must also be added to the schema list on the <Package> element.