“计算机不是我的成员".NET错误 [英] "Computer is not a member of My" Error in .NET

查看:64
本文介绍了“计算机不是我的成员".NET错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此错误异常烦人.我已经进行了各种搜索,并且能够解决此问题.我是该应用程序的几个开发人员之一,并且是唯一一个有此问题的开发人员.我已通过在项目属性的我的扩展"面板中添加一个扩展(会生成一个不同的错误),然后删除该新扩展来临时修复它.那使错误消失了.片状,是吗?

This error is exceptionally annoying. I've done various searches, and have been able to fix this issue. I am one of several developers on the application and the only one with the issue. I've fixed it before temporarily by adding an extension to the My Extensions panel in the project's properties (which generates a different error) and then removing that new extension. That made the error go away. Flaky, eh?

无论如何:

If Not My.Computer.Network.IsAvailable Then
    ISConnectedToNetwork = False
    ...
End If

给出错误:

计算机"不是我"的成员.

'Computer' is not a member of 'My'.

说明这是在.NET 2.0中.

Clarification This is in .NET 2.0.

推荐答案

我能够以另一种混乱且可能是暂时的方式修复此小错误.

I was able to fix this little bug in another messed up and probably temporary way.

根据Pete的见解,我将项目的应用程序类型类库设置为 Windows窗体应用程序.

Working off of Pete's insight, I set the project's Application Type from Class Library to Windows Forms Application.

我在这一点上进行了构建,由于关于未实现"Main"的一些错误而导致构建失败.好的,所以我将其设置回类库".

I did a build at this point which failed due to some error about not having "Main" implemented. Okay, so I set it back to Class Library.

再次建立.成功.

SIGH

SIGH

这篇关于“计算机不是我的成员".NET错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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