<p>Using reflection, I need to load 2 different versions of the same assembly. Can I load the 2 versions in 2 different AppDomains in the same process? </p>

<p>I need to do some data migration from the old version of the app to the new version. 
Please let me know if this is possible or should I use 2 separate processes.</p>

[{'answer_id': 58039, 'author': 'GEOCHET', 'author_id': 5640, 'author_profile': 'https://Stackoverflow.com/users/5640', 'pm_score': 4, 'selected': False, 'text': '<p>If you are doing it at design time (which you indicate you are not) this should help you: </p>\n\n<p><a href="http://blogs.msdn.com/abhinaba/archive/2005/11/30/498278.aspx" rel="nofollow noreferrer">http://blogs.msdn.com/abhinaba/archive/2005/11/30/498278.aspx</a></p>\n\n<p>If you are doing it dynamically through reflection (looks like the case here) this might help you:</p>\n\n<p><a href="https://www.infosysblogs.com/microsoft/2007/04/loading_multiple_versions_of_s.html" rel="nofollow noreferrer">https://www.infosysblogs.com/microsoft/2007/04/loading_multiple_versions_of_s.html</a></p>\n'}, {'answer_id': 58964, 'author': 'Gulzar Nazim', 'author_id': 4337, 'author_profile': 'https://Stackoverflow.com/users/4337', 'pm_score': 4, 'selected': True, 'text': '<p><strong>UPDATE</strong>: I thought I will post my findings as an answer. Reflection proved too complex in terms of development effort, tracking run time errors etc. I remember doing a different approach using 2 different processes when faced with a similar situation long time back (Thank you Brandon).</p>\n\n<p>This is the plan: Nothing elegant but easier in terms of development and troubleshooting. Since it is a one time job, we just have to make it work.</p>\n\n<p>Host a remoting process (which i call the server) having the new version of the application. A remoting client has references for the older version. </p>\n\n<p>Remoting client instantiates and loads the objects with data required for migration. \nConvert the old objects into common serializable objects and pass as parameters to the server.</p>\n\n<p>Remoting Server uses the common data to instantiate and load the new objects. Invokes the functions on the new types to persist their data.</p>\n'}]
['https://Stackoverflow.com/questions/58035', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4337/']