{"action":"created","issue":{"url":"https://api.github.com/repos/pardeike/Harmony/issues/86","repository_url":"https://api.github.com/repos/pardeike/Harmony","labels_url":"https://api.github.com/repos/pardeike/Harmony/issues/86/labels{/name}","comments_url":"https://api.github.com/repos/pardeike/Harmony/issues/86/comments","events_url":"https://api.github.com/repos/pardeike/Harmony/issues/86/events","html_url":"https://github.com/pardeike/Harmony/issues/86","id":322576834,"number":86,"title":"Deserialization exception","user":{"login":"ivan-ra","id":1991195,"avatar_url":"https://avatars0.githubusercontent.com/u/1991195?v=4","gravatar_id":"","url":"https://api.github.com/users/ivan-ra","html_url":"https://github.com/ivan-ra","followers_url":"https://api.github.com/users/ivan-ra/followers","following_url":"https://api.github.com/users/ivan-ra/following{/other_user}","gists_url":"https://api.github.com/users/ivan-ra/gists{/gist_id}","starred_url":"https://api.github.com/users/ivan-ra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivan-ra/subscriptions","organizations_url":"https://api.github.com/users/ivan-ra/orgs","repos_url":"https://api.github.com/users/ivan-ra/repos","events_url":"https://api.github.com/users/ivan-ra/events{/privacy}","received_events_url":"https://api.github.com/users/ivan-ra/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-05-13T09:02:36Z","updated_at":"2018-05-13T14:30:27Z","closed_at":null,"author_association":"NONE","body":"Hi!\r\nfor me this code raises FileNotFoundException:\r\n`harmony.Patch(original, new HarmonyMethod(prefix), null);`\r\n`harmony.RemovePatch(original, HarmonyPatchType.Prefix); // FileNotFoundException`\r\nBut [this workaround](https://stackoverflow.com/questions/8564761/c-sharp-deserialization-of-system-type-throws-for-a-type-from-a-loaded-assembly) solves problem. Perhaps it's worth adding it to the library code"},"comment":{"url":"https://api.github.com/repos/pardeike/Harmony/issues/comments/388631133","html_url":"https://github.com/pardeike/Harmony/issues/86#issuecomment-388631133","issue_url":"https://api.github.com/repos/pardeike/Harmony/issues/86","id":388631133,"user":{"login":"ivan-ra","id":1991195,"avatar_url":"https://avatars0.githubusercontent.com/u/1991195?v=4","gravatar_id":"","url":"https://api.github.com/users/ivan-ra","html_url":"https://github.com/ivan-ra","followers_url":"https://api.github.com/users/ivan-ra/followers","following_url":"https://api.github.com/users/ivan-ra/following{/other_user}","gists_url":"https://api.github.com/users/ivan-ra/gists{/gist_id}","starred_url":"https://api.github.com/users/ivan-ra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivan-ra/subscriptions","organizations_url":"https://api.github.com/users/ivan-ra/orgs","repos_url":"https://api.github.com/users/ivan-ra/repos","events_url":"https://api.github.com/users/ivan-ra/events{/privacy}","received_events_url":"https://api.github.com/users/ivan-ra/received_events","type":"User","site_admin":false},"created_at":"2018-05-13T14:30:27Z","updated_at":"2018-05-13T14:30:27Z","author_association":"NONE","body":"And when i add this strings in my code, all works fine\r\n`public static class AssemblyResolverFix`\r\n`{`\r\n`    //Looks up the assembly in the set of currently loaded assemblies,`\r\n`    //and returns it if the name matches. Else returns null.`\r\n`    public static Assembly HandleAssemblyResolve(object sender, ResolveEventArgs args)`\r\n`    {`\r\n`        return Array.Find(AppDomain.CurrentDomain.GetAssemblies(), assembly => assembly.FullName == args.Name);`\r\n`    }`\r\n`}`\r\n...\r\n`AppDomain.CurrentDomain.AssemblyResolve += AssemblyResolverFix.HandleAssemblyResolve;`"}}
{"actor":{"display_login":"ivan-ra"}}