Why is Project.AddRemoveProgramsIcon undefined in one setup project?

Dec 2, 2016 at 7:26 AM
Hi, I have 2 WixSharp setup projects. In one, in accordance with one of your samples, I have this code:
        project.AddRemoveProgramsIcon = @"Files\App.ico";
        project.Manufacturer = "DesignForge, Inc.";
which compiles just fine.

In another WixSharp setup project, I also have these 2 lines of code within method Main, of file Setup.cs (your normal WixSharp project). However, here, the "AddRemoveProgramsIcon" is in red, showing the error "Project does not contain a definitiion for 'AddRemoveProgramsIcon'. Also, same for the project.Manufacturer property!

What could be going on here? I thought perhaps these were using two different versions of your compiler. However, I checked this. And each uses this to point to Wix tools:

Compiler.WixLocation = @"..\packages\WixSharp.wix.bin.3.10.1\tools\bin"; Your advice is appreciated, thank you.

James W. Hurst
email: JamesH@Designforge.com
Dec 3, 2016 at 12:43 PM
Hi James,

Could you please provide a solution sample with two conflicting projects. Otherwise I cannot reproduce/debug it. Of course please remove any sensitive content and leave it as lean as HelloWorld app.

Thank you
Dec 4, 2016 at 10:17 AM
Edited Dec 5, 2016 at 12:08 AM
Sure. How shall I provide this?

While I was packaging this up into a .rar file, I noticed a difference.
The one that does allow the 2 properties, references WixSharp version WixSharp.\lib\net35\WixSharp.dll

The other references WixSharp.bin.\lib\WixSharp.dll

Did you remove these properties some time after version ?

Dec 5, 2016 at 1:19 AM
OK, it explains. In one of the projects you are an old interface that has been reworked dramatically about 1.5 years ago (Release v1.0.15.1). YOu should use the dedicated ControlPanelInfo member for the ARP properties. See ProductInfo sample.
var project =
    new Project("MyProduct",
        new Dir(@"%ProgramFiles%\My Company\My Product",
            new File("readme.txt")));
project.ControlPanelInfo.Comments = "Simple test msi";
project.ControlPanelInfo.Readme = "https://wixsharp.codeplex.com/manual";
project.ControlPanelInfo.HelpLink = "https://wixsharp.codeplex.com/support";
project.ControlPanelInfo.HelpTelephone = "111-222-333-444";
project.ControlPanelInfo.UrlInfoAbout = "https://wixsharp.codeplex.com/About";
project.ControlPanelInfo.UrlUpdateInfo = "https://wixsharp.codeplex.com/update";
project.ControlPanelInfo.ProductIcon = "app_icon.ico";
project.ControlPanelInfo.Contact = "Product owner";
project.ControlPanelInfo.Manufacturer = "My Company";
project.ControlPanelInfo.InstallLocation = "[INSTALLDIR]";
project.ControlPanelInfo.NoModify = true;
//project.ControlPanelInfo.NoRepair = true,
//project.ControlPanelInfo.NoRemove = true,
//project.ControlPanelInfo.SystemComponent = true, //if set will not be shown in Control Panel

I am closing this issue and if you need any further support please log an issue on GitHub.
Dec 5, 2016 at 2:31 AM
That answers it -- thank you so very much !