Hi all,
I have this simple .dll Plugin which implement iPlugin interface. I compile this, register the assambly with plugin registration tool and register a step (update) on an entity. It works (Plugin registration is None (no sandbox) and Database)
Not I run IlMerge on this dll (and only this dll in this testcase) and i Get the PluginCombined.dll, which I register with plugin tool - works, but when i will register the step - it fails with this message
This is how IlMerge is callced:
"\buildtools\ILMerge.exe" /keyfile:"$(ProjectDir)BrfKey.snk" /copyattrs /targetplatform:"v4,C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0" /out:"$(TargetDir) PluginsCombined.dll""$(TargetDir)Plugins.dll" /log:c:\ilmerge.txt /closed
This is the error messages:
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Assembly content(" PluginsCombined", Version=1.0.0.0,
Culture=neutral, PublicKeyToken=da7d94b5cbe714c5) does not match the expected assembly identity ( PluginsCombined, Version=1.0.0.0, Culture=neutral, PublicKeyToken=da7d94b5cbe714c5).
Detail: <OrganizationServiceFault xmlns="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<ErrorCode>-2147204719</ErrorCode>
<ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>Assembly content(" PluginsCombined", Version=1.0.0.0, Culture=neutral, PublicKeyToken=da7d94b5cbe714c5) does not match the expected assembly identity ( PluginsCombined, Version=1.0.0.0, Culture=neutral, PublicKeyToken=da7d94b5cbe714c5).</Message>
<Timestamp>2014-06-19T07:02:02.8282031Z</Timestamp>
<InnerFault>
<ErrorCode>-2147204719</ErrorCode>
<ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>Assembly content(" PluginsCombined", Version=1.0.0.0, Culture=neutral, PublicKeyToken=da7d94b5cbe714c5) does not match the expected assembly identity ( PluginsCombined, Version=1.0.0.0, Culture=neutral, PublicKeyToken=da7d94b5cbe714c5).</Message>
<Timestamp>2014-06-19T07:02:02.8282031Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<TraceText i:nil="true" />
< /OrganizationServiceFault>
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.Xrm.Sdk.IOrganizationService.Create(Entity entity)
at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.CreateCore(Entity entity)
at Microsoft.Crm.Tools.Libraries.RegistrationHelper.RegisterStep(CrmOrganization org, CrmPluginStep step)
at Microsoft.Crm.Tools.PluginRegistration.StepRegistrationViewModel.btnRegister_Click(Object sender, EventArgs e)
My guess is thats something is compiled with the wrong version og .NET - The plugin.dll is compiled on 4.0 - target any cpu
Thx
henrik
--- Best regards Henrik Skydtsgaard
--- Best regards Henrik Skydtsgaard