microsoft / microsoft/winappCli

appxmanifest/msix improvement suggestions

Open
#228 0 comments 1 reaction 1 assignee Claimed by @zateutsch View on GitHub
cli enhancement
Dominant language
C#
Stars
1.3k
Forks
80
Avg merge
3d 6h
Merged PRs (30d)
51

Description

Feedback from #221, moving here for tracking

AI generated:
## Manifest & Packaging Improvements

### Cleanup & Redundancy (#574)
- [x] **Remove `EntryPoint` from `msix/appxmanifest.xml`**
- Redundant with `uap10:TrustLevel`+`RuntimeBehavior` on newer systems (>=20H1).
- Ensure `TargetDeviceFamily/MinVersion` is set to `10.0.19045.0` (Win10 22H2).
- [x] **Remove `EntryPoint` from `Templates/appxmanifest.hostedapp.xml`**
- Redundant; `TargetDeviceFamily/MinVersion` should be `10.0.19041.0` (Win10 20H1).
- [x] **Remove `TrustLevel` & `RuntimeBehavior` from `Templates/appxmanifest.packaged.xml` & `sparse.xml`**
- Recommend removing these for packaged apps in favor of `EntryPoint` to ensure compatibility with systems <20H1 (if supporting them) or simply because they may not be available on all target systems.

### Identity & Naming Standards
- [ ] **Update `Identity/Name` to "Microsoft.winapp" in `msix/appxmanifest.xml`**
- Follows the "Microsoft." prefix convention to ensure uniqueness.
- [x] **Fix Identity Inconsistencies in `winapp-GUI/Package.appxmanifest`**
- Change Name to `Microsoft.WinAppGUI`.
- Change Publisher to `CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US`.
- Specify `ProcessorArchitecture`.
- [ ] **Enhance Publisher Identity logic in Templates (`appxmanifest.*.xml`)**
- Separate Identity Name from Display Name.
- Change `` to use `Publisher="{PublisherName.Identity}"`.
- Change `` to use `{PublisherName.Display}`.
- **Logic:**
- Input params: `PublisherName`, `PublisherName.Identity`, `PublisherName.Display`.
- Default `PublisherName.Identity` to `CN={PublisherName}` if missing.
- Default `PublisherName.Display` to `PublisherName` if missing.

### Virtualization & Capabilities Configuration
- [ ] **Add `AppExecutionAlias` support to `Templates/appxmanifest.packaged.xml`**
- Add the `` extension to support `CreateProcess` via alias.
- [ ] **Refactor `RegistryWriteVirtualization` in `Templates/appxmanifest.sparse.xml`**
- **Current behavior:** Virtualization is always disabled.
- **New behavior:** Default to `enabled`. Add input parameter `MSIX.IOVirtualization.Registry.Write=`.
- Only add `disabled` if explicitly disabled.
- Apply similar logic to `FileSystemWriteVirtualization`.
- [ ] **Refactor `allowElevation` capability in `Templates/appxmanifest.sparse.xml`**
- **Current behavior:** Always specified.
- **New behavior:** Default to `false`. Add input parameter `MSIX.Capability.Elevation.Allow=`.
- Only inject the `allowElevation` rescap if `true`.

### Localization (i18n)
- [ ] **Implement Resource Localization Strategy**
- Change literal `DisplayName` strings to `ms-resource:package.name` and `ms-resource:application.name`.
- Change literal `Description` strings to `ms-resource:application.description` (defaulting to DisplayName value if not provided).
- Define these values in a `resources.pri` file to support future localization (starting with `en-US`).
- Apply this to `PublisherDisplayName` (`ms-resource:publisher.name`) as well.

