更改名称空间后,C#resx文件无法正常工作

Jam*_*ame 6 c# resx embedded-resource winforms

我正在处理现有的Windows窗体应用程序.我只需要做一些修改,在这些更改过程中我遇到了一个需要重命名现有命名空间的场景.现在重命名该命名空间后,我的项目没有运行.虽然它编译得很好,但在以下代码行中断

ImageList il = new ImageList();
ImageList = il;            
il.Images.Add((Image)new Bitmap(GetType(), "Images.ImageFileName.png"));//when this line is executed a dialog box appears and says that "there is no source code available for current location"
Run Code Online (Sandbox Code Playgroud)

现在因为我是.net世界的新手,所以我研究这个问题,并认为它是由于namspace的变化而产生的.我也尝试在Resources.Designer.cs中重命名命名空间,但它也没有解决我的问题

Jam*_*ame 5

谢谢大家.

我自己找到了解决方案.在这里发布解决方案的目的可能是其中一些人从中受益.事实上它是我身边的一种粗心,因为我忘了改变Property"Default NameSpace"的值,这个属性包含旧命名空间,这就是我的资源文件alwasy指向旧命名空间的原因