VS2010在64位操作系统上选择x86平台进行编译,这样可兼容老的dll文件
2013-02-20 11:21
531 查看
该项目在32位平台上一切正常,但如果在64位Win7上编译后,调试,报错:
![](http://images.cnitblog.com/blog/258581/201302/20111840-17651e4d2fcb46f7ab93ff365da37b1f.jpg)
然后在编译选项中选择:“x86”平台,编译,运行,就不报错了。
![](http://images.cnitblog.com/blog/258581/201302/20111620-eea8540e22b04e84be642c475531b01d.jpg)
补充,在日志文件里显示了如下和内存有关的异常:
Header]\r\nERROR 11:18:18,523 3696 NeoNetech.UI.VisualStudioStyle.MainForm - Failed to execute command LiveFPInjectDependenciesCommand on start
System.BadImageFormatException: 试图加载格式不正确的程序。 (异常来自 HRESULT:0x8007000B)
在 NNT.NNTFingerProcessBlock.Convert.PEFIS.PefisConvert.GetFingerInfoSize_NNT()
在 NNT.NNTFingerProcessBlock.Convert.PEFIS.PefisConvert..ctor()
在 NNT.NNTFingerProcessBlock.FingerProcessFactory..ctor()
在 NNT.NNTFingerProcessBlock.FingerProcessFactory.get_Instance()
在 NeoNetech.LiveFP.Solo.Command.LiveFPInjectDependenciesCommand.Execute()
在 NeoNetech.UI.VisualStudioStyle.MainForm.ExecuteConfigCommand(StringCollection commandIds)
ERROR 11:18:28,566 3696 NeoNetech.UI.VisualStudioStyle.MainForm - Failed to execute command LoadLiveListCommand on start
System.ObjectDisposedException: 无法访问已释放的对象。
对象名:“TabControl”。
在 System.Windows.Forms.Control.CreateHandle()
在 System.Windows.Forms.Control.get_Handle()
在 System.Windows.Forms.Control.CreateGraphicsInternal()
在 System.Windows.Forms.Control.CreateGraphics()
在 Crownwood.DotNetMagic.Controls.TabControl.RecalculateSinglelineTabs(Int32 xWidth, Int32 xStartPos, Rectangle tabPosition)
在 Crownwood.DotNetMagic.Controls.TabControl.Recalculate()
在 Crownwood.DotNetMagic.Controls.TabControl.OnInsertedPage(Int32 index, Object value)
在 System.Collections.CollectionBase.System.Collections.IList.Add(Object value)
在 Crownwood.DotNetMagic.Controls.TabPageCollection.Add(TabPage value)
在 NeoNetech.UI.VisualStudioStyle.WindowCollection.AddControl(Control control, String title)
在 NeoNetech.UI.VisualStudioStyle.MainForm.AddWindow(Control control, String title)
在 NeoNetech.LiveFP.Solo.Command.LoadLiveListCommand.Execute()
在 NeoNetech.UI.VisualStudioStyle.MainForm.ExecuteConfigCommand(StringCollection commandIds)
总的来讲,猜测都是和dll的兼容性有关,和内存的调用有关。
![](http://images.cnitblog.com/blog/258581/201302/20111840-17651e4d2fcb46f7ab93ff365da37b1f.jpg)
然后在编译选项中选择:“x86”平台,编译,运行,就不报错了。
![](http://images.cnitblog.com/blog/258581/201302/20111620-eea8540e22b04e84be642c475531b01d.jpg)
补充,在日志文件里显示了如下和内存有关的异常:
Header]\r\nERROR 11:18:18,523 3696 NeoNetech.UI.VisualStudioStyle.MainForm - Failed to execute command LiveFPInjectDependenciesCommand on start
System.BadImageFormatException: 试图加载格式不正确的程序。 (异常来自 HRESULT:0x8007000B)
在 NNT.NNTFingerProcessBlock.Convert.PEFIS.PefisConvert.GetFingerInfoSize_NNT()
在 NNT.NNTFingerProcessBlock.Convert.PEFIS.PefisConvert..ctor()
在 NNT.NNTFingerProcessBlock.FingerProcessFactory..ctor()
在 NNT.NNTFingerProcessBlock.FingerProcessFactory.get_Instance()
在 NeoNetech.LiveFP.Solo.Command.LiveFPInjectDependenciesCommand.Execute()
在 NeoNetech.UI.VisualStudioStyle.MainForm.ExecuteConfigCommand(StringCollection commandIds)
ERROR 11:18:28,566 3696 NeoNetech.UI.VisualStudioStyle.MainForm - Failed to execute command LoadLiveListCommand on start
System.ObjectDisposedException: 无法访问已释放的对象。
对象名:“TabControl”。
在 System.Windows.Forms.Control.CreateHandle()
在 System.Windows.Forms.Control.get_Handle()
在 System.Windows.Forms.Control.CreateGraphicsInternal()
在 System.Windows.Forms.Control.CreateGraphics()
在 Crownwood.DotNetMagic.Controls.TabControl.RecalculateSinglelineTabs(Int32 xWidth, Int32 xStartPos, Rectangle tabPosition)
在 Crownwood.DotNetMagic.Controls.TabControl.Recalculate()
在 Crownwood.DotNetMagic.Controls.TabControl.OnInsertedPage(Int32 index, Object value)
在 System.Collections.CollectionBase.System.Collections.IList.Add(Object value)
在 Crownwood.DotNetMagic.Controls.TabPageCollection.Add(TabPage value)
在 NeoNetech.UI.VisualStudioStyle.WindowCollection.AddControl(Control control, String title)
在 NeoNetech.UI.VisualStudioStyle.MainForm.AddWindow(Control control, String title)
在 NeoNetech.LiveFP.Solo.Command.LoadLiveListCommand.Execute()
在 NeoNetech.UI.VisualStudioStyle.MainForm.ExecuteConfigCommand(StringCollection commandIds)
总的来讲,猜测都是和dll的兼容性有关,和内存的调用有关。
相关文章推荐
- 64位系统上设置编译平台为x86的VS2008项目升级到VS2010后编译失败的原因和解决办法
- Android项目针对libs(armeabi,armeabi-v7a,x86)进行平台兼容
- 64位系统上设置编译平台为x86的项目编译在特定的情况下比如当一个窗体上放有包含了图像的ImageList之后,ResGen就会产生这种问题
- X86(32位)与X64(64位)有什么区别,如何选择对应的操作系统和应用程序?
- 如何将64位操作系统下VS2012程序部署在x86平台
- 如何在64位操作系统上使用masm进行编译链接和运行
- ArcEngine开发——在64位操作系统下使用VS2010中开发ArcEngine应用程序的编译问题
- ArcEngine开发——在64位操作系统下使用VS2010中开发ArcEngine应用程序的编译问题
- Android项目针对libs(armeabi,armeabi-v7a,x86)进行平台兼容
- Android项目针对libs(armeabi,armeabi-v7a,x86)进行平台兼容
- Android项目针对libs(armeabi,armeabi-v7a,x86)进行平台兼容
- 解决在windows下VS2010编译coldet20的出现的错误:error MSB8008: 指定的平台工具集(Windows7.1SDK)未安装或无效。请确保选择受支持的 PlatformToo
- ArcEngine开发——在64位操作系统下使用VS2010中开发ArcEngine应用程序的编译问题
- Android项目针对libs(armeabi,armeabi-v7a,x86)进行平台兼容
- [转帖]64位平台编译ArcEngine 9.3,需用x86编译平台
- .net 编译时选择anycpu x86 x64的区别: 在 64 位 Windows 操作系统上: 用 x86 编译的程序集将在 WOW64 下运行的 32 位 CLR 上执行。 用 x64 编译
- Android项目针对libs(armeabi,armeabi-v7a,x86)进行平台兼容
- Android项目针对libs(armeabi,armeabi-v7a,x86)进行平台兼容
- hadoop2.2.0遇到64位操作系统平台报错,重新编译hadoop
- ArcEngine开发——在64位操作系统下使用VS2010中开发ArcEngine应用程序的编译问题