LoginSignup
0

More than 5 years have passed since last update.

Visual Studio > Windows Forms Application > Error: System.Resources.MissingManifestResourceException: '指定されたカルチャまたはニュートラルカルチャに対して適切なリソースが見つかりませんでした。...

Last updated at Posted at 2017-06-19
動作環境
Windows 7 Pro (32bit)
Microsoft Visual Studio 2017 Community

とあるライブラリを使うWindows Formsアプリケーションのサンプルプログラムがあった。

それを参考に新プロジェクトを作ってビルドしようとした。

以下を新規プロジェクトに上書きした。

  • ライブラリのcs
  • Form1.cs
  • Form1.Designer.cs

namespaceを合わせてビルドすると以下のエラーが出た。

this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));

例外はハンドルされていません
System.Resources.MissingManifestResourceException: '指定されたカルチャまたはニュートラルカルチャに対して適切なリソースが見つかりませんでした。...

対応

Iconの指定があやしいことは分かった。
Iconをどこで設定するのか。

Form1のiconプロパティにアイコン画像を設定する。

参考:
迫(Seko) 廣太郎さん
Formのアイコン(Icon)を変更する

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
0