我使用单声道与Xamarin工作室将我的Visual C#项目移植到MACosx,但我只缺少对图像和图标的引用。
我仔细更改了项目中的每个命名空间,但是当我在Mainwindow.designer.cs中调用它时:
this.pictureBox1.Image = global::MonoSync.Properties.Resources.foo_2;
引发此错误:
无法找到适合指定文化或中性文化的任何资源。确保" namespace.Properties.Resources.resources"被正确地嵌入或链接到汇编" gnegne"在编译时,或者所有所需的附属程序集都是可加载和完全签名的。
如果我去Resources.designer.cs:
internal static System.Drawing.Bitmap foo_2 {
get {
object obj = ResourceManager.GetObject("foo_2", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
发生了什么事?