Visual studio 主要输出的部署项目快捷方式 - 'Open file location' 不工作

Visual studio deployment project shortcut for primary output - 'Open file location' not working

当您使用部署项目创建主输出的快捷方式时,请执行以下步骤:

(根据这个 post Visual Studio Deployment Project - Create shortcut to deployed executable

In your Deployment Project go to File System Editor
Click on "Application Folder" (I assume you have "Primary Output" from your projects there)
Right click on "Primary Output" of the project you want to target with your shortcut - select "Create Shortcut to Primary Output ..."
Rename shortcut
Drag shortcut to Desktop / Programs Menu folder

一切正常,但是当您在安装后右键单击目标计算机上的快捷方式和 select 'Open file location' 选项时,应该会打开实际 exe 的文件夹,Windows 打开快捷方式所在的文件夹。快捷方式 'Properties' 中的 'Open target location' 按钮被禁用。

知道为什么它没有正确链接,即使点击它启动可执行文件一切正常吗?

MSI 安装的快捷方式默认为公布的快捷方式。这只是意味着快捷方式是指向其目标的间接指针,包含 Windows 安装程序产品代码、功能名称和组件 guid。作为激活的一部分,它会检查目标文件是否存在,如果不存在,它将修复已安装的产品。

如果您在命令行安装中将 DISABLEADVTSHORTCUTS 设置为 1 或手动将其添加到 MSI 文件(InstEd 或 Orca)的 属性 table,这将禁止创建它们。 https://msdn.microsoft.com/en-us/library/aa368297(v=vs.85).aspx