SOLVED

Error creating an MSIX Package

Brass Contributor

Hello, I'am trying to create a MSIX package but it fails. The log file:

I

 

[10/26/2021 2:06:34 PM] [Debug] MakeAppx : error: Failure at packageWriter2->Close( manifestStream, contentGroupMapStream.Get()) - 0x80080204 - The specified package format is not valid: The package manifest is not valid.
[10/26/2021 2:06:34 PM] [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"][9]/*[local-name()="Version" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/com/windows10"][1]/@LibraryFlag
[10/26/2021 2:06:34 PM] [Debug] '#0' violates pattern constraint of '[0-9a-fA-F]'.
[10/26/2021 2:06:34 PM] [Debug] The attribute 'LibraryFlag' with value '#0' failed to parse.
[10/26/2021 2:06:34 PM] [Debug] Cleaning up output file "\\?\%UserProfile%\Desktop\SW01037-02_2021.0.1.0_x64__gs30ax5hs4rre.msix".
[10/26/2021 2:06:34 PM] [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.
[10/26/2021 2:06:34 PM] [Debug] MakeAppx : error: Package creation failed.
[10/26/2021 2:06:34 PM] [Debug] MakeAppx : error: 0x80080204 - The specified package format is not valid: The package manifest is not valid.
[10/26/2021 2:06:34 PM] [Error] MakeAppx.exe failed, exit code = 1
[10/26/2021 2:06:34 PM] [Debug] Finalizing the conversion state
[10/26/2021 2:06:34 PM] [Debug] Getting environment object from %UserProfile%\AppData\Local\Packages\Microsoft.MsixPackagingTool_8wekyb3d8bbwe\LocalState\MsixGenerator.ConversionState.xml
[10/26/2021 2:06:34 PM] [Debug] Releasing global semaphore
[10/26/2021 2:06:34 PM] [Warning] Error Occurred: Microsoft.Msix.Utils.ProcessRunner.ProcessRunnerException: Process MakeAppx.exe failed with exit code 1.
   at Microsoft.Msix.Utils.ProcessRunner.ProcessRunnerBase.ValidateExitCode(Int32[] validCodes)
   at Microsoft.ApplicationVirtualization.Packaging.Packager.FinalizePackageViaMakeAppx(IPackageFiles packageFiles, String manifestPath, String appvManifestPath, String registryHivePath, Boolean useExistingRegisterHive, String userRegistryHivePath, String userClassesRegistryHivePath, String packagePath, String msixMappingPath, CompressionOption compression, MsixPackageInputProperties msixPackageInputProperties, CancellationTokenSource cancellationTokenSource)
   at MsixGenerator.MsixPackageEditor.FinalizePackage(CancellationTokenSource cancellationTokenSource, Boolean modifyExistingPackage)
   at MsixPackagingTool.ViewModel.PackageEditorWorkflow.MasterPackageEditorViewModel.SavePackageEditorChanges_BackgroundWorker(Object sender, DoWorkEventArgs doWorkEventArgs)
   at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
[10/26/2021 2:26:15 PM] [Debug] Spawning background worker thread.
[10/26/2021 2:26:15 PM] [Debug] IgnorableNamespaces attribute value is : uap uap2 uap3 uap10 rescap rescap3 com
[10/26/2021 2:26:15 PM] [Debug] Adding Capability: runFullTrust
[10/26/2021 2:26:15 PM] [Debug] Translating Packaged Services to Manifest
[10/26/2021 2:26:15 PM] [Debug] IgnorableNamespaces attribute value is : uap uap2 uap3 uap10 rescap rescap3 com
[10/26/2021 2:26:15 PM] [Debug] File type associated with Manifest: notepad.exe
[10/26/2021 2:26:16 PM] [Debug] Manifest Process Exited.
[10/26/2021 2:26:16 PM] [Debug] Attempting to read and validate the saved manifest file: %UserProfile%\AppData\Local\Packages\Microsoft.MsixPackagingTool_8wekyb3d8bbwe\LocalState\DiagOutputDir\Logs\1pcyhnxe.iwe.Manifest 
[10/26/2021 2:26:16 PM] [Error] System.Runtime.InteropServices.COMException (0x80080204): /*[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"][9]/*[local-name()="Version" and namespace-uri()="http://schemas.microsoft.com/appx/manifest/com/windows10"][1]/@LibraryFlag
'#0' violates pattern constraint of '[0-9a-fA-F]'.
The attribute 'LibraryFlag' with value '#0' failed to parse.

   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at Microsoft.ApplicationVirtualization.Packaging.Impl.AppxManifestReader..ctor(String path)
   at Microsoft.ApplicationVirtualization.Packaging.AppxPackageFactory.ReadManifest(String path)
   at MsixGenerator.MsixPackageEditor.ValidateManifestOrThrow(String manifestPath)
   at MsixGenerator.MsixPackageEditor.TryParseManifestFile(String manifestPath)
[10/26/2021 2:26:16 PM] [Warning] Unable to parse manifest. Edit the manifest file to fix errors.
[10/26/2021 2:26:16 PM] [Debug] Returning back to Package Editor view.
[10/26/2021 2:35:05 PM] [Debug] Spawning background worker thread.
[10/26/2021 2:35:05 PM] [Debug] Enabling services that were disabled while preparing environment
[10/26/2021 2:35:05 PM] [Debug] ----------------Create Package View----------------

 

 

 

I found a sort off some issue, tried that but that gave me the same error;

https://techcommunity.microsoft.com/t5/msix-packaging-and-tools/error-creating-msix-package/m-p/1567...

 

Any one a idea to fix this?

 

Thnx!

2 Replies
best response confirmed by Trebke (Brass Contributor)
Solution
You'll have to post the actual AppXManifest file. There is something wrong in it. I would look for a parameter called "LibraryFlag" in there that has a value of "#0". It probably is a TypeLib and you need to just remove the "#".
That was it! Thanks Timothy!
1 best response

Accepted Solutions
best response confirmed by Trebke (Brass Contributor)
Solution
You'll have to post the actual AppXManifest file. There is something wrong in it. I would look for a parameter called "LibraryFlag" in there that has a value of "#0". It probably is a TypeLib and you need to just remove the "#".

View solution in original post