in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

64 Bit on VS2005 Express

Last post 05-19-2010 1:18 PM by Moorboxer. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 05-14-2010 1:22 PM

    64 Bit on VS2005 Express

    My project has been created in VS2005 Express, on a 32 bit Windows XP machine.

    What do I need to do to get the application from my project to run on machines with 64 bit versions of Windows (especially Windows 7)?

    It ran on a 32 bit Windows 7 laptop OK.

    The forum replies seem to refer to creating applications under "full" versions of Visual Studio, not the Express versions.

    Hope someone can help.

    Moorboxer

  • 05-14-2010 3:13 PM In reply to

    • rkulp
    • Top 10 Contributor
    • Joined on 06-28-2008
    • Rural Coffee County, Tennessee
    • Posts 73

    Re: 64 Bit on VS2005 Express

    If you select X86 processor as the target CPU in your compile options then the 64-bit OS will automatically put it in Program Files(X86) instead of Program Files. I routinely do this and have no problem at all.

  • 05-15-2010 3:50 AM In reply to

    Re: 64 Bit on VS2005 Express

    Thanks for your reply, rkulp.

    My problem is that I cannot find how to get at compiler options in VS 2005 Express.

    VS help refers to a compile tab in project options dialog, but my VS 2005 Express does not have a compile tab!

  • 05-17-2010 6:01 AM In reply to

    • rkulp
    • Top 10 Contributor
    • Joined on 06-28-2008
    • Rural Coffee County, Tennessee
    • Posts 73

    Re: 64 Bit on VS2005 Express

    I downloaded and installed a VS2005 version of C# and could not find an option to target a particular CPU. Have you simply tried to install the app on a 64-bit system? As a minimum, I would use ildasm to disassemble the executable and look at the manifest. Near the bottom of the manifest you should see a line about the type of CPU. If you see  .corflags 0x00000003 // ILONLY 32BITREQUIRED  then you should be able to run it on a 64-bit comuputer in 32 bit mode. If it has .corflags 0x00000001 // ILONLY then it could be targeted for any CPU. I compiled a test app on a 64-bit computer and targeted it for 64-bit only and also for any CPU. Both gave the ILONLY line without  restrictions. Ildasm.exe is found in the SDK which you can get at 

     http://www.microsoft.com/downloads/details.aspx?FamilyID=fe6f2099-b7b4-4f47-a244-c96d69c35dec&displaylang=en

    Good luck. I have exhausted (and then some!) my knowledge.

  • 05-19-2010 1:18 PM In reply to

    Re: 64 Bit on VS2005 Express

    Many thanks for all your efforts and advice.

    I ran ildasm.exe on my project's exe.  Manifest showed it was being compiled using IL ONLY, ie targetted for any CPU.

    Have tried installing on Windows 7 64 bit machine in different locations, including under Program Files (X86).  Also tried swapping the SQLite dll for the x64 version.  Could not get either to work.

    My application loads data right at start, in the main form Load event.  When trying to run on 64 bit Windows 7 machine, a rather generic error message briefly appeared, then nothing! 

    I have a trial database programme created with Visual Studio 2005 Express (on my 32 bit Windows XP machine) that allows the user to prepare text from a document or e-mail, then insert it into a SQLite database.

    This initially starts OK on the 64 bit Windows 7 machine, but crashes when attempting to connect to the database and insert data.  This causes the following error message to be shown:

     System.BadImageFormatException: Could not load file or assembly 'System.Data.SQLite, Version=1.0.47.1, Culture=neutral, PublicKeyToken=db937bc2d44ff139' or one of its dependencies. An attempt was made to load a program with an incorrect format.
    File name: 'System.Data.SQLite, Version=1.0.47.1, Culture=neutral, PublicKeyToken=db937bc2d44ff139'

    I think I will try to explore the meaning of this next, perhaps forget 64 bit for the moment!

    Once again, thank you for all your help.

     

Page 1 of 1 (5 items)
Powered by Community Server (Commercial Edition), by Telligent Systems