简体   繁体   English

System.Data.SqlServerCe.dll不是有效的Win32程序

[英]System.Data.SqlServerCe.dll is not a valid Win32 program

I am developing a C# program with visual studio that makes use of the sql compact library. 我正在使用Visual Studio开发使用SQL紧凑库的C#程序。 On the developing computer everything works like a charm but on my home computer that has an almost fresh win8 installment I get a System.BadImageFormatException: is not a valid win32 program and I have no clue why. 在正在开发的计算机上,所有东西都像魅力一样工作,但是在我的家用计算机上,几乎是全新的win8安装,我得到了System.BadImageFormatException:不是有效的win32程序,我也不知道为什么。

I have added the Microsoft.SqlServer.Compact package with nuget. 我已经使用nuget添加了Microsoft.SqlServer.Compact程序包。 this package includes the System.Data.SqlServerCe.dll. 此程序包包含System.Data.SqlServerCe.dll。

I have also seen on my development computer in the output window of visual studio that the System.Data.SqlServerCe.dll is loaded from GAC. 我还在Visual Studio输出窗口中的开发计算机上看到从GAC加载了System.Data.SqlServerCe.dll。 Since my home computer has a fersh win8 installment it does not have the System.Data.SqlServerCe.dll in its GAC but since I have added the Microsoft.SqlServer.Compact package with nuget that should not be problem right? 由于我的家用计算机安装了最新版本的win8,因此它的GAC中没有System.Data.SqlServerCe.dll,但是由于我添加了带有nuget的Microsoft.SqlServer.Compact程序包,这应该不是问题吧?

The problem is probably that your program or one of it's dependancies is 64 bit and you are running it on a 32-bit computer. 问题可能是您的程序或其依赖项之一是64位,并且您正在32位计算机上运行它。 Go to the project properties, and set the "platform target" to either "Any CPU" or "x86" if you are planning to run it on 32-bit systems. 转到项目属性,如果打算在32位系统上运行,则将“平台目标”设置为“任何CPU”或“ x86”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 System.Data.SqlServerCe.dll中发生了'System.StackOverflowException' - 'System.StackOverflowException' occurred in System.Data.SqlServerCe.dll System.Data.SqlServerCe.dll中出现“System.Data.SqlServerCe.SqlCeException”类型的异常,但未在用户代码中处理 - An exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in System.Data.SqlServerCe.dll but was not handled in user code System.Data.SqlServerCe.dll中发生了类型为'System.Data.SqlServerCe.SqlCeException'的未处理异常 - An unhandled exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in System.Data.SqlServerCe.dll WPF程序 - 程序无效win32 - WPF Program - program is not valid win32 .dll 不是有效的 win32 应用程序 - .dll is not a valid win32 application 使用InstallShield Limited Edition Project生成.exe文件后,缺少System.Data.SqlServerCe.dll SQL Server CE 3.5参考 - System.Data.SqlServerCe.dll SQL Server CE 3.5 reference missing after generating .exe file using InstallShield Limited Edition Project 无法启动程序。 [VALUE].dll 不是 Visual Studio 2017 中有效的 Win32 应用程序错误 - Unable to start program. [VALUE].dll is not a valid Win32 application error in Visual Studio 2017 不是有效的Win32应用程序 - Not a valid Win32 application BadImageFormatException和有效的Win32 - BadImageFormatException and valid Win32 不是有效的Win32应用程序 - Not a valid Win32 application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM