1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Visual Studio Installer で作成したショートカットにアイコンが反映されない件

Posted at

いきさつなど

社内で使用するツールを作成した際、インストーラー形式で配布することになった。
せっかくなのでインストール時にショートカットを作成。
そのショートカットにアイコンの設定をしたところ反映されなかった。

設定した内容

以下の設定でインストーラーのプロジェクトを新規作成

  • Setup Wizard プロジェクトをソリューションに追加
  • Create a setup for a Windows Application を選択
  • プライマリ出力を選択

上記の後、以下の対応を実施

  • ショートカットを User's Desktop 及び User's Programs Menu に追加
  • それぞれのショートカットの Icon プロパティを設定
    その際に .ico ファイルを直接指定した

その後、ソリューションのビルドを行いセットアップファイルを作成。
試しにインストールを実施したが、
デスクトップやプログラムメニューに作成されたショートカットのアイコンが既定のものになっていた。

最終的にどうしたのか

アイコンを指定する際に、.ico ファイルではなく、.exe ファイル (プライマリ出力) を選択する。

参考

  • 以下のアイコン設定の項 (導入から作成まで一通り載ってました)

  • .ico ファイル自体に問題があったケースも

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?