WIX custom action: use dllimport

前端 未结 1 1907
我在风中等你
我在风中等你 2021-01-23 11:25

I have a WiX installer and Custom Actions project. I added C# library as reference to Custom action\'s project. This C# dll uses DllImport to one C++ dll. When installing I rece

1条回答
  •  一个人的身影
    2021-01-23 11:40

    I've had this issue before. After reading through the MSBuild files for wix I eventually found a property that is used as a list for the dlls needed in the self-extracting package that contains the custom action dll.

    in wix.ca.targets (in the sdk folder) there is a property called CustomActionContents that is used when running makesfxca.

    Here's the comment for this set of msbuild targets which package your custom action dll.

    
    

    and

    
    

    So it looks like you can mark your reference to the mycpp.dll as copy local and it will be automatically picked up or you can add a new property in your custom action project (probably edit the csproj and add the property) which contains the path to the dll and it will get picked up.

    0 讨论(0)
提交回复
热议问题