{"action":"created","issue":{"url":"https://api.github.com/repos/TrackableEntities/trackable-entities/issues/128","repository_url":"https://api.github.com/repos/TrackableEntities/trackable-entities","labels_url":"https://api.github.com/repos/TrackableEntities/trackable-entities/issues/128/labels{/name}","comments_url":"https://api.github.com/repos/TrackableEntities/trackable-entities/issues/128/comments","events_url":"https://api.github.com/repos/TrackableEntities/trackable-entities/issues/128/events","html_url":"https://github.com/TrackableEntities/trackable-entities/issues/128","id":146934105,"number":128,"title":"GetChanges on Client throws Newtonsoft.Json.JsonSerializationException","user":{"login":"edi0177","id":9989428,"avatar_url":"https://avatars.githubusercontent.com/u/9989428?v=3","gravatar_id":"","url":"https://api.github.com/users/edi0177","html_url":"https://github.com/edi0177","followers_url":"https://api.github.com/users/edi0177/followers","following_url":"https://api.github.com/users/edi0177/following{/other_user}","gists_url":"https://api.github.com/users/edi0177/gists{/gist_id}","starred_url":"https://api.github.com/users/edi0177/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edi0177/subscriptions","organizations_url":"https://api.github.com/users/edi0177/orgs","repos_url":"https://api.github.com/users/edi0177/repos","events_url":"https://api.github.com/users/edi0177/events{/privacy}","received_events_url":"https://api.github.com/users/edi0177/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-04-08T13:49:35Z","updated_at":"2016-08-09T07:40:42Z","closed_at":null,"body":"Hello Tony and Contributors,\r\n\r\ni am moving from TE 2.2 to current 2.5 and now facing a Problem with the current implementation of GetChanges. \r\n\r\nI have a WCF Webservice, which serves ma entity-objects (now all from type EntityBase) and a .net 4.5.1 Client Application which recives the entities.\r\n\r\nThe Entity-POCO's are shared between server and client as a Nuget-Package.\r\n\r\nThe Exception occurs if i recive some objects from the server and call GetChanges:\r\n\r\n Message:\r\n Could not find type 'TrackableEntities.Client.ChangeTrackingCollection`1+CloneChangesHelper+Wrapper[[My.Shared.Namespace.MyEntityObj, My.Shared.Namespace]]' in assembly 'TrackableEntities.Client, Version=2.5.0.0, Culture=neutral, PublicKeyToken=b10b51e7b9be6a2e'.\r\n\r\nI added the Stacktrace\r\n\r\n[stacktrace.txt](https://github.com/TrackableEntities/trackable-entities/files/210213/stacktrace.txt)\r\n\r\nit seems that the DefaultSerializationBinder wants to find my object-Type in the Trackable Entities assembly, becouse the JSON Serializer is called from there.\r\n\r\nSo the one option i found is to derrive my own DefaultSerializationBinder like in \r\nhttp://stackoverflow.com/questions/17485955/how-to-change-the-assemby-and-the-object-type-on-the-newtonsoft-json-serializati\r\n\r\nBut is there a better option than that ?\r\n\r\n\r\n\r\nI am using Newtonsoft JSON 6.0.8, like the dependency from the TE nuget package.\r\n\r\n<package id=\"TrackableEntities.Client\" version=\"2.5.2\" targetFramework=\"net451\" />\r\n  <package id=\"TrackableEntities.Common\" version=\"2.5.2.1\" targetFramework=\"net451\" />\r\n <package id=\"Newtonsoft.Json\" version=\"6.0.8\" targetFramework=\"net451\" />\r\n\r\n\r\nThank you for your help\r\n\r\nKonrad"},"comment":{"url":"https://api.github.com/repos/TrackableEntities/trackable-entities/issues/comments/238477510","html_url":"https://github.com/TrackableEntities/trackable-entities/issues/128#issuecomment-238477510","issue_url":"https://api.github.com/repos/TrackableEntities/trackable-entities/issues/128","id":238477510,"user":{"login":"edi0177","id":9989428,"avatar_url":"https://avatars.githubusercontent.com/u/9989428?v=3","gravatar_id":"","url":"https://api.github.com/users/edi0177","html_url":"https://github.com/edi0177","followers_url":"https://api.github.com/users/edi0177/followers","following_url":"https://api.github.com/users/edi0177/following{/other_user}","gists_url":"https://api.github.com/users/edi0177/gists{/gist_id}","starred_url":"https://api.github.com/users/edi0177/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edi0177/subscriptions","organizations_url":"https://api.github.com/users/edi0177/orgs","repos_url":"https://api.github.com/users/edi0177/repos","events_url":"https://api.github.com/users/edi0177/events{/privacy}","received_events_url":"https://api.github.com/users/edi0177/received_events","type":"User","site_admin":false},"created_at":"2016-08-09T07:40:42Z","updated_at":"2016-08-09T07:40:42Z","body":"Hello Tony, \r\nsorry i forgot to provide you a sample.\r\nI created one, but in a simple sample application the problem will not occur\r\nThe Problem still exist for me but i found a workaround for it:\r\n\r\nNow in my Application init  i subscribe for Appdomain AssemblyResolve event and handle it for my shared entities-assembly (nuget-package)\r\n\r\n` if (new AssemblyName(args.Name).Name == typeof(MyTrackableAssembly).Namespace)\r\n            {\r\n                return AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(a => a.GetName().Name == args.Name);\r\n            }`\r\n\r\nI see no difference between the partial binding which is used in the json serializer for assemblies which work and my (shared trackable) ones.\r\n\r\nSo i have no clue why it's not working in my solution. Maybe it could be because of i sign the assemblies (client and shared). But it should not.\r\n\r\nBut i have a few projects and it will occur in all of them, maybe because they all have the same setup"}}
{"actor":{"display_login":"edi0177"}}