Skip to content

Unable to use desktop7:Shortcut with Windows.PartialTrustApplication #4264

Open

Description

Describe the bug

I'm building and app that I want to distribute using MSIX.
I want to put my App as Windows.PartialTrustApplication as it's good habit to request minimal permissions.

I want my App to create a Desktop Shortcut, when app is installed

i do it following way

        <desktop7:Extension Category="windows.shortcut">
          <desktop7:Shortcut
            File="[{Desktop}]\My App.lnk"
            Icon="[{Package}]\VFS\ProgramFilesX64\myApp\myApp.exe"
            ExcludeFromShowInNewInstall="false"/>
        </desktop7:Extension>

It works well, when Windows.FullTrustApplication is specified

However I discovered that it's not possible to use it with Windows.PartialTrustApplication

I'm using MSIX Packaging tool, so it doesn't return useful error message

Unspecified error

'myApp' violates pattern constraint of '\bms-resource:.{1,256}'.

I'm not sure that I reporting this in right place, as microsoft has so many projects 🙂

Steps to reproduce the bug

  1. set EntryPoint="Windows.PartialTrustApplication" in App Manifest
  2. Add shortcut extension
        <desktop7:Extension Category="windows.shortcut">
          <desktop7:Shortcut
            File="[{Desktop}]\My App.lnk"
            Icon="[{Package}]\VFS\ProgramFilesX64\myApp\myApp.exe"
            ExcludeFromShowInNewInstall="false"/>
        </desktop7:Extension>

Expected behavior

Desktop Shortcut should be availible for Windows.PartialTrustApplication. There is nothing bad to create Shortcut on installation

Screenshots

No response

NuGet package version

None

Packaging type

Packaged (MSIX)

Windows version

Windows 11 version 21H2 (22000)

IDE

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

area-DeploymentIssues related to packaging, installation, runtime (e.g., SelfContained, Unpackaged)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions