在特定路径中应用程序任务栏图标设置错误 - 这是设置在哪里?

时间:2022-05-06 22:53:20

I'm working on an application (C#/WPF) and when it is installed in the Program Files folder and run the icon on the taskbar shows up wrongly as this;

我正在处理一个应用程序(C#/ WPF),当它安装在Program Files文件夹中并运行时,任务栏上的图标显示错误;

在特定路径中应用程序任务栏图标设置错误 - 这是设置在哪里?

But if I rename or copy into another folder the correct icon appears when run. It seems like an icon is set for this file in this path. I've had a look through the registry but with no luck and also cleared the icon cache.

但如果我重命名或复制到另一个文件夹,运行时会出现正确的图标。看起来在此路径中为此文件设置了一个图标。我已经看过注册表,但没有运气,也清除了图标缓存。

Any ideas?

2 个解决方案

#1


0  

That is a symptom of the icon being cached and the cache not being refreshed. Normally a restart fixes the problem.

这是缓存图标并且缓存未刷新的症状。通常,重新启动可以解决问题。

#2


0  

I had the same problem, and fixed it through the setup project.

我有同样的问题,并通过安装项目修复它。

In Visual Studio:

在Visual Studio中:

  1. right click the setup project.

    右键单击安装项目。

  2. Select View -> File System.

    选择查看 - >文件系统。

  3. Display properties for the shortcut for your application (typically under Users Program Menu).

    显示应用程序快捷方式的属性(通常在“用户程序菜单”下)。

  4. The Shortcut will have a property call Icon. Set that to the EXE of your application, or set it to an icon in your setup package.

    快捷方式将有一个属性调用图标。将其设置为应用程序的EXE,或将其设置为安装程序包中的图标。

  5. Build the setup project, and then re-install.

    构建安装项目,然后重新安装。

#1


0  

That is a symptom of the icon being cached and the cache not being refreshed. Normally a restart fixes the problem.

这是缓存图标并且缓存未刷新的症状。通常,重新启动可以解决问题。

#2


0  

I had the same problem, and fixed it through the setup project.

我有同样的问题,并通过安装项目修复它。

In Visual Studio:

在Visual Studio中:

  1. right click the setup project.

    右键单击安装项目。

  2. Select View -> File System.

    选择查看 - >文件系统。

  3. Display properties for the shortcut for your application (typically under Users Program Menu).

    显示应用程序快捷方式的属性(通常在“用户程序菜单”下)。

  4. The Shortcut will have a property call Icon. Set that to the EXE of your application, or set it to an icon in your setup package.

    快捷方式将有一个属性调用图标。将其设置为应用程序的EXE,或将其设置为安装程序包中的图标。

  5. Build the setup project, and then re-install.

    构建安装项目,然后重新安装。