如何为 ClickOnce 部署设置 .application 图标(仅限在线)

发布于 2024-09-28 12:42:47 字数 478 浏览 2 评论 0原文

我有一个 clickonce 应用程序,我希望 ApplicationName.application 文件具有该应用程序的图标。目前,ApplicaitonName.applicaiton 文件具有带有蓝色顶部和绿色箭头标准图标的默认窗口。

我在应用程序设置、资源、图标和清单下有一个应用程序图标。该应用程序图标设置为内容(我也尝试将其设置为嵌入资源)。该应用程序图标在运行时显示为应用程序的窗口图标和工具栏图标。

在“发布”下,我发布到 UNC 路径并单击“该应用程序仅在线可用”单选按钮。在应用程序文件下,Resources\ApplicationIcon.ico 为发布状态:包含(自动)、下载组:(必需)、哈希:包含(如果图标是嵌入资源,则它不在应用程序文件中)。

我通常打开 UNC 路径并创建 .application 文件的快捷方式以运行该应用程序。我只是希望 .application 文件具有与窗口和工具栏相同的图标,但不确定我还需要做什么才能实现这一点。非常感谢任何帮助。

I have a clickonce application that I would like to have the ApplicationName.application file have an icon for the application. Currently the ApplicaitonName.applicaiton file has the default window with blue top and green arrow standard icon.

I have an application icon under the application setup, resources, icon and manifest. That application icon is set to content (i have also tried with it set to embedded resource). That application icon shows up as the window icon and toolbar icon for the application when it is running.

Under publish I publish to a UNC Path and have the "The application is available online only" radio button clicked. Under Application Files the Resources\ApplicationIcon.ico is Publish Status: Include (Auto), Download Group: (Required), Hash: Include (if the icon is embedded resource it is not in the Application Files).

I generally open the UNC Path and create a shortcut to the .application file to run the application then. I just want that .application file to have the same icon as the windows and toolbar, but not sure what else i need to do to accomplish that. Any help is much appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

风流物 2024-10-05 12:42:47

.application 文件是部署清单。我认为您无法在该文件中添加图标。为什么拥有默认窗口图标很重要,因为如果托管在 IIS 中,客户端看不到它。
另一方面,您绝对可以向应用程序清单(.manifest 文件)添加一个图标,该图标显示在开始菜单和应用程序中。 .manifest 文件应类似于

<asmv1:assembly .. />
  <description asmv2:iconFile="custom.ico" xmlns="urn:schemas-microsoft-com:asm.v1" />
 ...  

在我的 msbuild 脚本中,我使用 GenerateApplicationManifest 任务 设置图标文件

The .application file is the deployment manifest. I don't think you can add an icon in that file. Why should it matter to have the default window icon as it is not seen by the client if hosted in IIS.
On the other hand you can definitely add an icon to the appplication manifest (the .manifest file) and this icon is what shown on the start menu and in the application. The .manifest file should look like

<asmv1:assembly .. />
  <description asmv2:iconFile="custom.ico" xmlns="urn:schemas-microsoft-com:asm.v1" />
 ...  

In my msbuild script I use the GenerateApplicationManifest task to set the IconFile

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文