none
Wix not copying sql interop files in temprorary folder. Error Unable to load DLL 'SQLite.Interop.dll': RRS feed

  • Question

  • I am migrating one of my project from old vdproj to WIX project.
    In my application installation i have to do some work during custom action on installation complete. I am successfully able to do other work but sqllite related implementation is not working as SQLite.Interop.dll files are not copying in temporary folder from where application install.
    Bu After installation complete SQLite.interop file do able copied with other files in program menu folder.

    My Wix setup xml is as following

    ...

          <Feature Id="ProductFeature" Title="MyAppPosWixSetup" Level="1">
              <ComponentGroupRef Id="ProductComponents" />
              <ComponentGroupRef Id="en_US_files" />
              <ComponentGroupRef Id="Images_files" />
              <ComponentGroupRef Id="_x64_files" />
              <ComponentGroupRef Id="_x86_files" />
              <ComponentGroupRef Id="ProgramFilesFolder_files" />
              <ComponentGroupRef Id="dlls_files" />
            </Feature>
         
         <Fragment>
            <Directory Id="TARGETDIR" Name="SourceDir">
              <Directory Id="ProgramFilesFolder">
                <Directory Id="INSTALLFOLDER" Name="MyAppPosWixSetup">
                  <Directory Id="Images" Name="Images" />
                  <Directory Id="_x64" Name="x64"  />
                  <Directory Id="_x86" Name="x86" />
                  <Directory Id="en_US" Name="en-US" />
                  <Directory Id="dlls" Name="dlls" />
                </Directory>
              </Directory>
              <Directory Id='AppDataFolder' Name='Roaming'>
                <Directory Id='_8F59BFDE_678A_D04A_B032_C90D66940878' Name='MyApp POS'>
                  <Component Id='com_dir_8F59BFDE_678A_D04A_B032_C90D66940878' Guid='EECDB3BC-65C4-4A73-A182-2976A649713E' Transitive='no'>
                    <CreateFolder Directory='_8F59BFDE_678A_D04A_B032_C90D66940878' />
                    <RemoveFolder Id='_F53B4A9B_E7AA_4C30_A42F_DDF464B4A795' On='uninstall' />
                    <RegistryValue Root='HKCU' Key='Software\[Manufacturer]\[ProductName]\Installer' Name='com_dir_8F59BFDE_678A_D04A_B032_C90D66940878' Type='string' Value='MyApp POS directory' KeyPath='yes' />
                  </Component>
                  <Component Id='com_B81229DC_FAC4_654D_B049_EC75EA79F23E' Guid='55A50D8C-2310-45A4-B8BF-54597EEE5B12' Permanent='no' SharedDllRefCount='no' Transitive='no'>
                    <File Id='_B81229DC_FAC4_654D_B049_EC75EA79F23E' DiskId='1' Hidden='no' ReadOnly='no' System='no' Vital='yes' Compressed='yes' Name='config.ini' Source='..\PosControlApplication\config.ini' KeyPath='no' />
                    <RegistryValue Root='HKCU' Key='Software\[Manufacturer]\[ProductName]\Installer' Name='com_B81229DC_FAC4_654D_B049_EC75EA79F23E' Type='string' Value='config.ini file' KeyPath='yes' />
                  </Component>
                </Directory>
              </Directory>
              <Directory Id='DesktopFolder' Name='Desktop'>
                <Component Id='com_dirDesktopFolder' Guid='064DDC54-0010-43F3-BCF3-8DCB8F9A0A87' Transitive='no'>
                  <RemoveFolder Id='_FB2AC228_7D57_4311_9C65_34E7A5C1B266' On='uninstall' />
                  <RegistryValue Root='HKCU' Key='Software\[Manufacturer]\[ProductName]\Installer' Name='com_dirDesktopFolder' Type='string' Value='Desktop directory' KeyPath='yes' />
                  <Shortcut Id='_3DFA2BA1_17C7_0445_9809_A24D46646F71' Name='MyApp POS' Show='normal' WorkingDirectory='TARGETDIR' Target='[INSTALLFOLDER]PosControlApplication.exe'>
                    <Icon Id='_A24D46646F71' SourceFile='..\PosControlApplication\Images\MyApp logo.ico' />
                  </Shortcut>
                </Component>
              </Directory>
            </Directory>
          </Fragment>
          <Fragment>
            <ComponentGroup Id="_x64_files" Directory="_x64">
              <Component Id="x64_SQLite.Interop.dll" Guid="13b928df-a28e-4163-af38-5cd5d87bf644">
                <File Id="x64_SQLite.Interop.dll" Name="SQLite.Interop.dll" Source="$(var.PosControlApplication_TargetDir)x64\SQLite.Interop.dll" />
              </Component>
            </ComponentGroup>
          </Fragment>
          <Fragment>
            <ComponentGroup Id="_x86_files" Directory="_x86">
              <Component Id="x86_SQLite.Interop.dll" Guid="63874a2a-330d-42a0-bec1-09056dec2beb">
                <File Id="x86_SQLite.Interop.dll" Name="SQLite.Interop.dll" Source="$(var.PosControlApplication_TargetDir)x86\SQLite.Interop.dll" />
              </Component>
            </ComponentGroup>
          </Fragment>



    Also for testing purpose if i put a thread sleep in my custom code and added files manually to temporary folder my functionality do worked

    Kamran Shahid Application Developer (MCP,MCAD,MCSD.NET,MCTS,MCPD.net[web])

    • Moved by Stanly Fan Tuesday, October 31, 2017 6:53 AM
    Wednesday, October 25, 2017 11:38 AM

All replies

  • Hi Kamran,

    According to your description, your issue is more related about WIX project. And this forum is discussing and asking questions about the Windows Form and ClickOnce, it will be more appropriate to ask your question at WIX support.

    Thank you for your understanding.

    Note: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    Regards,

    Stanly


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, October 26, 2017 6:57 AM