无法解析主要引用,因为它对框架程序集具有间接依赖性

时间:2014-01-16 14:19:46

标签: c#

我正在尝试编译一个项目,但是当我尝试构建它时,我只是遇到错误。我收到了一些错误和一堆警告。我认为警告和错误是由同一件事引起的,DreamSeat。这是警告之一:

The primary reference "DreamSeat, Version=1.2.0.0, Culture=neutral, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the framework assembly "System.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v4.0". To resolve this problem, either remove the reference "DreamSeat, Version=1.2.0.0, Culture=neutral, processorArchitecture=MSIL" or retarget your application to a framework version which contains "System.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".

我也遇到错误:

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

所有错误和警告都是类似的,所以我认为它们都是由DreamSeat引起的。

如果尝试从.csproj文件中删除DreamSeat引用并超过警告但我仍然会收到错误。该程序是用C#编写的,我使用的是.NET Framework 4。

构建输出:http://pastebin.com/Gng6616g

1 个答案:

答案 0 :(得分:0)

缺少Dll。使用Dreamseat的引用并寻找缺少的dll。从找到源代码的位置下载DLL,然后重新编译。 删除引用不是解决方案。