简体   繁体   English

System.IObserver&#39;1 <T0> 在未引用的程序集中定义。 您必须添加对程序集的引用

[英]System.IObserver'1<T0> is defined in an assembly that is not referenced. You must add a reference to assembly

I have checked some code out of source control and am getting the following error when I try to build: 我已经检查了源代码控制中的一些代码,并在尝试构建时遇到以下错误:

The type 'System.IObserver`1' is defined in an assembly that is not referenced. 类型'System.IObserver`1'在未引用的程序集中定义。 You must add a reference to assembly 'System.Observable, Version=1.0.0.204, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 您必须添加对程序集'System.Observable,Version = 1.0.0.204,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'的引用

So first port of call was to Google. 所以第一个停靠点是谷歌。 Looks like I need the Rx Framework. 看起来我需要Rx框架。 So I downloaded the Reactive Extensions experimental release . 所以我下载了Reactive Extensions实验版 I installed it completely, closed VS2010 SP1, and then went back in. Getting the same error. 我完全安装了它,关闭了VS2010 SP1,然后重新进入。获得相同的错误。

What else could I need to do? 还有什么我需要做的?

As the message says, your project needs to reference the System.Observable assembly. 如消息所示,您的项目需要引用System.Observable程序集。 Simply installing the Rx framework doesn't add a reference to your project... 只需安装Rx框架就不会添加对项目的引用......

In Visual Studio 在Visual Studio中

  • Right-click the References folder of your project 右键单击项目的References文件夹
  • Click Add reference... 单击添加引用...
  • In the Add Reference window, choose from Assemblies >> Extensions 在“添加引用”窗口中,从“程序集”>>“扩展”中选择
  • Click System.Observable from the list 单击列表中的System.Observable
  • Click Add 单击添加

Problem solved 问题解决了

您已经安装了所需的扩展,但您仍需要将其添加为项目中的参考。

Try downloading from NuGet. 尝试从NuGet下载。 Right click, "Manage NuGet"... Search Online for "Rx_Exper.." 右键单击“管理NuGet”...在线搜索“Rx_Exper ..”

http://nuget.org/packages/Rx_Experimental-Silverlight/1.1.11111 http://nuget.org/packages/Rx_Experimental-Silverlight/1.1.11111

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 “System.Object”类型在未引用的程序集中定义。 您必须添加对程序集 .netstandard 的引用 - The type 'System.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard 类型“ System.Data.Common.DbTransaction”在未引用的程序集中定义。 您必须添加对程序集的引用 - The type 'System.Data.Common.DbTransaction' is defined in an assembly that is not referenced. You must add a reference to assembly “组件”类型是在未引用的程序集中定义的。 您必须添加对程序集“System.ComponentModel.Primitives”的引用 - The type 'Component' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel.Primitives' NSubstitute -3.x &#39;ValueType&#39; 在未引用的程序集中定义。 您必须添加对程序集“netstandard”的引用, - NSubstitute -3.x 'ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, “MarshalByRefObject”类型是在未引用的程序集中定义的。 您必须添加对程序集 &#39;mscorlib, Version=4.0.0.0 的引用 - The type 'MarshalByRefObject' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0 为什么我得到:“IThirdParty”类型是在未引用的程序集中定义的。 您必须添加对程序集“ThirdPartyAssembly”的引用吗? - Why am I getting: The type 'IThirdParty' is defined in an assembly that is not referenced. You must add a reference to assembly 'ThirdPartyAssembly'? 类型“ DbConnection”在未引用的程序集中定义。 我无法添加参考? - The type 'DbConnection' is defined in an assembly that is not referenced. I cannot add the reference? 类型&#39;System.Linq.IQueryable`1 <T0> &#39;在未引用的程序集中定义 - The type 'System.Linq.IQueryable`1<T0>' is defined in an assembly that is not referenced “IEnumerable &lt;&gt;”类型在未引用的程序集中定义。 System.Runtime - The type 'IEnumerable<>' is defined in an assembly that is not referenced. System.Runtime 类型“ IReportServerCredentials”在未引用的程序集中定义。 - type 'IReportServerCredentials' is defined in an assembly that is not referenced.
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM