Hi all
I am writing a small application for a client to transfer emails and their related attachments from their archived on-prem CRM 2011 system to their new CRM Online instance. I figured I would write a console app with the CRM 2011 references in the console app, then a class library holding the helper functions to transfer the data into CRM Online, to keep some separation between the two versions of the SDK.
However, while the two projects work individually, when I make a reference between the console app project and the class library in the same solution, when I try to retrieve data from CRM 2011 I get the error message
Could not load file or assembly 'Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
From this it appears that it is trying to use the CRM Online version of Microsoft.Xrm.Sdk instead of the referenced CRM 2011 one.
Anyone know how I can get the solution to work properly while referencing both versions of Microsoft.Xrm.Sdk?