我有得到相關的實體從CRM的一個問題。異常而檢索相關實體
以下代碼:
var conn = CrmConnection.Parse("my connection string");
var orgService = new OrganizationService(conn);
var context = new MyServiceContext(orgService);
...
var myEntity = context.CreateQuery<new_myentity>().First(p => p.new_name == "some name");
myEntity.GetRelatedEntities(context, "relation name").ToList();
引發以下異常在HTE最後一行:
值 'Microsoft.Xrm.Client.Configuration.CrmConfigurationProvider,Microsoft.Xrm.Client' 是未被識別爲有效的類型或不是類型的「Microsoft.Xrm.Client.Configuration.CrmConfigurationProvider」。
聽起來像是你缺少一個參考。 http://dotnetinside.com/en/type/Microsoft.Xrm.Client/CrmConfigurationManager/6.0.0.0 –
我有參考Microsoft.Xrm.Client.dll – filip
我敢肯定,我們遇到了類似的錯誤,唯一的解決方案是安裝所引用的DLL到GAC(本機[s]的運行SSIS包上)。 – mwardm