azure - 缩小 Azure 上 FileLoadException 错误的范围

标签 azure f# suave

我正在将 Suave 应用程序部署到 Azure Web 应用。应用程序失败并出现以下错误(可在 eventlog.xml 中找到)。

<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>

如何确定丢失的确切文件或导致此问题的原因,以便修复它?

谢谢。

最佳答案

原来是FSharp.Core nuget包。从 FSharp.Core.3.1.2.5 升级到 FSharp.Core.4.0.0.1 解决了这个问题。我认为应用程序正在搜索 FSharp 4.4.0.0 并且此错误是因为它找到了旧版本。

关于azure - 缩小 Azure 上 FileLoadException 错误的范围,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41132457/

相关文章:

azure - 使用代码更改edgeAgent和edgeHub的 'createOptions'

f# - Suave 和 Fable.Remoting 中的 MissingMethodException

使用 Terraform 托管虚拟网络中的 Azure 集成运行时

azure - 无法使用 Azure API 管理中的返回响应策略返回响应

F#:配管 vs. 作曲 vs. ......作曲?

c# - A.CallTo(...).ReturnsLazily(...) 抛出 "The specified object is not recognized as a fake object."

f# - 如何在循环中调用 WriteBytesAsync

azure - 在 Azure Web Apps 中运行自托管 OWIN 应用程序

iis - 使用 HttpPlatformHandler 托管在 IIS 上的 Suave 应用程序关闭连接

azure - Azure SQL DW 中的 BroadcastMove