C# 类型';系统Linq.IQueryable`1<;T0>';在未引用的程序集中定义

C# 类型';系统Linq.IQueryable`1<;T0>';在未引用的程序集中定义,c#,asp.net-mvc,linq,razor,visual-studio-2013,C#,Asp.net Mvc,Linq,Razor,Visual Studio 2013,尽管引用已经存在,或者是构建过程中的默认部分,我还是 得到 错误1在未引用的程序集中定义了类型“System.Linq.IQueryable”“1”。必须添加对程序集“System.Core,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089”的引用 错误2在未引用的程序集中定义了类型“System.Linq.IQueryable”。必须添加对程序集“System.Core,Version=4.0.0.0,Culture

尽管引用已经存在,或者是构建过程中的默认部分,我还是 得到

错误1在未引用的程序集中定义了类型“System.Linq.IQueryable”“1”。必须添加对程序集“System.Core,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089”的引用

错误2在未引用的程序集中定义了类型“System.Linq.IQueryable”。必须添加对程序集“System.Core,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089”的引用

错误3在未引用的程序集中定义了类型“System.Linq.IQueryProvider”。必须添加对程序集“System.Core,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089”的引用

分区上
变量名

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

这是一个破VS版本的实例,还是我缺少了什么?我是不是一开始就搞错了,忘了说“克拉图·维拉塔·尼托”?如果它能够完成应用程序的构建,我会发布一个堆栈跟踪。谢谢你的帮助

确实是System.Core.dll,请查看官方msdn链接


您的项目没有引用System.Core,或者引用已损坏。解决这个问题。
klaatu verata nicto
是什么意思?klaatu verata nikto来自《地球静止的日子》和《黑暗之军》两部经典之作。推荐。这句话是开玩笑的,与实际问题无关。我已经试着添加了那个参考。我不喜欢它。表示“无法添加对'System.Core'的引用。此组件已被生成系统自动引用。”因此。。。引用它有什么诀窍吗?在csproj文件中添加一行,告诉它
<?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>