简体   繁体   English

C#Windows应用程序,资源文件夹中的图像文件被删除,出现错误

[英]C# windows application, image file from resource folder gets removed, getting error

In C#.net windows application, by mistake i have deleted an image from the resource folder, from solution explorer. 在C#.net Windows应用程序中,错误地从解决方案资源管理器中删除了资源文件夹中的图像。 Now its showing 现在显示

Link: http://postimg.org/image/9rebh6e49/ 链接: http//postimg.org/image/9rebh6e49/

109 errors in the resource file properties. 资源文件属性中出现109个错误。

Error 1 Partial declarations of 'CD_Management.Properties.Resources' have conflicting accessibility modifiers 错误1'CD_Management.Properties.Resources'的部分声明具有可访问性修饰符冲突

Error 2 The namespace 'CD_Management.Properties' already contains a definition for 'Resources' 错误2名称空间'CD_Management.Properties'已经包含'资源'的定义

CD_Management is my project name. CD_Management是我的项目名称。 Is there any method to solve it as i could not even now change the background image or any other image of my forms. 有什么方法可以解决它,因为我现在甚至无法更改表单的背景图像或任何其他图像。

Looks like you have two conflicting classes with the name "Resources", one generated and probably with internal access, and one which was added manually and probably public. 看起来您有两个名称为“ Resources”的冲突类,一个是生成的,可能具有内部访问权限,另一个是手动添加的,并且可能是公共的。 I noticed the name of your file - Resources2.Designer.cs , this looks unnatural and modified. 我注意到您文件的名称-Resources2.Designer.cs ,这看起来不自然且已修改。 Try to search the solution for all classes with name "Resources" and delete the ambigous one. 尝试在解决方案中搜索名称为“ Resources”的所有类,然后删除模棱两可的类。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM