I have a custom plugin registered in my CRM 2011 instance. Until today the plugin was working perfect but al of a sudden I am get this System.BadImageFormatException error when creating a record. I have tried researching the issue but I can only find people having this issue while registering a plugin. My research has led me to believe it is something to do with 64 bit vs 32 bit. I have tried changing the target of my assembly from "Any CPU" to 64 bit but I get the same error when the plugin executes. The error details are below. Thanks in advance.
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.BadImageFormatException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #6C9D565ADetail:
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>System.BadImageFormatException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #6C9D565A</Message>
<Timestamp>2016-03-17T19:05:45.6106609Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText>
[PluginProfiler.Plugins: PluginProfiler.Plugins.ProfilerPlugin]
[0b8f5ab6-66ec-e511-8367-000c29e9a79c: MultiFamily.PostHomeCreate: Create of anh_home (Profiler)]
</TraceText>
</OrganizationServiceFault>