The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

前端 未结 8 1865
醉梦人生
醉梦人生 2021-01-17 09:33

After signing the third parties assemblies and adding them to GAC I am getting the below error: also the Assembly Binder Log Entry shows this error

It says mismatch

8条回答
  •  情书的邮戳
    2021-01-17 10:23

    I got this error using FASTjson:

    _jsonConfig = fastJSON.JSON.ToObject(jsonConfigFileContents);

    It failed on this line:

    Type t = Type.GetType(typename);

    Which causes an exception in System.RuntimeTypeHandle.GetTypeByName


    The problem was a difference in the JSON file compared to the JSON Object Model.

    The solution is to re-save the JSON Object Model to file, eg:

    string jsonSettings = fastJSON.JSON.ToJSON(JSONObjectModel);
    File.WriteAllText(JSONFilePath, jsonSettings);
    

提交回复
热议问题