简体   繁体   English

类型&#39;System.Linq.IQueryable`1 <T0> &#39;在未引用的程序集中定义

[英]The type 'System.Linq.IQueryable`1<T0>' is defined in an assembly that is not referenced

Despite the references being present already, or a default part of the build process, i'm getting 尽管已经存在参考,或者构建过程的默认部分,但我正在

Error 1 The type 'System.Linq.IQueryable`1' is defined in an assembly that is not referenced. 错误1类型'System.Linq.IQueryable`1'是在未引用的程序集中定义的。 You must add a reference to assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' 您必须添加对程序集'System.Core,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089'的引用

Error 2 The type 'System.Linq.IQueryable' is defined in an assembly that is not referenced. 错误2在未引用的程序集中定义了类型'System.Linq.IQueryable'。 You must add a reference to assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' 您必须添加对程序集'System.Core,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089'的引用

Error 3 The type 'System.Linq.IQueryProvider' is defined in an assembly that is not referenced. 错误3类型'System.Linq.IQueryProvider'在未引用的程序集中定义。 You must add a reference to assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' 您必须添加对程序集'System.Core,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089'的引用

on Divisions variable name. Divisions变量名称上。

public System.Data.Linq.Table<Division> Divisions
{
   get
     {
         return this.GetTable<Division>();
     }
}

This happened after i reinstalled visual studio 2013 express for web. 在我重新安装Visual Studio 2013 Express for Web之后,发生了这种情况。 projects that compiled and had no error previously, are all doing this exact same error. 先前已编译且没有错误的项目都在执行完全相同的错误。 can't add the reference it asks for because it's already included in the build schedule. 无法添加它要求的参考,因为它已包含在构建计划中。 tried removing the table reference and re-adding through the DBML auto generated code, and initially seems to work... but then the next table down the list is affected, and the next and so on. 尝试删除表引用并通过DBML自动生成的代码重新添加,起初似乎可以工作...但是随后,列表中的下一个表受到了影响,等等。 if i remove them all and re-add them all, the problem starts over again. 如果我全部删除并重新添加它们,问题将再次出现。

my web.config is littered with flailing attempts to kill this error. 我的web.config满是垃圾邮件,试图杀死该错误。 i've tried recreating the project from scratch, same thing. 我试图从头开始重新创建项目,同样的事情。

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<connectionStrings>
<add name="GenesisConnectionString" connectionString="Data Source=.\sqlexpress;Initial Catalog=Genesis;Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
<appSettings>
<add key="autoFormsAuthentication" value="false"/>
<add key="enableSimpleMembership" value="false"/>
<add key="webpages:Enabled" value="false"/>
</appSettings>
<system.web>
<customErrors mode="Off">         
</customErrors>
<compilation debug="true" targetFramework="4.0">
  <assemblies>
    <add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, publicKeyToken=b77a5c561934e089" />
    <add assembly="System.Data.Services.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
  </assemblies>
</compilation>
<pages controlRenderingCompatibilityVersion="4.0"/>
    <identity impersonate="false"/>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<validation validateIntegratedModeConfiguration="true"/>
    <handlers>
        <remove name="cshtm-Integrated-4.0"/>
        <remove name="cshtml-Integrated-4.0"/>
      <add name="UrlRoutingHandler" preCondition="integratedMode" verb="*" path="UrlRouting.axd" type="System.Web.HttpForbiddenHandler, 
           System.Web, Version=2.0.0.0, 
           Culture=neutral, 
           PublicKeyToken=31bf3856ad364e35"/>
        <add name="cshtml-Integrated-4.0" path="*.cshtml" verb="GET,HEAD,POST,DEBUG" type="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode,runtimeVersionv4.0"/>
        <add name="cshtm-Integrated-4.0" path="*.cshtm" verb="GET,HEAD,POST,DEBUG" type="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode,runtimeVersionv4.0"/>
    </handlers>

</system.webServer>
<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
            <assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
            <bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0"/>
        </dependentAssembly>
        <dependentAssembly>
            <assemblyIdentity name="System.Web.WebPages.Deployment" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
            <bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0"/>
        </dependentAssembly>
        <dependentAssembly>
            <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
            <bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0"/>
        </dependentAssembly>
    </assemblyBinding>
</runtime>
</configuration>

Is this an instance of broken VS release, or what am i missing? 这是VS版本损坏的一个实例,还是我缺少了什么? did i start the project wrong, and i forgot to say klaatu verata nicto ? 我开始这个项目错了吗,我忘了说klaatu verata nicto吗? i'd post a stack trace if it would even finish building the application. 如果它甚至可以完成构建应用程序,我都会发布一个堆栈跟踪。 thanks ahead for your help! 谢谢您的帮助!

It's System.Core.dll indeed, check the official msdn link 确实是System.Core.dll,请检查官方msdn链接

http://msdn.microsoft.com/en-us/library/bb351562(v=vs.110).aspx http://msdn.microsoft.com/en-us/library/bb351562(v=vs.110).aspx

暂无
暂无

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

相关问题 无法隐式转换类型&#39;System.Linq.IQueryable <AnonymousType#1> &#39;到&#39;System.Linq.IQueryable &lt;&gt;&#39; - Cannot implicitly convert type 'System.Linq.IQueryable<AnonymousType#1>' to 'System.Linq.IQueryable<>' 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 无法隐式转换类型&#39;System.Collections.Generic.List <T> &#39;to&#39;System.Linq.IQueryable <T> “ - Cannot implicitly convert type 'System.Collections.Generic.List<T>' to 'System.Linq.IQueryable<T>' c#-Linq错误“运算符&#39;==&#39;无法应用于类型为&#39;int&#39;和&#39;System.Linq.IQueryable的操作数 <T> ”和RemoveRange - c# - Linq Error “Operator '==' cannot be applied to operands of type 'int' and 'System.Linq.IQueryable<T>” and RemoveRange System.Linq.IQueryable错误 - System.Linq.IQueryable Error 无法将类型'System.Linq.IQueryable <int>'隐式转换为'int?' - Cannot implicitly convert type 'System.Linq.IQueryable<int>' to 'int?' 无法转换类型&#39;System.Linq.IQueryable <double?> &#39; 漂浮&#39; - Cannot convert type 'System.Linq.IQueryable<double?>' to 'float' 无法隐式转换System.Linq.IQueryable类型 <string> 串起来 - Cannot implicitly convert type System.Linq.IQueryable<string> to string 无法隐式转换类型&#39;System.Linq.IQueryable? - Cannot implicitly convert type 'System.Linq.IQueryable? MVC 5无法将类型&#39;System.Linq.IQueryable隐式转换为bool吗? - MVC 5 Cannot implicitly convert type 'System.Linq.IQueryable to bool?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM