VS 2008 SP1 Web(C#) 的 SQL Compact Framework 错误(4.0)
我已经尝试过你的几个建议。我假设 SQL Compact Framework 4 将与 VS 2008 版本 3.5 SP1 一起使用。感谢您的帮助。
。
“/”应用程序中的服务器错误
无法加载文件或程序集“System.Data.SqlServerCe.Entity”或其依赖项之一。该程序集是由比当前加载的运行时更新的运行时构建的,无法加载。
描述:执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其在代码中的来源的更多信息。
异常详细信息:System.BadImageFormatException:无法加载文件或程序集“System.Data.SqlServerCe.Entity”或其依赖项之一。该程序集是由比当前加载的运行时更新的运行时构建的,无法加载。
源错误:
当前 Web 请求执行期间生成未处理的异常。有关异常来源和位置的信息可以使用下面的异常堆栈跟踪来识别。
程序集加载跟踪:以下信息有助于确定程序集“System.Data.SqlServerCe.Entity”无法加载的原因。
===预绑定状态信息=== 日志:用户 = MONTOYA\Felice 日志: DisplayName = System.Data.SqlServerCe.Entity (部分的) 日志:Appbase = file:///C:/Documents and Settings/Felice/My Documents/Visual Studio 2008/Projects/WEBTEST/WEBTEST/ 日志:初始 PrivatePath = C:\Documents and Settings\Felice\My Documents\Visual Studio 2008\Projects\WEBTEST\WEBTEST\bin
调用程序集:(未知)。
日志:此绑定在默认加载上下文中启动。 日志:使用应用程序配置文件:C:\Documents and Settings\Felice\My Documents\Visual Studio 2008\Projects\WEBTEST\WEBTEST\web.config 日志:使用 c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config 中的计算机配置文件。 日志:此时策略未应用于引用(私有、自定义、部分或基于位置的程序集绑定)。 日志:尝试下载新的 URL 文件:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/22f9383d/8a864690/System.Data.SqlServerCe.Entity.DLL。 日志:尝试下载新的 URL 文件:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/22f9383d/8a864690/System.Data.SqlServerCe.Entity/System.Data .SqlServerCe.Entity.DLL。 日志:尝试下载新的 URL 文件:///C:/Documents and Settings/Felice/My Documents/Visual Studio 2008/Projects/WEBTEST/WEBTEST/bin/System.Data.SqlServerCe.Entity.DLL。 错误:无法完成程序集设置(hr = 0x8013101b)。探测终止。
I have tried several of your suggestions. I assume that SQL Compact Framework 4 will work with VS 2008 Version 3.5 SP1. Thank you for your help.
Felice
Server Error in '/' Application.
Could not load file or assembly 'System.Data.SqlServerCe.Entity' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.BadImageFormatException: Could not load file or assembly 'System.Data.SqlServerCe.Entity' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Data.SqlServerCe.Entity' could not be loaded.
=== Pre-bind state information ===
LOG: User = MONTOYA\Felice
LOG: DisplayName = System.Data.SqlServerCe.Entity
(Partial)
LOG: Appbase = file:///C:/Documents and Settings/Felice/My Documents/Visual Studio 2008/Projects/WEBTEST/WEBTEST/
LOG: Initial PrivatePath = C:\Documents and Settings\Felice\My Documents\Visual Studio 2008\Projects\WEBTEST\WEBTEST\bin
Calling assembly : (Unknown).
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Documents and Settings\Felice\My Documents\Visual Studio 2008\Projects\WEBTEST\WEBTEST\web.config
LOG: Using machine configuration file from c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/22f9383d/8a864690/System.Data.SqlServerCe.Entity.DLL.
LOG: Attempting download of new URL file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/22f9383d/8a864690/System.Data.SqlServerCe.Entity/System.Data.SqlServerCe.Entity.DLL.
LOG: Attempting download of new URL file:///C:/Documents and Settings/Felice/My Documents/Visual Studio 2008/Projects/WEBTEST/WEBTEST/bin/System.Data.SqlServerCe.Entity.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8013101b). Probing terminated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅此处的回复(包括对 web.config 的添加)(不需要运行时部分)无法让 SQL Server Compact 3.5 / 4 与 ASP .NET MVC 2 一起使用
See the reply here (including additions to web.config) (the runtime section is not required) Can't get sql server compact 3.5 / 4 to work with ASP .NET MVC 2