简体   繁体   中英

Does custom action dll-s for msi installer have to be created with Visual Studio only?

I have created setup project with Visual Studio. I also need some custom actions - created DLL with Visual c++ and it works just fine but i don't want to include visual c++ runtime files to my project. So is it possible to build this dll with some other c++ compiler?

I have tried to make make it with Dev-c++ but when compiling i get few hundred compilation errors from files msi.h and msiquery.h

可能最简单的解决方案是将DLL与静态运行时库链接。

I have made a custom dll for my setup project. My dll is very simple, registering few services, not CLR or any 3rd party lib dependent. Have statically linked with msi.lib only.

I have removed the .net and windows installer prerequisite requirements from the setup project. My setup fails on macines not having .net framework..?

As I have not having any .net dependent code, what should be the solution to this. I don;t want user to download framework first for installation.

Regards Amit

here you can find some short example using C++ DLLs for Custom Actions:

http://www.simple-talk.com/dotnet/visual-studio/visual-studio-setup---projects-and-custom-actions/

In general custom action DLLs should only rely on DLLs that are already in the system before the installation. This means, for example, statically linking the CRT, as noted by MSalters, but also applies to any other dependency on 3rd party libraries.

Another option is to link with the OS CRT, as Koby Kahane explains here .

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