### New Features & Build
- [x] **Implement Fusion Manifest Generation (Side-by-Side)**
- Add option to generate/update an application manifest with the `` element (identity/publisher/id) for `CreateProcess` support.
- Reference: [Application Manifests (MSIX)](https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests#msix)
- [x] **Fix Versioning in `winapp-GUI`**
- Remove hardcoded `1.0.0.0` version.
- Ensure version is injected dynamically from the build pipeline to satisfy MSIX rules.
- [x] **Add ARM64 Support**
- Ensure `winapp-CLI` and GUI support generating/building for both x64 and ARM64.

Raw feedback:

1. `msix/appxmanifest.xml`
1.1. **RECOMMEND:** Remove EntryPoint (redundant and unnecessary)
* `Application/EntryPoint`=`Windows.FullTrustApplication`
* `uap10:TrustLevel`+`RuntimeBehavior` were introduced in Vibranium/20H1/10.0.19041.0
* `EntryPoint` and `uap10:TrustLevel`+`RuntimeBehavior` are redundant
* Only reason to use `EntryPoint` is to support systems <20H1
* `TargetDeviceFamily/MinVersion`=10.0.19045.0 (ie Win10 22H2)
* QED no need for EntryPoint
1.2. **RECOMMEND:** Change `Identity/Name` to "Microsoft.winapp"
* `Identity` is a programmatic identifier. Prefixing with "Microsoft." is recommended for all Microsoft packages to help ensure uniqueness
2. `src/winapp-CLI/WinApp.Cli/Templates/appxmanifest.hostedapp.xml`
2.1. **RECOMMEND:** Remove EntryPoint (redundant and unnecessary)
* `TargetDeviceFamily/MinVersion`=10.0.19041.0 (ie Win10 20H1)
* `uap10:TrustLevel`+`RuntimeBehavior` are supported on all releases >=MinVersion
3. `src/winapp-CLI/WinApp.Cli/Templates/appxmanifest.packaged.xml` + `appxmanifest.sparse.xml`
3.1. **RECOMMEND:** Remove TrustLevel+RuntimeBehavior (redundant and unnecessary)
* `TargetDeviceFamily/MinVersion`=10.0.19045.0 (ie Win10 22H2)
* `uap10:TrustLevel`+`RuntimeBehavior` aren't available on all systems down >=MinVersion
* `EntryPoint` is equivalent and while not as clear to the reader, the only option that works on older systems (<20H1)
4. `src/winapp-CLI/WinApp.Cli/Templates/appxmanifest.packaged.xml`
4.1. **RECOMMEND:** Add AppExecutionAlias for CreateProcess support

```



```

5. `src/winapp-CLI/WinApp.Cli/Templates/appxmanifest.sparse.xml`
5.1. **QUESTION:** Why is `RegistryWriteVirtualization` disabled? (and why registry but not filesystem)
* **RECOMMEND:** Remove this. Don't always disable i/o virtualization (not registry *or* filesystem)
* **RECOMMEND:** Add an optional input parameter to disable i/o virtualization if specified e.g. `MSIX.IOVirtualization.Registry.Write=` and `MSIX.IOVirtualization.FileSystem.Write=`. Default=`enable`, if `disable` is specified then add the `` / `` AND only specify the `unvirtualizedResources` rescap either either are enabled
* **SUGGESTION:** You can use a placeholder in the template e.g. `` and when transforming the template into appxmanifest.xml then delete the comment if enabled else replace it with `disabled` if disabled.
5.2. **QUESTION:** Why is `allowVirtualization` rescap specified?
* **RECOMMEND:** Remove this. Don't always specify this rescap.
* **RECOMMEND:** Add an optional input parameter to enable this e.g. `MSIX.Capability.Elevation.Allow=`. Default=false, if `true` is specified then add the rescap.
* **SUGGESTION:** Replace `` with a placeholder e.g. `` and delete or replace based on the input parameter. See above for similar placeholder.

6. appxmanifest*.xml
6.1. **QUESTION:** Is there a localization plan?
* DisplayName are string literals.
**RECOMMEND:** Change to `ms-resource:package.name` and `ms-resource:application.name` and define those in resources.pri for localization support (even if initially only `en-US` resources are defined)

7. `src/winapp-CLI/WinApp.Cli/Templates/appxmanifest.*.xml`
7.1. **ISSUE:** ` ` to `Publisher="{PublisherName.Identity}"`
* Change `` to `{PublisherName.Display}`
* Support input parameters `PublisherName`, `PublisherName.Identity` and `PublisherName.Display`
* Use `PublisherName.Identity` if specified, else implicitly define it as `CN={PublisherName}`
* Use `PublisherName.Display` if specified, else implicitly define it as `PublisherName`
* Or even better, always define `ms-resource:publisher.name` and define that in resources.pri as above (PublisherName.Display if specified, else PublisherName). See localization Question above.
7.2. **SUGGESTION:** Change `Description="{Description}"' to `Description="ms-resource:application.description"' and define that in resource.pri with the {Description} value
* If Description is not specified default its value to the same as DisplayName (ie always specify Description=... in appxmanifest.xml but by default it's the same as the display name)

8. Sparse package
8.1. **QUESTION:** Does winappcli generate apps as well as msix packge? Or at least an option to generate/update a Fusion manifest in an app? That would be very handy functionality
**RECOMMEND:** Add this functionality to create/update a Fusion manifest specifying the `` element for CreateProcess support
* https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests#msix

```


```

9. src/winapp-GUI/winapp-GUI/Package.appxmanifest
9.1. **ISSUE:** inconsistencies vs winappcli (`/msix/appxmanifest.xml`)
* Name="2be860b6-163c-4dae-b673-eefcf0c720fb" vs "winapp"
* **RECOMMEND:** Publisher"CN=mousma" vs CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
* **RECOMMEND:** Name="Microsoft.WinAppGUI" and "Microsoft.WinAppCLI"
* **RECOMMEND:** Specify ProcessorArchitecture for both
9.2. **ISSUE:** Version is hardcoded (1.0.0.0)
* This will violate the [3rd Rule of MSIX](https://www.osgwiki.com/wiki/Rules_of_MSIX#Third_rule_of_MSIX)
* **DON'T DO THIS**
* **RECOMMEND:** Change Version=actual (varying) version from build (not hardcoded)
9.3. **QUESTION:** Does winappcli support ARM64 as well as x64?
* **RECOMMEND:** Support both x64 + arm64 packages and binaries

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.