visual-studio - VS2010 "An item with the same key has already been added"

标签 visual-studio image visual-studio-2010 icons designer

我最近安装了 Visual Studio 2010 并将旧的 VS2005 解决方案复制并转换为 VS2010

当我编辑此解决方案时,如果我尝试更改控件的 .image 属性,VS2010 会创建一个消息框,告诉我“已添加具有相同键的项目”(下面的屏幕截图),并且不会让我浏览一个图像。

我可以为任何其他解决方案添加图像,甚至是从 VS2005 移植的其他解决方案,但不是这个。知道我做错了什么吗?

An item with the same key has already been added. http://img121.imageshack.us/img121/3592/errorsy.jpg

最佳答案

由于搜索,我解决了这个问题。解决方案是永远不要创建名为“Resources.resx”的 .resx 文件,因为它与可以在项目属性对话框中自动创建的“Resources.resx”文件冲突。

一旦我将 Resources.resx 重命名为 Icons.resx,我就能够更改解决方案中任何内容的图像属性。

关于visual-studio - VS2010 "An item with the same key has already been added",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3003914/

相关文章:

c++ - 我该如何解决这个错误? CRT 检测到应用程序在堆缓冲区结束后写入内存

visual-studio - 在 Visual Studio 2008 上为 SharePoint 2010 构建 Web 部件

c# - 使用csc时出现奇怪的警告

image - 上传时在媒体图片上添加替代文字 - Umbraco

C# 单元测试 : UnauthorizedAccessException when using API that uses network

html - 在图像上重叠 Google Adsense

java.awt -- 当java输出图像到我的显示器(屏幕)时,输出到显示器卡的文件在哪里?

c# - 如何在 VS2010 的新 web.config 配置中使用 applicationSettings?

c++ - 在 VS2010 中未经调试运行时发布版本不起作用

visual-studio - 在 Visual Studio Debug模式下复制对象值