如何修复“资源”不是“我的”成员 [英] How to fix the 'Resources' is not a member of 'My'

查看:61
本文介绍了如何修复“资源”不是“我的”成员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VS2010,并且在我所有的项目中都可以使用 My.Resources,并显示该项目的资源部分中的所有文件。在这个项目中,我在项目中有一堆资源文件,但是编译器抱怨:

I am using VS2010 and in all of my projects "My.Resources" is available and shows all the files that are in the "resources" section of the project. In this one project I have a bunch of resource files in the project but the compiler complains:

'Resources' is not a member of 'My'

我在哪里:

Private lockedImage = My.Resources.myfile

怎么办我解决了这个问题吗?

How do I fix this?

推荐答案

在VS2010中,在解决方案资源管理器中的[您的项目]->我的项目-> Resources.resx中查找。单击属性,并确保自定义工具命名空间显示为 My.Resources。 (花了我一个小时来解决这个问题)

In VS2010 Look in the Solution Explorer at [Your Project] -> My Project -> Resources.resx. Click on "Properties" and make sure that "Custom Tool Namespace" says "My.Resources". (took me an hour to figure this out)

这篇关于如何修复“资源”不是“我的”成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