Including sql server compact in desktop install for win 7 32bit and 64bit - visual-studio-2010

I have a desktop app created in vs10 and am using clickonce install. I must include a database with critical info for the program as part of the install. I am compiling for all versions of windows (32 and 64). But as I understand it, if I include the 32 bit sqlce as part of the installation, it will not work on 64 bit installs. Must I include a 32 bit and 64 bit version of the db and test for windows version before accessing the data? Or is there a simpler solution that I am missing?

You can just include all the required files as content with your app, and it will run for any user and on both x86 and x64 platforms. Just follow the instructions here: http://erikej.blogspot.com/2011/02/using-sql-server-compact-40-with.html

Related

x64 mvc3 project with Oracle Data Access

I'm using the Oracle Data Access(ODP.NET) in a mvc3 project.
the odp.net has both x64 and x86 versions separately and i want to use the x64 version.
I set "Platform target" to x64 and add a reference to x64 version of odp.net, there is no problem to publish on iis server, but i can't run the project for develop and test, however Razor views display errors on c# statements.
How i can develop the project in x64 platform?
I would say the immediate problem is forcing your platform target to x64. The asp.net development server is 32 bit. Either leave it as "Any CPU" or run a 64 bit dev server (either the local IIS server or compile cassinidev as 64 bit). If you do leave it as any cpu so you can continue to use the out of the box dev server, you'll get the same error with the 64 bit version of oracle.dataaccess.dll for the exact same reason.
I install the 32 bit version on my machine (i also install the 64 bit version but I mention that only to note that they run fine side by side). The reference to Oracle.DataAccess.dll does not include bit-ness, only version. So as long as you have the same version (or later with publisher policies) of the 64 bit flavor on the server, everything will run fine once you deploy.

How to install debugging tools for windows 32 bits side by side with 64 bits on a 64 bits OS?

I have a 64 bit Windows 2008R2 VM, where I installed Debugging tools for Windows 64 bit from the SDK. Now I wish to install the 32 bits and even downloaded the respective ISO - GRMSDK_EN_DVD.iso from http://www.microsoft.com/en-us/download/details.aspx?id=8442
However, the damn thing thinks there is nothing to install, because the 64 bits is already installed.
How can I still install it?
Edit
OK, I uninstalled the 64 bit version. Now, it fails to install with this lovely message:
Setup could not find the file WinSDK_amd64\WinSDK_amd64.msi at any of the specified source locations E:\Setup
Microsoft support site claims that I am probably trying to install a wrong architecture. But the ISO file name is GRMSDK_EN_DVD.iso and http://www.microsoft.com/en-us/download/details.aspx?id=8442 says it is for x86.
If I cannot install x86 on a 64 bits OS, then how do I get the 32 bits windbg installed on my 64 bits OS?
The Windows SDK for Windows 7 (for example) ISO image contains the installers under Setup\WinSDKDebuggingTools and Setup\WinSDKDebuggingTools_amd64 folders.
This applies to both 32 bit or 64 bit SDK ISO, and you don't need to install the SDK itself.
The Windows 8 SDK ISO changed a little bit here by putting the debugger installers under Installers folder, X64 Debuggers And Tools-x64_en-us.msi and X86 Debuggers And Tools-x86_en-us.msi. After installing both, you can find them under C:\Program Files (x86)\Windows Kits\8.0\Debuggers
Found this good Samaritan - http://rxwen.blogspot.ca/2010/04/standalone-windbg-v6120002633.html
Thank you, thank you, thank you.
Previously Microsoft posted the installers directly on their website; this was so much easier than the current method. Now you have to download the SDK installer, select both debuggers, let them download, then figure out where they got downloaded to and copy them off somewhere for easy access in the future. The ISOs are overkill unless you want the rest of the SDK components as well.

Can I use 32 bit Oracle Developer Tools with x64 ODAC in VS2010?

From the Oracle website here:
http://www.oracle.com/technetwork/database/windows/downloads/index-090165.html
This is for their latest Oracle Data Access Components, 64-bit ODAC 11.2 Release 4 (11.2.0.3.0) for Windows x64. I want to use the developer tools (ODT) but they aren't available in 64 bit (probably because VS2010 is still 32-bit). From the site:
Important: The 32-bit Oracle Developer Tools for Visual Studio download is required for Entity Framework design-time features. The above download fully supports Entity Framework deployment, but does not contain design-time tools.
I don't use EF (I use the Mindscape LightSpeed product as it's usually 3 or 4 years ahead of EF) but the principle is the same - VS2010 and LightSpeed are 32-bit apps and can't load/use x64 libs.
I would like to use the 32-bit tools (ODT) to develop my app and deploy the app using the x64 ODAC. Has anyone done this? Can it be done? Anybody?
If it matters, this is for a WCF service running on a virtual Windows Server 2008 R2 machine. What I have done semi-successfully is force everybody to 32-bit operation, but that seems a little silly if 64 bit is supported as they claim it is.
Thanks in advance,
Dave
What the Oracle site mentions is that they have provided the ODAC components for both 32 and 64 bit, but have the Visual Studio design tools for only 32 bit.
Since you are not using EF, I am guessing you are interested in using ODP.NET components with LightSpeed.
For this scenario, you could go ahead by installing both 64 and 32 bit of ODP.NET on the development system and allowing the application to run in native mode on the deployment systems (the application will select the 64 or 32 bit ODP component based on the platform it is running on).
Check RealFiction blog and Semaphoremd blog for detail about installing the client tools for both 64 and 32 bit in parallel. Basically proper way to go about installing them in separate folders and creating symbolic links to the appropriate folder from %windir%\system32 and %windir%\SysWOW64. Thus allowing the WOW64 to take care of allocating the proper components based on the running application.

How to create an installer condition that test for 32 and 64 bit Windows

I am creating a visual studio set-up project. I need to test to see if the version of Windows I am being installed on is 64 or 32 bit. I am planning on checking for the existence of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node as a way of telling that I am being installed on 64 bit windows. Is this a good idea and/or is there a better way?
The reason that I want to know which version of Windows I am on is so I can create a directory under either System32 or SysWOW64. I would rather not create two installers one targeting 64 bit platforms and one targeting 32 bit platforms.
The easiest way to check for a 64 bit machine in an MSI installer is to use the VersionNT64 property. This will only be set if the target machine is running a 64 bit operating system.
http://msdn.microsoft.com/en-us/library/aa372497(VS.85).aspx

System.Data.OracleClient on Windows 7 64

I'm trying to access an Oracle Database from a program I'm writing on Windows 7 64bit. Whenever it initializes the client, i get a BadImageFormatException complaining that I'm trying to use a 32bit client in a 64bit environment. I've tried to compile the program in any way (Any CPU, 32, 64 bit), but it did not solve the problem. Any help?
I would guess that the error message is correct. You have a 32 bit Oracle DLL that you use from a 64 process. The Oracle DLL probably does some interop's with native code, that may require it to be processor specific.
There are several ways to solve this.
Option 1: Get the 64 bit Oracle DLLs.
Option 2: Make sure that your process is 32 bit.
.NET exe files marked for AnyCPU will start a 64 bit process on a 64 bit operating system. But if you mark your EXE file for x86 then it should work. For Web applications you have to set a 32 bit flag somewhere in IIS.
You need to configure your Project to target the .NET 4 Framework, by going to Project-Designer -> Target Framework.
Then you need to delete the old Oracle dll, and use the new 64-Bit-Version of the Oracle dll that is included in the .NET 4 Framework.

Resources