参考的DLL在Visual Studio 2010中不加载 [英] Reference DLLs not loading in Visual Studio 2010

查看:142
本文介绍了参考的DLL在Visual Studio 2010中不加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作在一个VS2010 C#4.0项目,并使用包含了对VS2008建立在C#3.5控制一些较旧的DLL的需要。当我第一次添加DLL来引用,我能看到通过智能感知命名空间和创建控件的一个实例,但是当我去打造,它给了我以下错误:

I'm working on a C# 4.0 project in VS2010 and needed to use some older DLLs containing controls that were created in C# 3.5 on VS2008. When I first add the DLLs to the references, I was able to see the namespace via intellisense and create an instance of one of the controls, but when I go to build, it gives me the following error:

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

和我的的有using指令该命名空间已经,这是现在红色下划线,这表明VS找不到。而现在,智能感知不会拿起命名空间都没有。

And I do have a using directive for that namespace already, which is now underlined in red, showing that VS cannot find it. And now, intellisense won't pick up that namespace at all.

我甚至尝试添加控件工具箱(它的工作),但后来当我把它们拖到图形用户界面,它说,它无法找到该DLL的引用,尽管它显然知道它在哪里。

I even tried added the controls to the toolbox (which worked) but then when I drag them to the GUI, it says that it cannot locate the DLL reference, even though it obviously knows where it is.

我甚至尝试改变目标框架3.5,但仍与相同的结果。

I even tried changing the target framework to 3.5, but still with the same results.

有什么想法,为什么这可能是发生?

Any thoughts as to why this could be happening?

修改 - 我已经通知了在VS输出,它没有对我试图用任何的DLL /参考条目CSC.EXE参数。当我创建在VS2008相同的基本项目,存在这些条目。另外,我可以成功地引用的DLL在VS2010一个DLL项目......这似乎只是WinForms的项目,不工作。

Edit - I've notice that in the csc.exe arguments that VS outputs, it does not have any /reference entries for the DLLs I'm trying to use. When I create the same basic project in VS2008, those entries exist. Also, I can successfully reference the DLLs in a DLL project in VS2010... it seems to just be WinForms projects that don't work.

推荐答案

原来,这是事做VS2010默认为.NET 4的客户端配置文件的,只要我把它改成常规配置文件它还内置罚款。有浪费...

Turns out that it was something to do with VS2010 defaulting to the .NET 4 client profile, as soon as I changed it to the regular profile it built fine. There's a day wasted...

这篇关于参考的DLL在Visual Studio 2010中不加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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