莫名其妙的缺失字段异常
本文关键字:字段 异常 莫名其妙 | 更新日期: 2023-09-27 18:33:44
在下面的代码片段中,它抛出了一个MissingFieldException:找不到字段:DepthBidLevels异常,但仅在下面描述的某些奇怪情况下。
for(int i=DomSize-1; i>=0; i--) {
fixed( ushort *p = binary.DepthBidLevels) {
if( i!=DomSize-1) {
builder.Append( ",");
}
builder.Append( *(p + i));
}
二进制变量的类型是在单独的集合中定义的结构:
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];
}
好的,上面的代码的工作原理取决于它的编译位置和方式。 只要两个断言(代码片段程序集和 TickBinary 程序集(都在同一台机器上编译,它们就可以正常工作。
但是,如果代码段程序集是在与 TickBinary 程序集不同的计算机上构建的,然后一起运行,则会引发 MissingFieldException。
您可能想知道,为什么它们构建在不同的机器上? 该项目提供部分代码作为开源,项目的其他部分作为预编译的二进制文件。 因此,用户编译自己的部分内容,只需引用预编译的程序集。
注意:代码段始终使用发布配置进行编译,这意味着它已启用优化。
但对我来说似乎无法解释的是它如何为深度出价级别字段提供缺少字段异常。这看不到使用任何类型的反射,或者固定关键字是否在幕后使用反射?我对此表示怀疑,因为代码片段的性能快如闪电。
编辑:我缩小了关键因素是程序集是由msbuild从命令行编译还是通过Visual Studio 2008编译。 如果所有这些都由命令行编译,则它可以工作。如果所有这些都是通过Visual Studio编译的,它就可以工作了。但是,使用MSBuild构建的TickZoomEngine并使用通过Visual Studio 2008构建的TickZoomAPI1.0运行它失败了。 在进行这些实验时,代码更改为零。为什么Visual Studio编译与MSBuild编译不兼容?
编辑:由于以下想法,这里是所有程序集及其引用的转储。一切似乎都井井有条。 具体来说,最后一个程序集 TickZoomEngine 是具有引用 TickZoomAPI1.0 程序集中结构类型的代码片段的程序集。
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
只需将失败的方法移动到另一个 dll 中即可解决该问题。因此,现在它引用的字段位于同一 DLL 中。
这仅仅意味着加载程序逻辑在运行时绑定到固定结构字段时是不稳定的。
我也有这个问题。转我的项目引用了两个.dll,称它们为A.dll
和B.dll
.
A.dll
还引用了B.dll
。 自从我上次构建项目以将某些字段更改为属性以来,B.dll
已更新。一旦我再次构建我的项目,我就遇到了这里描述的问题。
事实证明,由于A.dll
自更新以来B.dll
尚未重建,因此A.dll
期待带有字段的B.dll
,但我的项目使用的新建B.dll
具有属性。
比较引用的程序集(依赖项(的两个二进制文件清单(编译的程序集(。
System.Reflection.Assembly::GetReferencedAssemblies()
并比较..也许编译它们的框架之间存在版本差异。