简体   繁体   中英

How to create a working installation program in VB2008

I am playing with VB2008 on a 32-bit computer and I finished an application that uses the MySql Connector 6.4.4.

I compiled and published the application and tried to run it on another computer that happens to be a 64-bit computer, but its not working.

How do I tell VB to create an install package that includes all necessary DLLs?

In Visual Studio 2008 and other Visual Studio (2015, 2017) or Visual Basic 2008 Express versions, the default build target is the "Any CPU".

An AnyCPU assembly will JIT to 64 bit code when loaded into 64 bit process and 32 bit when loaded into a 32 bit process (like your developer machine).

If you compile as "Any CPU" and run on an x64 platform, then you won't be able to load 32-bit dlls, because your app wasn't started in WOW64, but those dlls need to run there. If you compile as x86, then the x64 system will run you app in WOW64, and you'll be able to load 32-bit dlls.

You should choose "Any CPU" if your dependencies can run in either environment, but choose x86 if you have 32-bit dependencies.

You can download the MySql Connector for 64bits in https://dev.mysql.com/downloads/connector/odbc/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM