microsoft / msix-packaging

MSIX SDK
MIT License
963 stars 163 forks source link

[BUG] Inconsistent Zip Structure in .appx Files Created by makemsix.exe Compared to MakeAppx.exe #619

Closed st-gr closed 1 month ago

st-gr commented 3 months ago

Project MSIX SDK

Describe the bug When creating .appx packages with makemsix.exe, the resulting internal zip structure differs from packages created with MakeAppx.exe of the Windows 10 SDK. This inconsistency is observed in the sorting of the zip central directory and the order of certain files within the zip stream.

To Reproduce Steps to reproduce the behavior:

  1. Create a .appx package using makemsix.exe.
  2. Create a .appx package using MakeAppx.exe with the same contents.
  3. Compare the internal zip structure of both packages using 7-zip and zipdump.

Here is a test UWP project that uses C:\Windows\Temp as the base path in the "platforms\windows\build\windows\bld\package.map.txt" file: miniappx.zip

Expected behavior The internal zip structure of .appx packages created by makemsix.exe should be consistent with those created by MakeAppx.exe, including the sorting of the zip central directory and the order of files within the zip stream.

Actual Behavior

Screenshots Here is a 7-zip properties page of the makemsix package versus the MakeAppx package: image 7-zip reports an “Unsorted_CD”. We can also see that the CRC32, size and therefore file contents of [Content_Types].xml and AppxBlockMap.xml differ.

Here is a zipdump comparison showing the unsorted central directory and showing the different order of the files “Properties/Default.rd.xml” and “resources.pri” that were added to the zip stream by makemsix. image

Platform

Additional context N/A