{"action":"opened","issue":{"url":"https://api.github.com/repos/rebus-org/Rebus/issues/559","repository_url":"https://api.github.com/repos/rebus-org/Rebus","labels_url":"https://api.github.com/repos/rebus-org/Rebus/issues/559/labels{/name}","comments_url":"https://api.github.com/repos/rebus-org/Rebus/issues/559/comments","events_url":"https://api.github.com/repos/rebus-org/Rebus/issues/559/events","html_url":"https://github.com/rebus-org/Rebus/issues/559","id":189132295,"number":559,"title":"Please mark DefaultTransactionContext as serializable","user":{"login":"JornWildt","id":274072,"avatar_url":"https://avatars.githubusercontent.com/u/274072?v=3","gravatar_id":"","url":"https://api.github.com/users/JornWildt","html_url":"https://github.com/JornWildt","followers_url":"https://api.github.com/users/JornWildt/followers","following_url":"https://api.github.com/users/JornWildt/following{/other_user}","gists_url":"https://api.github.com/users/JornWildt/gists{/gist_id}","starred_url":"https://api.github.com/users/JornWildt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JornWildt/subscriptions","organizations_url":"https://api.github.com/users/JornWildt/orgs","repos_url":"https://api.github.com/users/JornWildt/repos","events_url":"https://api.github.com/users/JornWildt/events{/privacy}","received_events_url":"https://api.github.com/users/JornWildt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-14T14:55:45Z","updated_at":"2016-11-14T14:55:45Z","closed_at":null,"body":"I have an issue with DefaultTransactionContext: we are trying to execute some code externally inside a separate assembly. Something along the lines of using AppDomain.CreateDomain to create a new AppDomain, Activator.CreateInstanceFrom to create a class instance and then invoke a method on that class inside the new AppDomain.\r\n\r\nNow, apparently, .NET needs to serialize \"all objects directly attached to the thread\" and transfer them to the other AppDomain - and, tada ... DefaultTransactionContext is on the thread, as the ambient transaction, as gets serialized - but that is not possible as it is not marked as serializable and boom! we get an exception.\r\n\r\nSee this old post for some info: http://www.lhotka.net/weblog/PermaLink,guid,cfcaf6c4-63cf-4cf1-8361-ed3db07496a4.aspx\r\n\r\nI am no expert in these matters but transfering the transaction context doesn't make sense as I would expect it to be unusable to the other AppDomain. None the less .NET insists on doing it - breaking code that previous worked :-(\r\n\r\nCould DefaultTransactionContext please be marked as serializable? It probably also needs a default constructor."}}
{"actor":{"display_login":"JornWildt"}}