Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inexplicable MissingFieldException

In the following code snippet, it throws a MissingFieldException: Field Not Found: DepthBidLevels exception but only in certain weird situations that are described below.

for(int i=DomSize-1; i>=0; i--) {
    fixed( ushort *p = binary.DepthBidLevels) {
    if( i!=DomSize-1) {
        builder.Append( ",");
    }
    builder.Append( *(p + i));
}

The type for the binary variable is a struct that is defined in a separate assemply:

unsafe public struct TickBinary
{
    public const int DomLevels = 5;
    public const int SymbolSize = 8;
    public const int minTickSize = 256;

    public long Symbol;
    public byte contentMask;
    public long Id;
    public long UtcTime;
    public long UtcOptionExpiration;
    public long Strike;
    public long Bid;
    public long Ask;
    public byte Side;
    public long Price;
    public int Size;
    public fixed ushort DepthAskLevels[DomLevels];
    public fixed ushort DepthBidLevels[DomLevels];
}

Okay, the code above works depending on where and how it gets compiled. As long as both assmeblies (the snippet assembly and the TickBinary assembly) are compiled on the same machine they work fine.

However, if the snippet assembly gets built on different machine from the TickBinary assembly and then run together, then the MissingFieldException gets thrown.

You may wonder, why they are built on different machines? This project offers part of the code as open source and other parts of project as pre-compiled binaries. So users compile part of themselves and simply reference the pre-compiled assemblies.

NOTE: That the snippet always gets compiled with Release configuration meaning that it has optimizations enabled.

But what seems inexplicable to me is how it can give a missing field exception for the DepthBidLevels field. That doesn't see to be using any kind of reflection or does the fixed keyword use reflection under the covers? I doubt it because the performance of the snippet code is lightening fast.

EDIT: I narrowed down that the key factor is whether the assemblies are compile by msbuild from the command line or compiled via Visual Studio 2008. If all are compiled by the command line, it works. If all are compiled via Visual Studio, it works. But taking the TickZoomEngine built by MSBuild and running it with the TickZoomAPI1.0 that was build via Visual Studio 2008 fails. There's zero code change while doing those experiments. Why will Visual Studio compile be incompatible with MSBuild compile?

EDIT: Due to the idea below, here's a dump of all assemblies and their references. Everything seems to be in order. Specifically, the last assembly, TickZoomEngine is the one with the code snippet that reference the struct type in the TickZoomAPI1.0 assembly.

Listing all assembly references...
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Microsoft.VisualStudio.HostingProcess.Utilities, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: Microsoft.VisualStudio.HostingProcess.Utilities.Sync, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: Microsoft.VisualStudio.Debugger.Runtime, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: Accessibility, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Runtime.Serialization.Formatters.Soap, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: System.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Microsoft.VisualStudio.HostingProcess.Utilities.Sync, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Microsoft.VisualStudio.Debugger.Runtime, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
vshost, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: Microsoft.VisualStudio.HostingProcess.Utilities.Sync, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: Microsoft.VisualC, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
System.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Data.SqlXml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
TickZoomGUI, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: TickZoomAPI1.0, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: TickZoomCharting, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: TickZoomPresentation, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: WindowsFormsUtil, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
TickZoomPresentation, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: TickZoomAPI1.0, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
TickZoomAPI1.0, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
WindowsFormsUtil, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: TickZoomPresentation, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: TickZoomAPI1.0, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
PluginLoader, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: TickZoomAPI1.0, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: ICSharpCode.SharpZipLib, Version=0.85.5.452, Culture=neutral, PublicKeyToken=1b03e6acf1164f73
TickZoomLogging, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: TickZoomAPI1.0, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821
    Reference: System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
TickZoomCharting, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: TickZoomAPI1.0, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: ZedGraph, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: WindowsFormsUtil, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: System.DirectoryServices.Protocols, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Web.RegularExpressions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Accessibility, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
TickZoomPluginCommon, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: TickZoomAPI1.0, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: System.Configuration.Install, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Configuration.Install, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
System.Configuration.Install, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Runtime.Serialization.Formatters.Soap, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
TickZoomPluginExamples, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: TickZoomPluginCommon, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: TickZoomAPI1.0, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference: System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
ProviderCommon, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: TickZoomAPI1.0, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
ProviderUtilTests, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: TickZoomAPI1.0, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: nunit.framework, Version=2.5.1.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77
    Reference: ProviderUtil, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
TickZoomLoaderTests, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: TickZoomAPI1.0, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: nunit.framework, Version=2.5.1.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77
    Reference: PluginLoader, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
ExamplesTest, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: TickZoomPluginCommon, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: nunit.core, Version=2.5.1.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77
    Reference: nunit.core.interfaces, Version=2.5.1.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77
    Reference: TickZoomAPI1.0, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: TickZoomCharting, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: TickZoomPresentation, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: WindowsFormsUtil, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: TickZoomPluginExamples, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: TickZoomGUI, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: TickZoomStarters, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: nunit.framework, Version=2.5.1.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77
    Reference: TickZoomTickUtil, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: ZedGraph, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
nunit.core, Version=2.5.1.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: nunit.core.interfaces, Version=2.5.1.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77
    Reference: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
nunit.core.interfaces, Version=2.5.1.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
LimeProviderUnitTests, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
TickZoomTesting, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: TickZoomPluginCommon, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: TickZoomPluginExamples, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: TickZoomAPI1.0, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: TickZoomCharting, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: TickZoomStarters, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: nunit.framework, Version=2.5.1.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77
    Reference: TickZoomTickUtil, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: tzdata, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
TickZoomEngine, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: TickZoomAPI1.0, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Reference: TickZoomTickUtil, Version=1.4.8.8462, Culture=neutral, PublicKeyToken=null
    Reference: System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
like image 213
Wayne Avatar asked May 10 '12 21:05

Wayne


2 Answers

Compare the two binaries manifests (the assemblies you compile) for the referenced assemblies (dependencies).

System.Reflection.Assembly::GetReferencedAssemblies()

and compare .. perhaps there are version differences between the frameworks that they are compiled against.

like image 24
MaLio Avatar answered Oct 14 '22 21:10

MaLio


It was solved by simply moving the method that was failing into the other dll. So now the field that it references is in the same DLL.

This simply means that the loader logic is flaky when it comes to run-time binding to fixed struct fields.

like image 65
Wayne Avatar answered Oct 14 '22 21:10

Wayne