locked
Not a valid win32 application

    Question

  • I have a .NET 3.5 framework assembly that I use from an installshield project. On Windows Vista 64-bit I can initialize classes within this DLL, but any time I try to invoke a method within this newly initialized class, I get "not a valid win32 application" and the install executable(which is 32-bit) aborts installation. This DLL is used for installing databases within sql server and querying the sql server. I have narrowed the problem to the System.Data.dll on my vista machine. Basically, any time I declare/initialize a sqlClient class within the System.Data.dll assembly and the runtime tries to load the system.data.dll (version 2.0.50.727.3053) the installation executable halts with the badimageFormat exception.
    I have tried updating this System.Data.dll but my 64-bit Vista machine refuses to update it. It also refuses the uninstallation on this DLL. My question is "How can I update .NET assemblies already installed on Vista"
    Wednesday, February 03, 2010 5:48 PM

All replies

  • I have a .NET 3.5 framework assembly that I use from an installshield project. On Windows Vista 64-bit I can initialize classes within this DLL, but any time I try to invoke a method within this newly initialized class, I get "not a valid win32 application" and the install executable(which is 32-bit) aborts installation. This DLL is used for installing databases within sql server and querying the sql server. I have narrowed the problem to the System.Data.dll on my vista machine. Basically, any time I declare/initialize a sqlClient class within the System.Data.dll assembly and the tries to load the system.data.dll (version 2.0.50.727.3053) the installation executable halts with the badimageFormat exception.
    I have tried updating this System.Data.dll but my 64-bit Vista machine refuses to update it. It also refuses the uninstallation on this DLL. My question is "How can I update .NET assemblies already installed on Vista"

    Do you mean .NET cannot be updated with 64-bit vista? What's the reason? Is there any error message?
    Monday, July 19, 2010 1:16 AM
  • I don't think your problem is system.data.dll. That's highly unlikely. There's nothing wrong with your .NET setup.  NET 3.5 is a set of extra base classes on top of the base NET 2.0.  The correct version of System.Data for NET 3.5 is the one you're loading.

    Your badimage exception is a mismatch, probably in the bitness of your apps.  When you call it from your InstalShield setup, what exactly does that mean?  Is this an MSI-based setup and you're calling it as a custom action?

    Also, if your NET code is compiled for AnyCpu and is launched by Windows it will run as native x64 and be unable to load any explicit x86 assemblies.


    Phil Wilson
    Monday, July 26, 2010 7:47 PM