Error condition caused by SQLite platform type

Source: Internet
Author: User
Tags sqlite sqlite download

{"Failed to load file or assembly" System.Data.SQLite, version=1.0.97.0, culture=neutral, publickeytoken=db937bc2d44ff139 "or one of its dependencies.) An attempt was made to load a program that is not properly formatted. "}

The situation arises:

The original program was compiled with VS2008 in the Win 7 32 system environment.

Copy the program source code to win 8 64 bit under vs2013 The following error occurs when debugging.

unhandled system.badimageformatexception
  message= failed to load file or assembly" System.Data.SQLite, version=1.0.97.0, culture=neutral, publickeytoken=db937bc2d44ff139 "or one of its dependencies. An attempt was made to load a program that is not properly formatted.
  Source=model
  Filename=system.data.sqlite, version=1.0.97.0, Culture=neutral, publickeytoken= db937bc2d44ff139
  fusionlog==== pre-bind status information = = =
Log: DisplayName = System.Data.SQLite, version=1.0.97.0, Culture=neutral, publickeytoken=db937bc2d44ff139
  (fully-specified)
log: initial PrivatePath = NULL
Calling assembly: Model, version=1.0.0.0, Culture=neutral, Publickeytoken=null.
= = =
Log: This binding starts from the default load context.
Log: Using application configuration file: C:\Users\ file path \bin\debug\ project name. Vshost.exe.Config
Log: Using C:\Windows\Microsoft.NET\ Framework64\v2.0.50727\config\machine.config the Computer configuration file.
Log: Policy post reference: System.Data.SQLite, version=1.0.97.0, culture=neutral, publickeytoken=db937bc2d44ff139
log: Attempting to download a new URL file:///C:/file path/bin/debug/system.data.sqlite.dll .
Error: Failed to complete assembly installation (hr = 0x8007000b). The probe terminates.

  StackTrace:
       in Model.SysOperator.GetSysOperatorByCondition (String condition)
       in Model.SysOperator.UserLogin (String Empacct, String emppwd, String StoreId) location C:\Users\\Model\SysOperator.cs: line number 104
       in TradingSystem.LoginForm.UserLogin (string username, string password, String storeId, HtmlElement txtusername, HtmlElement txtpwd) location C:\LoginForm.cs: Line No.
        in Loginform.<>c__displayclass1.<btnlogin_click>b__0 () position C:\LoginForm.cs: line number
        in System.Threading.ExecutionContext.Run (ExecutionContext ExecutionContext, ContextCallback callback, Object State)
       in System.Threading.ThreadHelper.ThreadStart ()
  innerexception:

Reason:

SQLite Download platform type is not right!! Debugging error is 64-bit WIN8 system, and SQLite download is X86 32-bit! ?

Solution:

In VS2013, in the " project" in the " properties " in the " build "-" target platform set to x86

Error condition caused by SQLite platform type

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.