2016-12-13 83 views
3

我正在向Azure web app部署Suave應用程序。該應用程序失敗,出現以下錯誤(在eventlog.xml中找到)。縮小Azure上的FileLoadException錯誤

<Event> 
    <System> 
     <Provider Name=".NET Runtime"/> 
     <EventID>1026</EventID> 
     <Level>0</Level> 
     <Task>0</Task> 
     <Keywords>Keywords</Keywords> 
     <TimeCreated SystemTime="2016-12-13T22:59:39Z"/> 
     <EventRecordID>-2049111390</EventRecordID> 
     <Channel>Application</Channel> 
     <Computer></Computer> 
     <Security/> 
    </System> 
    <EventData> 
     <Data> 
      Application: App.exe 
      Framework Version: v4.0.30319 
      Description: The process was terminated due to an unhandled exception. 
      Exception Info: System.IO.FileLoadException 

      Exception Info: System.IO.FileLoadException 
       at System.ModuleHandle.ResolveType(System.Reflection.RuntimeModule, Int32, IntPtr*, Int32, IntPtr*, Int32, System.Runtime.CompilerServices.ObjectHandleOnStack) 
       at System.ModuleHandle.ResolveTypeHandleInternal(System.Reflection.RuntimeModule, Int32, System.RuntimeTypeHandle[], System.RuntimeTypeHandle[]) 
       at System.Reflection.RuntimeModule.ResolveType(Int32, System.Type[], System.Type[]) 
       at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(System.Reflection.CustomAttributeRecord, System.Reflection.MetadataImport, System.Reflection.Assembly ByRef, System.Reflection.RuntimeModule, System.Reflection.MetadataToken, System.RuntimeType, Boolean, System.Object[], System.Collections.IList, System.RuntimeType ByRef, System.IRuntimeMethodInfo ByRef, Boolean ByRef, Boolean ByRef) 
       at System.Reflection.CustomAttribute.GetCustomAttributes(System.Reflection.RuntimeModule, Int32, Int32, System.RuntimeType, Boolean, System.Collections.IList, Boolean) 
       at System.Reflection.CustomAttribute.GetCustomAttributes(System.Reflection.RuntimeAssembly, System.RuntimeType) 
       at System.Reflection.RuntimeAssembly.GetCustomAttributes(System.Type, Boolean) 
       at System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type, Boolean) 
       at System.AppDomain.GetTargetFrameworkName() 
     </Data> 
    </EventData> 
</Event> 

如何確定丟失的確切文件或導致此問題的原因,以便修復它?

謝謝。

+1

我的猜測是你錯過了一些引用的'dll',可能是因爲它沒有被複制到與你的'App.exe'相同的輸出文件夾中。我不知道如何更好地調試這個,不幸的是! –

+0

感謝您的回覆。這是'FSharp.Core.dll'。如果其他人遇到同樣的問題,我提供了以下答案。 – ritcoder

回答

1

原來,它是FSharp.Core nuget包。從FSharp.Core.3.1.2.5升級到FSharp.Core.4.0.0.1解決了它。我認爲該應用程序正在搜索FSharp 4.4.0.0,並且此錯誤是因爲它找到了舊版本。