SQL Compact Framework Error(4.0) with VS 2008 SP1 Web(C#)

1

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.

.net-3.5
sql-server-ce
visual-studio-2008-sp1
asked on Stack Overflow Feb 1, 2011 by Felice

1 Answer

1

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

answered on Stack Overflow Feb 1, 2011 by ErikEJ • edited May 23, 2017 by Community

User contributions licensed under CC BY-SA 3.0