[英]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.