Custom Action could be not found

Jan 30 at 10:11 AM
Hi Oleg,
first at all you do good job with Wix#. Thanks.
I have some questions and hope that you can give me some answers.
  1. I got System.IO.FileNotFoundException for my CustomAction.dll. Do i something wrong ?
    I tried execute some c# code in Uninstall. How do i execute Custom Action during Uninstall or Install ? .NET Framework is 3.5 for Project and .Dll as Target.
  2. I can choose InstallDir. How do i search in Registry for Key during Installation? I need special Key from Registry where another Software installed. I need registren mydll as com during installation. How can i do this ?
    Im new in Wix and need starthelp.
    Thanls a lot for answers
Coordinator
Jan 30 at 12:22 PM
It's hard for me to comment as I have no specific information about your project specifics. One thing is for sure that you cannot use DLL as a target. The build script needs to be compiled into executable so MSBuild can run it to build the msi.

For not found file you can always debug and see what exactly is missing (though it's not trivial). Most likely there are some problems with the assembly probing.

As for install/uninstall actions, i personally prefer ManagedProject events. No ambiguity at all:
project.BeforeInstall += msi_BeforeInstall;
project.AfterInstall += Project_AfterInstall;
Have a look at "Setup Events" sample. There is also sample for the registry search, but again if you go with setup events then registry lookup is just a C# routine that you will find plenty of online samples for. And Wix# already comes with Tasks library that simply takes product's GUID and tells you if it is installed (see CustomUISequence sample).

As for COM, there were a few discussions in this discussions board about this topic. You will be able to find them.

Please use GitHub (https://github.com/oleg-shilo/wixsharp) for further discussions.

Just trying to make it more noticeable that Wix# has moved to GitHub