SOLVED

Understand load behaviour of modification packages

Brass Contributor

Hello,
I'm looking for a description of load behaviour in msix packages.

Sample: Simple app loads help.txt from %programfiles%\demo

  • Main msix contains help.txt in vfs, it loads every time.
  • Main msix doesn't contain help.txt in vfs. If help.txt exists on a local system (native), it loads from here.
  • Main msix doesn't contain help.txt in vfs, but help.txt is in modification package (modi1.msix), it loads from modi1 vfs.
  • Main msix doesn't contain help.txt in vfs, but help.txt is in a 2nd modification package (modi2.msix), it loads from modi1 vfs
  • Main msix doesn't contain help.txt in vfs, but help.txt is in a 3nd modification package (alpha.msix), it loads from alpha vfs, because names order is the relevant feature.

Is this correct?

thanks and kindly regards

Andreas

17 Replies
best response confirmed by John Vintzel (Microsoft)
Solution

Thanks for your question! Here is a description of what happens when you have a main package and a modification packages. 

Scenario 1: Main package with help.txt in vfs with no modification packages

When the app runs, main app will load help.txt.

Scenario 2: Main package with help.txt in vfs with modification packages that contains no help.txt in vfs

When the app runs, the main app will load help.txt from the main app

Scenario 3: Main package with help.txt in vfs with modification package that contains help.txt in vfs

When the app runs, the main package will load help.txt from the main app. This is because we found that the main package will always win over the modification packages.

Scenario 4: main package does not contain help.txt in vfs with modification package that contains help.txt in vfs. This is because when we do a look up, help.txt is first found in the modification package.

When the app runs, the main app will load help.txt from the modification package

Scenario 5: main package does not contain help.txt in vfs with modification package #1 (amodi.msix) and modification package #2 (bmodi.msix), both having help.txt in vfs.

When the app runs, the main app will load help.txt from modification package #1. This is because when we do a look up, we found help.txt first in amodi.msix.

 

In the next update, we will be fixing scenario #3, so that modification packages can overlay their files correctly when loading the main package. More details will be posted at http://aka.ms/msix soon. 

 

More info on modification packages in the current release visit https://docs.microsoft.com/en-us/windows/msix/modification-package-1809-update

 

Hi Dian,

thanks for your help - perfectly.

What is the timeframe for fixing scenario #3?

Andreas

The fix is out in our Insider Fast build. Please go ahead and test out the feature and let us know if you run into issues. 

Make sure you are on 18312 or later.

I've tested with 18312 but it doesn't works. Main package always win. 

To support this scenario we added a attribute in the manifest under <Properties>. Make sure your modification package has the following attribute:

  <Properties>

   <rescap6:ModificationPackage>true</rescap6:ModificationPackage>​

  </Properties>​

To update the manifest follow these steps: 

  1. Go to MSIX Packaging Tool 
  2. Click 'Package editor' 
  3. Select your package
  4. 3. Click 'Open package'
  5.  Under Manifest file, Click 'Open fil'
  6.  Add  <rescap6:ModificationPackage>true</rescap6:ModificationPackage>​ in <Properties>
  7.  Close the manifest 
  8. Resign the package 
  9.  Click 'Save'

Documentation highlighting these changes are coming shortly. 

Wow, it's great. Thanks.

Hi Dian, it works perfectly with insider build 18312, but it fails at build 1809. Is there a plan to update 1809 to ignore the attribut if exists in a manifest.

thx

Hi, does the modification package fail to install or the functionality is not working? 

Hi. I can create the msix at Insider Build 18312 and the Package works Fine. Installing the Package at actual Release 1809 results in the parsing manifest error.

Can you ensure that the min version of the manifest includes 1809 build? It should be something like this:

<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.17763.0"/> 

Sure. Attached is the manifest file. App install works perfectly with 18312 and 18317. When installing at 1809, the install process terminate with "Error in parsing the app package". See picture.

 

Exception.png

And here's the manifest

Hi Dian, after installing Windows SDK 10.0.18312.0 on 1809 t is possible to use the attribut and create a modification package with makeappx.exe. The package fails with the same exception.

I've seen the description to the new functionality at your web page and the hint to the january release of MSIX packaging tool. Where can i find this. Thx

Can you try installing the package using Powershell commands? 

Sure, but installation fails:

-------------------------------

add-appxpackage : Fehler bei Bereitstellung. HRESULT: 0x80080204, Das Manifest des Appx-Pakets ist ungültig.
Fehler 0xC00CE014: Überprüfungsfehler bei App-Manifest: Das App-Manifest muss gemäß dem Schema gültig sein: Zeile 10,
Spalte 6. Hinweis: Das festgelegte Schema für MaxVersionTested erkennt keine XML-Felder mit dem
http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities/6-Namespace. Stellen Sie
sicher, dass MaxVersionTested richtig angegeben ist. Ursache: Der Inhalt des Elements
'{http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities/6}Modificat
Fehler 0xC00CE014: Überprüfungsfehler bei App-Manifest: Das App-Manifest muss gemäß dem Schema gültig sein: Zeile 10,
Spalte 6. Hinweis: Das festgelegte Schema für MaxVersionTested erkennt keine XML-Felder mit dem
http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities/6-Namespace. Stellen Sie
sicher, dass MaxVersionTested richtig angegeben ist. Ursache: Der Inhalt des Elements
'{http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities/6}Modificatio...' ist
gemäß dem Inhaltsmodell des übergeordneten Elements
'{http://schemas.microsoft.com/appx/manifest/foundation/windows10}Properties' nicht gültig.
HINWEIS: Wenn Sie weitere Informationen wünschen, suchen Sie im Ereignisprotokoll nach [ActivityId]
e26d322e-b1a9-0002-06ba-6fe2a9b1d401, oder verwenden Sie die Befehlszeile Get-AppxLog -ActivityID
e26d322e-b1a9-0002-06ba-6fe2a9b1d401
In Zeile:1 Zeichen:1
+ add-appxpackage .\NativeNotepadPolicySettings2.msix
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (D:\MSIX\Samples...ySettings2.msix:String) [Add-AppxPackage], Exception
+ FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand

Hi Dian, it works. I've forgotten "IgnorableNamespaces="rescap6">" in the manifest. thx.

1 best response

Accepted Solutions
best response confirmed by John Vintzel (Microsoft)
Solution

Thanks for your question! Here is a description of what happens when you have a main package and a modification packages. 

Scenario 1: Main package with help.txt in vfs with no modification packages

When the app runs, main app will load help.txt.

Scenario 2: Main package with help.txt in vfs with modification packages that contains no help.txt in vfs

When the app runs, the main app will load help.txt from the main app

Scenario 3: Main package with help.txt in vfs with modification package that contains help.txt in vfs

When the app runs, the main package will load help.txt from the main app. This is because we found that the main package will always win over the modification packages.

Scenario 4: main package does not contain help.txt in vfs with modification package that contains help.txt in vfs. This is because when we do a look up, help.txt is first found in the modification package.

When the app runs, the main app will load help.txt from the modification package

Scenario 5: main package does not contain help.txt in vfs with modification package #1 (amodi.msix) and modification package #2 (bmodi.msix), both having help.txt in vfs.

When the app runs, the main app will load help.txt from modification package #1. This is because when we do a look up, we found help.txt first in amodi.msix.

 

In the next update, we will be fixing scenario #3, so that modification packages can overlay their files correctly when loading the main package. More details will be posted at http://aka.ms/msix soon. 

 

More info on modification packages in the current release visit https://docs.microsoft.com/en-us/windows/msix/modification-package-1809-update

 

View solution in original post