I have wix setup project in my solution and custom action project.
I have added reference to the custom action project in setup project
and added following lines:
<Binary Id="CA_DLL" SourceFile="GlobalCustomActions" />
<CustomAction Id="CA_TestConnection" BinaryKey="CA_DLL" DllEntry="TestDatabaseConnection" Execute="immediate" />
I get error “The system cannot find the file GlobalCustomActions”.
I also tried the following:
<Binary Id="CA_DLL" SourceFile="GlobalCustomActions.CA.dll" />
What is the right syntax please?
The second syntax in your question is correct – you should specify the path to the file
*.CA.dll. The problem here is that current directory is not the one that DLL lives in. In order to avoid such problems in future, specify the full path through the preprocessor variable, for instance: