in

System.Data.SQLite

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

publish my project error!

Last post 07-14-2010 7:23 AM by rkulp. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 07-13-2010 6:50 AM

    • jviure
    • Top 500 Contributor
    • Joined on 07-13-2010
    • Posts 5

    publish my project error!

    Hello people!  I'm writing a desktop application using sqlite as database. I want to give a CD to a user and only installing the setup.exe start working. I thought  to use the sql server ce but finally I use sqlite. What happens is that if I execute the application in visual studio with debug or release mode the application runs perfect (I copied before my sqlite db in application_folder/bin/debug and application_folder/bin/release). But if I publish the application and try to execute the application in another computer this error is thrown:

    http://www.glowfoto.com/static_image/13-080942L/4684/png/07/2010/img4/glowfoto

     If I execute the application in my computer but out of visual studio this error is not thrown but no database is found. Can you help how to continue? I wat to give this application to a friend but actually I can't for this problems. 

     

    Thanks! :)

     

  • 07-13-2010 7:05 AM In reply to

    • jviure
    • Top 500 Contributor
    • Joined on 07-13-2010
    • Posts 5

    Re: publish my project error!

     I want to say that I have done 2 more things wihtout exit:

    In visual studio->References->System.Data.SQlite-> properties-> local copy TRUE

    I've created a directory named Data in my Solution Explorer of visual studio and I copy there my sqlite db (so I remove from bin/debug and bin/release), to be cleaner. Then I change the  ”Copy To Output Directory” property to “Always” of my sqlite.db

    When I publish the application I don't see the sqlite.db file anywhere.

  • 07-13-2010 8:53 AM In reply to

    • jviure
    • Top 500 Contributor
    • Joined on 07-13-2010
    • Posts 5

    Re: publish my project error!

     News! I've created to install the application (instead of publish)  an installation project. Now when the user installs my application, the .sqlite database file is in the folder and the system.data.sqlite.dll file. In my computer runs perfect now once installed but in others computers dont! The error is the same than in the first screenshot I paste. How can I continue?

     

    Thanks!

  • 07-14-2010 12:55 AM In reply to

    • jviure
    • Top 500 Contributor
    • Joined on 07-13-2010
    • Posts 5

    Re: publish my project error!

     I reply myself! it was that I was trying to install the application in a 64bits with a 32bits library of system.data.sqlite . I put the dll of 64bits and now runs ok. I thought that a 32bits library have to work in a 32 and in a 64bits machine no???? it seems not. What can I do to solve this? I dont know what machine will have the finally user...

     

    Thanks

  • 07-14-2010 4:45 AM In reply to

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

    Re: publish my project error!

    The way to do it is to target the application to run on the x86 processor rather than any cpu. You need to make sure that all the references will also run on 32-bit machines. With that, the O/S will install it so that it runs in 32-bit mode. The manifest will show you if the executable (.exe or .dll) is restricted to run on 32-bit computers. You can use ildasm to look at the manifest on .Net assemblies. At about the next to last line of the manifest you will see

    ILONLY 32BITREQUIRED

    for 32-bit assemblies.

     Alternatively, you can create two versions -- one for 32-bit and one for 64-bit. Then you have to make sure all the references run on the appropriate machine and create install packages for each version.

  • 07-14-2010 5:42 AM In reply to

    • jviure
    • Top 500 Contributor
    • Joined on 07-13-2010
    • Posts 5

    Re: publish my project error!

     oh perfect! that's it, I change x86 as target machine and now runs perfect in all computers, yeaaaaa! thanks

     

    pd: I come from Java development, I want to know a good "hibernate", there is some one interesting in .net ?I have seen some one but is all xml configured.

  • 07-14-2010 7:23 AM In reply to

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

    Re: publish my project error!

    I'm glad it worked for you. Sorry, I can't help you on hibernate. You may have to start another thread.

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