DLL File for windows 7 64bit - sqlite

I'm porting my Windows XP application (wrote with C#) to Windows 7 application.
Now I'm using sqlite3.dll on my XP App (32bit) and I would download sqlite3.dll for 64bit machine.
For my purpose I've moved sqlite3.dll on my /bin folder and, obviously, when I try to start my app on windows 7 I receive an error.
So, where I download this file?
Please, help me...
Edit: I've downloaded sqlite3 http://www.sqlite.org/download.html

The SQLite website only has the 32-bit .dll, to get a 64-bit one you'll have to download and compile the source yourself.
Since you're using C#, an easier way is to use System.Data.SQLite ( http://sqlite.phxsoftware.com/ ). They have a 64-bit download available, which is SQLite itself and their ADO.NET provider combined into one .dll. It's the easiest way to use SQLite on Windows with C# I think.
Update: New download URL is http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki

bin/x64 directory contains 64-bit NATIVE DLL, named System.Data.SQLite.dll which is SQLITE3.dll compiled for AMD64/X86_64 platforms.
The url is:
http://sourceforge.net/projects/sqlite-dotnet2/files/SQLite%20for%20ADO.NET%202.0/1.0.66.0/
(IF it was you`re looking for).

Download SQLite-1.0.66.0-setup.exe from
http://sourceforge.net/projects/sqlite-dotnet2/files/SQLite%20for%20ADO.NET%202.0/1.0.66.0/
Run this executable will create a folder under C:\Program Files (x86)\SQLite.NET
Pick the System.Data.SQLite.DLL from bin/x64 and renamed it to sqlite3.dll
-- and you are good to go.

For your case, since your app was already written, you won't want to rewrite it.
You can simply recompile your .NET project targeting to 32 bit.
Right click your project-> properties -> build -> platform target : x86
64 bit app can only run on 64 machine while 32 bit app can run on both.

Related

How to Publish a Winforms App with SQLite using ClickOnce

I have a small C# WinForms app developed using Visual Studio Community 2015 on Windows 8.1 on a 64-bit computer and targeting .Net Framework 4.5.2 and Any CPU | Prefer 32-bit. (I also tried targeting just x86).
I used NuGet Package Manager to install Entity Framework 6.3.1 and System.Data.SQLite 1.0.101 (which installed System.Data.SQLite, System.Data.SQLite.Core, System.Data.SQLite.EF6, and System.Data.SQLite.Linq), though System.Data.SQLite.Core doesn't show in the project references.
The app runs fine in the VS debugger, but the ClickOnce published version triggers an Unable to load SQLite.Interop.dll exception when installed and run on the same computer.
I don't see any references to SQLite.Interop.dll in Solution Explorer. There are such dlls in both the x86 and x64 Debug folders of the project, but not in the Release folder which is empty. When I try to add a reference to either the x86 or x64 dlls, I get an error saying they could not be added (i.e. inaccessible or not a valid assembly or COM component). All 3 of the SQLite dlls in the project references have Copy Local = true.
I'm guessing the SQLite NuGet install failed to set some project property/reference, but I don't know what that might be, why, and how to get around it. I'm not even sure who's responsible: SQLite, NuGet, Visual Studio, me?
Thanks for any help. Steve
I JUST found a working solution. Read the comment outlined https://github.com/oysteinkrog/SQLite.Net-PCL/issues/158#issuecomment-88163499 <- there
Important piece:
I created new PROJECT folders for x86 and x64. I created the project folders in the project that click-once deploys. That is, the project that produces the executable. I copied the interop files from the bin folder into the new solution folders
Just include x86 and x64 folders in your solition explorer. Then set Copy to local=true. I will create folders with sqlite.interop.dll
Had a similar issue, resolved it by simly creating the x64 and x86 folder on my startup project as follows:
I am using a separate class library project to communicate with the sqlite db. This is where I copied the sqlite.interop.dll files from

How To Deploy Qt MinGW application for windows

I have develop an application by using QT/ MinGW 32 bit.This app work on my pc Windows 8. But ı want to deploy this app to my friends whose computers has windows 7. How to deploy it.Is there a necessary programs,framework to work it like .net framework, C++ runtime etc.. I don't know.I can't find a clear solution
To deploy a Qt app on Windows, you'll need to gather files from a few different locations. Here is an example how to do it.
See http://doc.qt.io/qt-5/windows-deployment.html, section "Creating the Application Package". You just have to copy all the necessary DLLs (and other files in case of Qt Quick) to the same directory as executable file. The best way to test whether you have all the required files is to rename your Qt installation directory (C:\Qt) to something else and try to double-click your executable.
Deployment on Windows 7 is no different from Windows 8.

.net framework 4.5 not getting installed with the Setup.exe

I am trying to install .net framework 4.5 on windows 7 32bit machine remotely. When I run the dotnetfx45_full_x86_x64.exe file, the log says, contents failed to extract. Drives have enough space also.
So I try to extract the exe content and try to install it using the setup.exe file. So the .net installation blocker I receive is --
Can somebody please help, what file should I use for installation of framework 4.5 after extraction.
Try
Setup.exe /x86
or
Setup.exe /x64
depending on whether your operating system is 32-bit or 64-bit respectively.

Path for dynamically loading OpenCL.dll?

I want to dynamically link OpenCL.dll on the users PC.
When I analyse my own PC I am able to find a lot of OpenCL.dll
C:/Windows/SysWOW64
C:/Windows/System32/DriverStore/...
C:/Windows/System32
C:/Program Files(x86)/AMD APP SDK /...
So I would like to know which is the correct path to load this dll at run time?
Also what is the path for other platforms?
If you are running a 32-bit executable on a 64-bit machine, you want the C:\Windows\SysWOW64 version. If you are running a 64-bit executable on a 64-bit machine or a 32-bit executable on a 32-bit machine, you want the C:\Windows\System version. But I will say that the Windows LoadLibrary call will figure that stuff out for you. You should just be able to call LoadLibrary(L"OpenCL.dll"). It will pick the right one for you.
The other locations are part of driver or SDK installations that may not be deployed on other systems that have OpenCL.

Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format

I have installed a Web app on IIS 7.0 Windows Server 2008 R2 64bit.
I am referring an oracle.DataAccess.dll;
When I try to access the application I get the following message:
"Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format."
Can anybody help me, please?
It seems the Oracle Data Access Component installation process using the "11.2 Release 3 (11.2.0.2.1) with Xcopy Deployment" version is broken. To fix this you must register the missing assemblies in the GAC. To do this for this specific version run these commands from within an administrator console:
md C:\Windows\assembly\GAC_32\Oracle.DataAccess\4.112.2.0__89b483f429c47342\
copy %ORACLE_HOME%\odp.net\bin\4\Oracle.DataAccess.dll C:\Windows\assembly\GAC_32\Oracle.DataAccess\4.112.2.0__89b483f429c47342\
md C:\Windows\assembly\GAC_32\Oracle.Web\4.112.2.0__89b483f429c47342\
copy %ORACLE_HOME%\asp.net\bin\4\oracle.web.dll C:\Windows\assembly\GAC_32\Oracle.Web\4.112.2.0__89b483f429c47342\
Note that this registers only the DLL's but not other languages resources. So, if you are using any another language than English (de, es, fr, it, ja, ko, pt-BR, zh-CHS, and zh-CHT), then you need to register these as well using the corresponding resource file.
If you have Visual Studio installed on the machine, you can issue the following commands instead:
gacutil /i %ORACLE_HOME%\odp.net\bin\4\Oracle.DataAccess.dll
gacutil /i %ORACLE_HOME%\asp.net\bin\4\oracle.web.dll
Note: look for gacutil.exe under the Visual Studio installation folder for it.
Hope this helps.
P.S. Or you can try this.
I avoided registering the 11.2 Release 5 assemblies in the GAC by setting "Enable 32-bit Applications" for the application pool to true.
You may need to enable 32-bit applications in your AppPool.
http://www.alexjamesbrown.com/development/could-not-load-file-or-assembly-chilkatdotnet2-or-one-of-its-dependencies-an-attempt-was-made-to-load-a-program-with-an-incorrect-format/
You need to register that dll on the live server using GAC util. Also check if its present in bin folder or not. Some times missing dll's in bin directory results in same error
In my case, I use VS 2010, Oracle v11 64 bits. I might to publish in 64 bit mode (Setting to "Any Cpu" mode in Web Project configuration) and I might set IIS on Production Server to 32 Bit compability to false (because the the server is 64 bit and I like to take advantage it).
Then to solve the problem "Could not load file or assembly 'Oracle.DataAccess'" (sometime appear the "Compiler Error Message: CS1705: Assembly" error):
In the Local PC and Server is installed Oracle v11, 64 Bit.
In all Local Dev PC I reference to Oracle.DataAccess.dll (C:\app\user\product\11.2.0\client_1\odp.net\bin\4) which is 64 bit.
In IIS Production Server, I set 32 bit compatibility to False.
The reference in the web project at System.Web.Mvc.dll was the version v3.0.0.1 in the local PC, however in Production is only
instaled MVC version 3.0.0.0. So, the fix was locallly work with MVC
3.0.0.0 and not 3.0.0.1 and publish again on server, and it works.
Installing 64-bit ODAC 11.2 Release 3 (11.2.0.2.1) Xcopy for Windows x64 from:
http://www.oracle.com/technetwork/database/windows/downloads/index-090165.html
Fixed it for me. Make sure to update your system path as per step #4 in the readme file.
The accepted answer, published by George Netu helped to solve my problem, but I had to fiddle with some additional trifles:
Problem description:
Under C:\Windows\assembly, I found two Oracle.DataAccess items(GAC-folders?). Relict, caused by several Oracle client installations. One item showed Version 2.112.1.0 but was actually version 2.121.2.0 (visible through Properties->Version). That inconsistency was the bug.
First unhelpful attempts:
tried to deinstall and reinstall the Oracle full client, both in versions Runtime/Administrator
tried to redeploy the correct .dlls
tried to copy the new installed assemblies in the GAC serveral times, as stated in the accepted answer above via command prompt (but that didn't solve the version mismatch..)
tried to use gacutil /i ...
Final success:
I landed on the Gacutil.exe msdn page and were ultimately able to delete the items from the C:\Windows\assembly folder.
gacutil /u Oracle.DataAccess, Version=2.112.1.0, Culture="Neutral",PublicKeyToken=45e343aae32233ca
gacutil /u Oracle.DataAccess, Version=2.212.2.0, Culture="Neutral",PublicKeyToken=45e343aae3223abc
gacutil /u Oracle.Web, Version=2.112.1.0, Culture="Neutral",PublicKeyToken=45e343aae3223def
After that, i repeated the two gacutil /i ... commands and the two dlls appeared there in consistent versions.
Finally restarted the IIS, and it works..
Yeah, it is a quite annoying issue I faced sometimes. The main problem is that an web application uses wrongly 32 bit Oracle.DataAccess.dll instead of 64 bit, or in the reverse case. There are a few solutions for it.
1. Enabling 32-bit applications in the application pool if your application is 64 bit and need to run 32 bit Oracle.DataAccess.dll.
Go to the IIS and set true for "Enable 32-Bit Applications" option in Advanced Settings of an Application pool.
2. Correcting reference dll.
Reference path is supposed to be system reference path configured by Oracle Installation process. But, some cases such as installing or updating new Oracle version, the latest DLLs doesn't update old ones, or path is changed, or a reference is not updated in the web application project. Therefore, we should correct Oracle.DataAccess reference manually.
Go to the web application and remove Oracle.DataAccess reference. And add new reference for Oracle.DataAccess. It must be correct Oracle.DataAccess.dll from your oracle installation path. For example:
C:\Oracle\product\12.2.0\client_1\odp.net\bin\4\Oracle.DataAccess.dll
ODP.NET and Dependent Unmanaged DLL Mismatch
To enforce the usage of
Oracle.DataAccess.dll assembly with the correct version of its
unmanaged DLLs, an exception is raised if Oracle.DataAccess.dll
notices it has loaded a mismatched version of a dependent unmanaged
DLL.
https://docs.oracle.com/cd/E11882_01/win.112/e23174/InstallODP.htm#ODPNT152
3. Easy and quick way (but not proper solution) to fix the issue is that override directly an Oracle.DataAccess.dll file copying from oracle installation path (for example: C:\Oracle\product\12.2.0\client_1\odp.net\bin\4\ ) to Bin folder of your web application.
Hope this helps you a little. Good luck.
I had the same problem.
I go to the project properties in general section set platform target to 64 bit (x64) and my problem solved
In application pool ---> click Advance settings --> Enable 32 bit option
see the this image

Resources