小弟最近在用dotmsn, 自己也用人家的框架写点程序,考了人家一段代码,一跑这里总出问题,哪位大侠好心给解决一下,感激不尽 private delegate ConversationForm CreateConversationDelegate(Conversation conversation);        private ConversationForm CreateConversationForm(Conversation conversation)
        {
            // create a new conversation. However do not show the window untill a message is received.
            // for example, a conversation will be created when the remote client sends wants to send
            // you a file. You don't want to show the conversation form in that case.
            ConversationForm conversationForm = new ConversationForm(conversation);            // do this to create the window handle. Otherwise we are not able to call Invoke() on the
            // conversation form later.
            conversationForm.Handle.ToInt32();            return conversationForm;
        }Error 1 The type or namespace name 'ConversationForm' could not be found (are you missing a using directive or an assembly reference?) D:\C_lang\msnrobot\msnrobot\robot.cs 161 26 msnrobot我仔细核对了所有的using我都加上了,而且应该reference的地方也加上了,可是死活就抱这个错。

解决方案 »

  1.   

    ConversationForm这个是什么? 可能少引用了某个第三方的.dll
      

  2.   

    ConversationForm  你引用了第三方的dll,你要在reference 添加引用
      

  3.   

    Clear Solution
    Rebuild Solution
    ReAdd Reference
      

  4.   

    不光是要添加using,还得在项目里面添加引用选择项目菜单=>引用,打开的窗口中选择浏览,找到那个文件,确定。
      

  5.   

    错误:类型OR命名空间'ConversationForm' 没有发现。所有的using我都加上了,而且应该reference的地方也加上了我不知道你是如何处理的,如果是只加上代码using等当然会出错了,你要通过操作Using后才能写上using代码
    等的。
      

  6.   

    我的楼主,我刚刚试了删除reference再重加,然后再rebuild,可是还是不行啊,这个ConversationForm 确实引用了第三方,可是我的确添加了 
      

  7.   

    有这种可能,你引用的第三方的dll本身引用了其他dll,你没有把它加进来,也会报这个错误,就是说你使用的这个类其实不在你引用的dll里,在你的引用的dll依赖的另外一个dll里。