此 WPF 应用程序的 Package.appxmanifest 已设置
<uap5:Extension Category="windows.appExecutionAlias" Executable="PROGRAMNAME.exe"
EntryPoint="Windows.FullTrustApplication">
<uap5:AppExecutionAlias>
<uap5:ExecutionAlias Alias="PROGRAMNAME.exe" />
</uap5:AppExecutionAlias>
</uap5:Extension>
但是当我尝试从命令行运行 PROGRAMNAME 时出现错误消息
"The system cannot find the file ....WindowsApps..."
我可以转到那个 WindowsApps 目录,即使我看到那个文件,运行它也会给我同样的错误。
我也试过
<uap3:Extension
Category="windows.appExecutionAlias"
Executable="$targetnametoken$.exe"
EntryPoint="Windows.FullTrustApplication">
<uap3:AppExecutionAlias>
<desktop:ExecutionAlias Alias="PROGRAMNAME.exe" />
</uap3:AppExecutionAlias>
</uap3:Extension>