microsoft / microsoft/WindowsAppSDK
Unable to use desktop7:Shortcut with Windows.PartialTrustApplication
@dhoehna is already working on this.
Since Mar 15, 2024.
- Dominant language
- C++
- Stars
- 4.7k
- Forks
- 471
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 28
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
- set
EntryPoint="Windows.PartialTrustApplication"in App Manifest - 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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.