SOLVED

Error creating MSIX Package

%3CLINGO-SUB%20id%3D%22lingo-sub-1567302%22%20slang%3D%22en-US%22%3EError%20creating%20MSIX%20Package%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1567302%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%20trying%20to%20create%20my%20first%20MSIX%20package%20and%20right%20away%20I%20stumble%20upon%20an%20issue%2C%20here%20is%20what%20the%20log%20says%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3E%5B5-8-2020%2015%3A17%3A43%5D%20%5BDebug%5D%20Processing%20%22%25UserProfile%25%5CAppData%5CLocal%5CPackages%5CMicrosoft.MsixPackagingTool_8wekyb3d8bbwe%5CLocalState%5CDiagOutputDir%5CLogs_6%5Cpwqsoyzn.40m.UserClassesRegistryHive%22%20as%20a%20payload%20file.%20%20Its%20path%20in%20the%20package%20will%20be%20%22UserClasses.dat%22.%0A%5B5-8-2020%2015%3A17%3A43%5D%20%5BDebug%5D%20MakeAppx%20%3A%20error%3A%20Failure%20at%20packageWriter2-%26gt%3BClose(%20manifestStream%2C%20contentGroupMapStream.Get())%20-%200x80080204%20-%20The%20specified%20package%20format%20is%20not%20valid%3A%20The%20package%20manifest%20is%20not%20valid.%0A%5B5-8-2020%2015%3A17%3A43%5D%20%5BDebug%5D%20MakeAppx%20%3A%20error%3A%20Error%20info%3A%20%2F*%5Blocal-name()%3D%22Package%22%20and%20namespace-uri()%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Ffoundation%2Fwindows10%22%5D%2F*%5Blocal-name()%3D%22Extensions%22%20and%20namespace-uri()%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Ffoundation%2Fwindows10%22%5D%5B1%5D%2F*%5Blocal-name()%3D%22Extension%22%20and%20namespace-uri()%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Fcom%2Fwindows10%22%5D%5B1%5D%2F*%5Blocal-name()%3D%22ComInterface%22%20and%20namespace-uri()%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Fcom%2Fwindows10%22%5D%5B1%5D%2F*%5Blocal-name()%3D%22TypeLib%22%20and%20namespace-uri()%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Fcom%2Fwindows10%22%5D%5B1001%5D%0A%5B5-8-2020%2015%3A17%3A43%5D%20%5BDebug%5D%20Inhoud%20van%20element%20'%7Bhttp%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Fcom%2Fwindows10%7DTypeLib'%20is%20onverwacht%20volgens%20inhoudmodel%20van%20bovenliggend%20element%20'%7Bhttp%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Fcom%2Fwindows10%7DComInterface'.%0A%5B5-8-2020%2015%3A17%3A43%5D%20%5BDebug%5D%20Cleaning%20up%20output%20file%20%22%5C%5C%3F%5C%25UserProfile%25%5CDesktop%5CEG2003E_1.0.0.0_x64__dyg2y5qz6y7ec.msix%22.%0A%5B5-8-2020%2015%3A17%3A43%5D%20%5BDebug%5D%20MakeAppx%20%3A%20error%3A%20Failure%20at%20(CreatePackage(%20overwrite%2C%20hashAlgorithm%2C%20fileList%2C%20outputPath%2C%20manifestStream.Get()%2C%20forceCompressionNone%2C%20performanceOptions%2C%20encryptPackage%2C%20encryptionOptions%2C%20cgmPath%2C%20mainPackagePathForResourceExemption%2C%20makepriExeFullPath))%20-%200x80080204%20-%20The%20specified%20package%20format%20is%20not%20valid%3A%20The%20package%20manifest%20is%20not%20valid.%0A%5B5-8-2020%2015%3A17%3A43%5D%20%5BDebug%5D%20MakeAppx%20%3A%20error%3A%20Package%20creation%20failed.%0A%5B5-8-2020%2015%3A17%3A43%5D%20%5BDebug%5D%20MakeAppx%20%3A%20error%3A%200x80080204%20-%20The%20specified%20package%20format%20is%20not%20valid%3A%20The%20package%20manifest%20is%20not%20valid.%0A%5B5-8-2020%2015%3A17%3A43%5D%20%5BError%5D%20MakeAppx.exe%20failed%2C%20exit%20code%20%3D%201%0A%5B5-8-2020%2015%3A17%3A43%5D%20%5BError%5D%20Error%20Finalizing%20Package%3A%20Process%20MakeAppx.exe%20failed%20with%20exit%20code%201.%0A%5B5-8-2020%2015%3A17%3A43%5D%20%5BDebug%5D%20No%20access%20token%20file%20exists.%0A%5B5-8-2020%2015%3A17%3A43%5D%20%5BWarning%5D%20Error%20Occurred%3A%20Microsoft.Packaging.SDKUtils.ProcessRunner.ProcessRunnerException%3A%20Process%20MakeAppx.exe%20failed%20with%20exit%20code%201.%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%2C%20when%20I%20edit%20the%20package%20details%20and%20edit%20the%20manifest%20file%2C%20without%20changing%20anything%20it%20tells%20me%20this%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EUnable%20to%20parse%20manifest.%20Edit%20the%20manifest%20file%20to%20fix%20errors.%0A%2F*%5Blocal-name()%3D%22Package%22%20and%20namespace-uri()%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Ffoundation%2Fwindows10%22%5D%2F*%5Blocal-name()%3D%22Extensions%22%20and%20namespace-uri()%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Ffoundation%2Fwindows10%22%5D%5B1%5D%2F*%5Blocal-name()%3D%22Extension%22%20and%20namespace-uri()%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Fcom%2Fwindows10%22%5D%5B1%5D%2F*%5Blocal-name()%3D%22ComInterface%22%20and%20namespace-uri()%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Fcom%2Fwindows10%22%5D%5B1%5D%2F*%5Blocal-name()%3D%22TypeLib%22%20and%20namespace-uri()%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Fcom%2Fwindows10%22%5D%5B1001%5D%0AInhoud%20van%20element%20'%7Bhttp%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Fcom%2Fwindows10%7DTypeLib'%20is%20onverwacht%20volgens%20inhoudmodel%20van%20bovenliggend%20element%20'%7Bhttp%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Fcom%2Fwindows10%7DComInterface'.%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3BAny%20idea%20how%20to%20fix%3F%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1569117%22%20slang%3D%22en-US%22%3ERe%3A%20Error%20creating%20MSIX%20Package%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1569117%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F289411%22%20target%3D%22_blank%22%3E%40martijnk79%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20error%20says%20that%20the%201001s%20TypeLib%20element%20of%20ComInterface%20is%20invalid.%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3E%2F*%5Blocal-name()%3D%22ComInterface%22%20and%20namespace-uri()%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Fcom%2Fwindows10%22%5D%5B1%5D%0A%2F*%5Blocal-name()%3D%22TypeLib%22%20and%20namespace-uri()%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fappx%2Fmanifest%2Fcom%2Fwindows10%22%5D%5B1001%5D%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EThat%20is%20because%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fuwp%2Fschemas%2Fappxpackage%2Fuapmanifestschema%2Felement-com-package-cominterface%23syntax%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EComInterface%20can%20only%20hold%20up%20to%201000%20TypeLib%20elements%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20work%20around%20this%2C%20you%20can%20manually%20edit%20the%20manifest%20to%20split%20the%20TypeLib%20elements%20across%20multiple%20ComInterface%20elements%20without%20exceeding%201000%20on%20any%20of%20them.%20Something%20like%20this%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-html%22%3E%3CCODE%3E%20%20%20%20%3CEXTENSION%20category%3D%22windows.comInterface%22%3E%0A%20%20%20%20%20%20%3CCOMINTERFACE%3E%0A%20%20%20%20%20%20%20%20%3CTYPELIB%20id%3D%227a341bcb-a9eb-4bd6-ae98-610545b6bad6%22%3E...%3C%2FTYPELIB%3E%0A%20%20%20%20%20%20%20%20...%0A%20%20%20%20%20%20%20%20%3CTYPELIB%20id%3D%224feb5d08-4ba4-432b-9684-9bd4e25be16d%22%3E...%3C%2FTYPELIB%3E%0A%20%20%20%20%20%20%3C%2FCOMINTERFACE%3E%0A%20%20%20%20%3C%2FEXTENSION%3E%0A%20%20%20%20%3CEXTENSION%20category%3D%22windows.comInterface%22%3E%0A%20%20%20%20%20%20%3CCOMINTERFACE%3E%0A%20%20%20%20%20%20%20%20%3CTYPELIB%20id%3D%22d6ead1ce-d822-47b8-9db6-7c5c491ebb7b%22%3E...%3C%2FTYPELIB%3E%0A%20%20%20%20%20%20%20%20...%0A%20%20%20%20%20%20%20%20%3CTYPELIB%20id%3D%2239728c88-4324-4a52-b7d6-3f23abafba06%22%3E...%3C%2FTYPELIB%3E%0A%20%20%20%20%20%20%3C%2FCOMINTERFACE%3E%0A%20%20%20%20%3C%2FEXTENSION%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20letting%20us%20know%20of%20this%20issue.%20We%20will%20update%20the%20packaging%20tool%20to%20prevent%20this%20error%20in%20future%20releases.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1580409%22%20slang%3D%22en-US%22%3ERe%3A%20Error%20creating%20MSIX%20Package%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1580409%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F569046%22%20target%3D%22_blank%22%3E%40Luis_Chacon%3C%2FA%3E%26nbsp%3BThanks%20for%20that!%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hello, trying to create my first MSIX package and right away I stumble upon an issue, here is what the log says:

 

[5-8-2020 15:17:43] [Debug] Processing "%UserProfile%\AppData\Local\Packages\Microsoft.MsixPackagingTool_8wekyb3d8bbwe\LocalState\DiagOutputDir\Logs_6\pwqsoyzn.40m.UserClassesRegistryHive" as a payload file.  Its path in the package will be "UserClasses.dat".
[5-8-2020 15:17:43] [Debug] MakeAppx : error: Failure at packageWriter2->Close( manifestStream, contentGroupMapStream.Get()) - 0x80080204 - The specified package format is not valid: The package manifest is not valid.
[5-8-2020 15:17:43] [Debug] MakeAppx : error: Error info: /*[local-name()="Package" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"]/*[local-name()="Extensions" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"][1]/*[local-name()="Extension" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/com/windows10"][1]/*[local-name()="ComInterface" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/com/windows10"][1]/*[local-name()="TypeLib" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/com/windows10"][1001]
[5-8-2020 15:17:43] [Debug] Inhoud van element '{http://schemas.microsoft.com/appx/manifest/com/windows10}TypeLib' is onverwacht volgens inhoudmodel van bovenliggend element '{http://schemas.microsoft.com/appx/manifest/com/windows10}ComInterface'.
[5-8-2020 15:17:43] [Debug] Cleaning up output file "\\?\%UserProfile%\Desktop\EG2003E_1.0.0.0_x64__dyg2y5qz6y7ec.msix".
[5-8-2020 15:17:43] [Debug] MakeAppx : error: Failure at (CreatePackage( overwrite, hashAlgorithm, fileList, outputPath, manifestStream.Get(), forceCompressionNone, performanceOptions, encryptPackage, encryptionOptions, cgmPath, mainPackagePathForResourceExemption, makepriExeFullPath)) - 0x80080204 - The specified package format is not valid: The package manifest is not valid.
[5-8-2020 15:17:43] [Debug] MakeAppx : error: Package creation failed.
[5-8-2020 15:17:43] [Debug] MakeAppx : error: 0x80080204 - The specified package format is not valid: The package manifest is not valid.
[5-8-2020 15:17:43] [Error] MakeAppx.exe failed, exit code = 1
[5-8-2020 15:17:43] [Error] Error Finalizing Package: Process MakeAppx.exe failed with exit code 1.
[5-8-2020 15:17:43] [Debug] No access token file exists.
[5-8-2020 15:17:43] [Warning] Error Occurred: Microsoft.Packaging.SDKUtils.ProcessRunner.ProcessRunnerException: Process MakeAppx.exe failed with exit code 1.

 

Also, when I edit the package details and edit the manifest file, without changing anything it tells me this:

Unable to parse manifest. Edit the manifest file to fix errors.
/*[local-name()="Package" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"]/*[local-name()="Extensions" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/foundation/windows10"][1]/*[local-name()="Extension" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/com/windows10"][1]/*[local-name()="ComInterface" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/com/windows10"][1]/*[local-name()="TypeLib" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/com/windows10"][1001]
Inhoud van element '{http://schemas.microsoft.com/appx/manifest/com/windows10}TypeLib' is onverwacht volgens inhoudmodel van bovenliggend element '{http://schemas.microsoft.com/appx/manifest/com/windows10}ComInterface'.

 Any idea how to fix?


Thanks!

2 Replies
best response confirmed by martijnk79 (Occasional Contributor)
Solution

@martijnk79 

The error says that the 1001s TypeLib element of ComInterface is invalid.

/*[local-name()="ComInterface" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/com/windows10"][1]
/*[local-name()="TypeLib" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/com/windows10"][1001]

That is because ComInterface can only hold up to 1000 TypeLib elements.

 

To work around this, you can manually edit the manifest to split the TypeLib elements across multiple ComInterface elements without exceeding 1000 on any of them. Something like this:

    <com:Extension Category="windows.comInterface">
      <com:ComInterface>
        <com:TypeLib Id="7a341bcb-a9eb-4bd6-ae98-610545b6bad6">...</com:TypeLib>
        ...
        <com:TypeLib Id="4feb5d08-4ba4-432b-9684-9bd4e25be16d">...</com:TypeLib>
      </com:ComInterface>
    </com:Extension>
    <com:Extension Category="windows.comInterface">
      <com:ComInterface>
        <com:TypeLib Id="d6ead1ce-d822-47b8-9db6-7c5c491ebb7b">...</com:TypeLib>
        ...
        <com:TypeLib Id="39728c88-4324-4a52-b7d6-3f23abafba06">...</com:TypeLib>
      </com:ComInterface>
    </com:Extension>

 

Thank you for letting us know of this issue. We will update the packaging tool to prevent this error in future releases.

@Chacon Thanks for that!