简体   繁体   中英

Cannot convert from IOrganizationService to IOrganizationService

I'm trying to debug a plugin in Linqpad but running into issues trying to import the plugin assembly. I have created an IOrganizationService object in my Linqpad script and passed it to the plugin, but now I get this error:

cannot convert from 'Microsoft.Xrm.Sdk.IOrganizationService [c:\\Users\\meUser\\AppData\\Local\\LINQPad\\NuGet\\Microsoft.CrmSdk.CoreAssemblies\\Microsoft.CrmSdk.CoreAssemblies.8.2.0.2\\lib\\net452\\Microsoft.Xrm.Sdk.dll]' to 'Microsoft.Xrm.Sdk.IOrganizationService [c:\\Users\\meUser\\Documents\\dynamics\\MyPlugin.Plugins\\bin\\Debug\\MyPlugin.Plugins.dll]'

I've double checked that the version of the Microsoft.Xrm.sdk.dll matches in the Linqpad script and the plugin, what am I doing wrong?

Don't ILMerge the Microsoft DLLs. You shouldn't need to do that because they are available on the CRM server. It is causing a type mis-match.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM