引用的程序将不会加载加载、程序

2023-09-07 00:09:06 作者:孤独伴我安然无恙i

我有一个Visual Studio 2010项目,出版了被称为组件 myAssembly.ddl 。 那么我想引用 MyAssembly.dll程序从现有的VS 2008项目。如果我尝试加载参考它与一个黄色感叹号旁边,这表明没有被加载的程序集。不过,我不是在这个过程中得到的任何错误消息。显然,如果我尝试导入命名空间在我的code编译不能通过。

I've got a visual studio 2010 project which publishes an assembly called myAssembly.ddl. I then want to reference myAssembly.dll from an existing vs 2008 project. If I try to load the reference it comes up with an yellow exclamation mark next to it, suggesting that the assembly wasn't loaded. However, I'm not getting any error messages during that process. Obviously, if i try to import the namespace in my code it doesn't compile.

转换 MyAssembly.dll程序来一个.NET 3.5版没有按帮助。 大会也没有复制到不同的目录,并从那里引用它。

Converting myAssembly.dll to a .net version 3.5 doesn help. Nor does copying the assembly to a different directory and referencing it from there.

任何想法?

推荐答案

.NET哪些您使用的是建立在Visual Studio 2008的解决方案框架?

Which .NET Framework are you using to build the solution in Visual Studio 2008?

它需要3.5版,为了让你利用你的3.5框架编译MyAssembly.dll程序。 Visual Studio 2008中可以让你针对2.0框架,甚至是3.0框架。

It needs to be version 3.5 in order to allow you to utilize the myAssembly.dll that you compiled with the 3.5 framework. Visual Studio 2008 will allow you to target the 2.0 Framework or even the 3.0 Framework.

Visual Studio 2008的

Visual Studio 2008

项目>属性>应用程序标签 寻找目标框架

Project > Properties > Application tab Look for Target Framework