Other System.Core error - System.Core not found RRS feed

  • Question

  • User851750305 posted

    Hi all,

    I have a website target to framework 3.5, this web site reference an class library (target to 3.5 framework too).

    The Web.config of website has:

    <add assembly="Telerik.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE"/>
    <add assembly="Telerik.Reporting, Version=, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE"/>
    <add assembly="System.Core, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>


    <add assembly="System.Core, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>


    When i try to run the site don't give me any error on the web config, and almost all pages shows without problems. 

    The aspx pages that have this:

    <%@ Register Assembly="System.Web.Entity, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.Web.UI.WebControls" TagPrefix="asp" %>

    and use an object defined in class library give me this error:

    Could not load file or assembly 'System.Core, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.

    This is the stack trace:

    [FileNotFoundException: Não foi possível carregar o ficheiro ou assemblagem 'System.Core, Version=, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' ou uma das respectivas dependências. O sistema não conseguiu localizar o ficheiro especificado.]
       System.ModuleHandle.ResolveType(Int32 typeToken, RuntimeTypeHandle* typeInstArgs, Int32 typeInstCount, RuntimeTypeHandle* methodInstArgs, Int32 methodInstCount) +0
       System.ModuleHandle.ResolveTypeHandle(Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) +147
       System.Reflection.Module.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) +203
       System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, Module decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, RuntimeMethodHandle& ctor, Boolean& ctorHasParameters, Boolean& isVarArg) +133
       System.Reflection.CustomAttribute.IsCustomAttributeDefined(Module decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable) +183
       System.Reflection.CustomAttribute.IsDefined(Assembly assembly, RuntimeType caType) +100
       System.Reflection.Assembly.IsDefined(Type attributeType, Boolean inherit) +53
       System.Data.Metadata.Edm.ObjectItemCollection.IsSchemaAttributePresent(Assembly assembly) +29
       System.Data.Metadata.Edm.ObjectItemCollection.LoadAssemblyFromCache(ObjectItemCollection objectItemCollection, Assembly assembly, Boolean loadReferencedAssemblies) +132
       System.Data.Metadata.Edm.ObjectItemCollection.LoadFromAssembly(Assembly assembly) +61
       System.Data.Metadata.Edm.MetadataWorkspace.LoadFromAssembly(Assembly assembly) +77
       System.Web.UI.WebControls.EntityDataSourceView.ConstructContext() +708
       System.Web.UI.WebControls.EntityDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments, Creator qbConstructor) +97
       System.Web.UI.WebControls.EntityDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +102
       System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e) +95
       System.Web.UI.WebControls.ListControl.PerformSelect() +34
       System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
       System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
       System.Web.UI.WebControls.BaseDataBoundControl.OnPreRender(EventArgs e) +22
       System.Web.UI.WebControls.ListControl.OnPreRender(EventArgs e) +18
       System.Web.UI.Control.PreRenderRecursiveInternal() +80
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

    Other important aspects:
    1) In my dev machine, everything works good
    2) When i publish the compiled site to server show that error
    3) The server has 1.1,2.0 and 3.5 framework installed, i check in GAC and i have there System.Core 3.5 assembly
    4) The server is running windows XP pro SP 3 with all windows updates (it's the Portuguese language Version)
    5) This is only happen when i have in the same page references to my class library and System.Web.Entity could be exist any relation to the error ?

    Well, i really hope someone help me, i already check every post and do everything and i can't get it work.

    Thanks in advance,

    Rui Santos

    Tuesday, December 22, 2009 2:00 PM


  • User851750305 posted


    Well i resolved my problem, this way:

    1) Go to dev machine (where everything work well)

    2) Go to C:\Program Files\Microsoft SDKs\Silverlight\v2.0\Reference Assemblies

    3) Copy the System.Core.dll and Syste,Core.xml to bin of web site in the server

    Everything works fine now, i don't know why i need this, but i guess there is somewhere any reference to this assembly (my project don't have any silverligth app).

    Anyway, if someone have the same error ...

    Rui Santos

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, December 22, 2009 7:50 PM