Forum Discussion
MSIX file association - windows cannot find file error
bbelko
Try this.
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:desktop4="http://schemas.microsoft.com/appx/manifest/desktop/windows10/4" xmlns:desktop5="http://schemas.microsoft.com/appx/manifest/desktop/windows10/5" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" xmlns:uap10="http://schemas.microsoft.com/appx/manifest/uap/windows10/10" xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10" xmlns:desktop7="http://schemas.microsoft.com/appx/manifest/desktop/windows10/7" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" xmlns:com="http://schemas.microsoft.com/appx/manifest/com/windows10" IgnorableNamespaces="uap uap3 uap10 desktop desktop7 rescap com desktop4 desktop5">
....
..
<Extensions>
<desktop7:Extension Category="windows.shortcut">
<desktop7:Shortcut File="[{Common Programs}]\Notepad++.lnk" Icon="[{Package}]\VFS\ProgramFilesX64\Notepad++\notepad++.exe" />
</desktop7:Extension>
...
..
On OS >= Win10. If you want Execution Alias. Add
<uap3:Extension Category="windows.appExecutionAlias" EntryPoint="Windows.FullTrustApplication">
<uap3:AppExecutionAlias>
<desktop:ExecutionAlias Alias="notepad++.exe" />
</uap3:AppExecutionAlias>
</uap3:Extension>
Add FileType Association (right click, open with Notepad++)
<uap3:Extension Category="windows.fileTypeAssociation">
<uap3:FileTypeAssociation Name="txt">
<uap:SupportedFileTypes>
<uap:FileType>.txt</uap:FileType>
</uap:SupportedFileTypes>
</uap3:FileTypeAssociation>
</uap3:Extension>
If you want context menu on all files. Add
<com:Extension Category="windows.comServer">
<com:ComServer>
<com:SurrogateServer DisplayName="contextmenuhandlers">
<com:Class Id="B298D29A-A6ED-11DE-BA8C-A68E55D89593" Path="VFS\ProgramFilesX64\Notepad++\contextMenu\Nppshell.dll" ThreadingModel="STA" />
</com:SurrogateServer>
</com:ComServer>
</com:Extension>
<desktop4:Extension Category="windows.fileExplorerContextMenus">
<desktop4:FileExplorerContextMenus>
<desktop5:ItemType Type="*">
<desktop5:Verb Id="ContextMenuHandlers" Clsid="B298D29A-A6ED-11DE-BA8C-A68E55D89593" />
</desktop5:ItemType>
</desktop4:FileExplorerContextMenus>
</desktop4:Extension>
...
..
</Extensions>
</Application>
</Applications>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
</Package>