【发布时间】:2020-05-01 19:10:24
【问题描述】:
您好,最近在我的项目中,我在 properties > window Style > Icon 上更改了窗口表单应用程序的图标 这是我选择的图标:
,但是每当我启动我的应用程序时,我都会收到此错误:
System.Resources.MissingManifestResourceException: 'Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "formApp.MyForm.resources" was correctly embedded or linked into assembly "formApp" at compile time, or that all the satellite assemblies required are loadable and fully signed.'
在这一行:
this->Icon = (cli::safe_cast<System::Drawing::Icon^>(resources->GetObject(L"$this.Icon")));
$this.Icon 对应于hello.ico。
知道如何解决这个问题吗?
提前致谢。
【问题讨论】:
-
我没有看到任何名为
$this.Icon的资源。 -
hello.ico!=$this.Icon -
@AlexanderPetrov 我改变了它,但它仍然产生相同的东西,这里 this.icon 指向正确的图标...
-
resource.rc将其作为IDI_ICON1,但代码尝试将其加载为"hello.ico"。 -
@dxiv 每当我尝试使用属性>窗口样式>图标更改徽标然后构建它时,我都不明白它会无限加载。我不明白....
标签: .net visual-studio c++-cli visual-studio-2019