none
Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. RRS feed

  • 问题

  • 我尝试发布一个website到Azure上时遇到了如下错误,

    Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.              Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.            

    Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.

    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.                  

    Assembly Load Trace: The following information can be helpful to determine why the assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' could not be loaded.
    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
    
                      

    Stack Trace:
    [FileNotFoundException: Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.]
       WebApplication1.Startup.ConfigureAuth(IAppBuilder app) +0
       WebApplication1.Startup.Configuration(IAppBuilder app) +5
    
    [TargetInvocationException: Exception has been thrown by the target of an invocation.]
       System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
       System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +92
       System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +155
       Owin.Loader.<>c__DisplayClass12.<MakeDelegate>b__b(IAppBuilder builder) +66
       Owin.Loader.<>c__DisplayClass1.<LoadImplementation>b__0(IAppBuilder builder) +123
       Microsoft.Owin.Host.SystemWeb.<>c__DisplayClass2.<InitializeBlueprint>b__0(IAppBuilder builder) +71
       Microsoft.Owin.Host.SystemWeb.OwinAppContext.Initialize(Action`1 startup) +470
       Microsoft.Owin.Host.SystemWeb.OwinBuilder.Build(Action`1 startup) +40
       Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint() +70
       System.Threading.LazyInitializer.EnsureInitializedCore(T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory) +86
       Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication context) +106
       System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +418
       System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
       System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
       System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296
    
    [HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9930568
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
    

    我想知道我的问题到底出在哪里?

    2014年12月18日 7:33

答案

  • Hi Birdsven,

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

    从这个错误信息来看,貌似在发布的过程中丢失了EntityFramework这个引用,我的建议是在发布前去确认下你的entityFramework的copy local属性,将它的值改成true在重新发布,具体看下图。

    希望能帮到你。

    Best Regards,

    Jambor


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    2014年12月18日 9:22
    版主

全部回复

  • Hi Birdsven,

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

    从这个错误信息来看,貌似在发布的过程中丢失了EntityFramework这个引用,我的建议是在发布前去确认下你的entityFramework的copy local属性,将它的值改成true在重新发布,具体看下图。

    希望能帮到你。

    Best Regards,

    Jambor


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    2014年12月18日 9:22
    版主
  • 无法添加数据连接 Could not load file or assembly 'Microsoft.sqlServer.Manage,

    完整错误提示:无法添加数据连接 Could not load file or assembly 'Microsoft.sqlServer.Management.Sdk.Sfc,Version=12.0.0.0.Culture=neutral,PublicKeyToken=89845dcd8080cc91'or one of its dependencies.系统找不到指定的文件   这样的怎么办啊,我也是这个出错,但是按照您的方法,没有解决,我应该怎么办

    2020年3月30日 13:18