参考消失在调试/版本(C#,VB.NET,VS2010) [英] Reference disappear upon debug/build (C#, VB.NET, VS2010)

查看:399
本文介绍了参考消失在调试/版本(C#,VB.NET,VS2010)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 MagicLibrary 几部分。我知道这是用Visual Studio 2003和重新编译它在Visual C#速成2010年。它编译就好了,我可以看到该文件夹​​在库中。

I am using the MagicLibrary for a few components. I knew it was written in Visual Studio 2003 and recompiled it in Visual C# Express 2010. It compiled just fine and I could see the library in the folder.

然后我创建在Visual C#2010 Express中的一个新项目,并添加到工具箱的组件 MagicalLocalLibrary.dll 。他们似乎罚款没有任何错误。我把在控制从工具箱到我的形式,它看上去都不错。然后我调试(查看是否会出现任何错误),我看到了参考 MagicalLibrary 消失了,我得到了错误:

I then created a new project in Visual C# Express 2010 and added the components MagicalLocalLibrary.dll to the Toolbox. They appeared fine with no errors. I put in a control from the Toolbox to my form, and it seemed fine. I then debugged (to see if any errors would occur) and I saw that the reference MagicalLibrary disappeared and I got the error:

The type or namespace name 'Crownwood' could not be found (are you missing a using directive or an assembly reference?)

的事情是,参考下显示在Solution Explorer中引用罚款,但与 或使用它的代码(根本没有在InstelliSense列出其中任一),但如果我去到对象浏览器,并选择未列出我的解决方案。我可以在Solution Explorer中的参考点击并只需更改复制本地属性为True或False,那么它会出现在对象浏览器,但每当我再次调试我的项目就消失了。

The thing is that, the reference shows fine under References in Solution Explorer but I can't import it with using or use it in the code (simply is not listed in InstelliSense either) but if i go into the Object Browser and choose "My Solution" it is not listed. I can click on the Reference in Solution Explorer and just change the Copy Local property to True or False, then it will appear in the Object Browser but whenever I debug my project again it disappear.

任何想法,为什么它这样做?先谢谢了。

Any idea why it does this? Thanks in advance.

推荐答案

检查是否正在使用的.Net 4框架,而不是客户端配置版本

Check that you are using the .Net 4 framework and not the client profile version

您发现设置,当你在你的项目上单击右键,选择属性。并根据申请有对目标框架的设置。如果你选择了.NET 4.0框架的客户端配置文件,然后你描述的这种行为可能发生

You find that setting when you right-click on your project, choose properties. And under application there is a setting for target framework. If you have chosen the .Net 4 framework Client Profile, then this behavior that you described can happen

这篇关于参考消失在调试/版本(C#,VB.NET,VS2010)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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