Question

I have a program that uses the file 'Ionic.Zip.dll' from DotNetZip Library and I apply installer to this program.

I'm using DotNetZip.

Now I cant add a reference for 'Ionic.Zip.dll' to the Wix(installer) project, when i try to add reference I get the following error:

“A reference to [filepath] could not be added. Please make sure that the file is accessible, and that it is a valid WiX reference.“

I Think Wix only accept a Projects reference and not dll files.

What can I do ? thanks a lot for your help!

Was it helpful?

Solution

I Think Wix only accept a Projects reference and not dll files.

I was waiting for this, since I wasn't sure what you meant by "reference".

When it comes to WiX I find adding references to projects/DLLs to be an utter pain. Maybe I'm just bad with them, I'm not sure, but the easiest way I found to add a project (and all of it's dependencies) was to simply make a bunch of Component elements, and assign each one a single file from the folder in which the file is being compiled to, see general example below (this is just based off of how I lay out my product.wxs files):

<Fragment>
    <ComponentGroup Id="MainProgramFiles" Directory="INSTALLFOLDER">
        <Component Id="FooEXE">
            <File Source="..\Foo\Foo.exe"/>
        </Component>
        <Component Id="BarDLL">
            <File Source="..\Foo\Bar.dll"/>
        </Component>
        <Component Id="DotNetZipDLL">
            <File Source="..\Foo\DotNetZip.dll"/>
        </Component>
        <Component Id="AnotherExampleDLL">
            <File Source="..\Foo\AnotherExample.dll"/>
        </Component>
    </ComponentGroup>
</Fragment>

NOTE: you'll need to build your other projects before the WiX files in order for this to work.

If you have any questions, feel free to ask, I hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top