Cannot create new Setup project

Add-in Express™ Support Service
That's what is more important than anything else

Cannot create new Setup project
 
Paul Congdon




Posts: 9
Joined: 2013-01-02
Greetings,

After having been able to create setup projects, I no longer am able to create a new version of Setup project for my Add-in solution.

Currently running 64-bit Windows 10 Pro. I'm using Visual Studio Premium 2012 Update 5. I tried creating a setup project with both Add-in Express for .NET v8.3.4393.0 and v8.4.4395.0 and receive the same error.

I have generated approx. 35 previous setup projects over the past few years and have not seen this issue until this week. I am building WiX type installs using 3.10.3.

I've cleaned the solution and rebuilt.

I've looked for anything that might initialize to null in AddinModule:
 public class AddinModule : AddinExpress.MSO.ADXAddinModule 

There isn't anything explicitly set to null. I do have the following but its been there a very long time:

        public static new AddinModule CurrentInstance
        {
            get
            {
                return AddinExpress.MSO.ADXAddinModule.CurrentInstance as AddinModule;
            }
        }


Exception Details (I removed my machine/IP address and local user account name):
********************************************************************************
Application Domain: DefaultDomain
Assembly Codebase: file:///C:/Program Files (x86)/Add-in Express/Add-in Express for .NET/Bin/Packages/VS2005/AddinExpress.Wizard.dll
Assembly Full Name: AddinExpress.Wizard, Version=8.3.4393.0, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version: 8.3.4393.0

Exception Source: AddinExpress.Wizard
Exception Type: System.NullReferenceException
Exception Message: Object reference not set to an instance of an object.
Exception Target Site: CreateSetupProject

---- Stack Trace ----
AddinExpress.SetupWizard.SetupWizardForm.CreateSetupProject(primaryOutputPath As String)
AddinExpress.Wizard.dll: N 0670 (0x29E) IL
AddinExpress.SetupWizard.SetupWizardForm.CreateSetupProject(project As Project, targetFramework As UInt32, serviceProvider As IServiceProvider)
AddinExpress.Wizard.dll: N 0127 (0x7F) IL
AddinExpress.Wizard.ADXPackage.Exec(guidCmdGroup As Guid&, cmdID As UInt32, nCmdexecopt As UInt32, pvaIn As IntPtr, pvaOut As IntPtr)
AddinExpress.Wizard.dll: N 0996 (0x3E4) IL

Any assistance would be appreciated.
-Paul C.
Posted 22 Nov, 2016 16:20:21 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hello Paul,

Do you add any custom code to the constructor of the add-in module? If so, move it to an event of the module; say to the AddinInitialize or OnRibbonBeforeCreate event. The same applies to all initializers of complex-type variable declared on the class level of the add-in module. Say,

MyType myVar = null;

should become:
MyType myVar;

And you need to initialize it in one of the above-mentioned events.

egards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 23 Nov, 2016 05:47:29 Top
Paul Congdon




Posts: 9
Joined: 2013-01-02
Hello Andrei,

No custom code in constructor of the add-in module:
        public AddinModule()
        {
            System.Windows.Forms.Application.EnableVisualStyles();
            InitializeComponent();
            //Please add any initialization code to the AddinInitialize event handler
        }


Initializers of complex-type variable
Originally, I had one module-level complex-type variable set to null. I had tried moving that before posting here with no success, still same error when creating a new Setup project.

gray

For this same VS 2012 solution, historically I've created approximately 35 past versions of Setup Projects using WiX. I'm at a loss how to get past this. Is there a manual approach to building the Setup project?

Best Regards,
Paul
Posted 29 Nov, 2016 18:07:02 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hello Paul,

What Add-in Express build are you using?

What project types do you have in the solution? I assume you should have done something to trigger this problem. BTW, does this work in a new empty add-in project?

In the add-in project make sure that all the Add-in Express related references point to the Add-in Express version which is installed on your machine.


Andrei Smolin
Add-in Express Team Leader
Posted 30 Nov, 2016 05:39:09 Top
Paul Congdon




Posts: 9
Joined: 2013-01-02
Hello Andrei,

Background
We have a Word add-in we call ReportWriter (currently deployed version is RW v1.3.6) written for scientists to generate standardized reports based upon templates and internal data from their organization. They currently use Windows 7 with Office 2013 but their IT Dept. is beginning to rollout Office 2016 followed by Windows 10 in early 2017.

ReportWriter Visual Studio 2012 Solution
The solution is made up of 4 projects:
    * WPF main app project using Telerik's WPF UI controls
    * Common class library project
    * OfficeComposite class library (used for Prism and WinAPI interaction)
    * Setup Project using WiX 3.10


Recent timeline
To prepare for the environment changes, in September, I used ADX 8.2.4371 to generate a new Setup WiX project (RW 1.3.7), that worked until we discovered an issue on some machines: we could not launch PowerPoint to generate supporting decks for their reports. After seeing that your October release addressed this problem I proceeded to move to ADX 8.3.4393. After getting all the ADX references pointing to that version, I found I could not Create Setup projects anymore. Soon after ADX 8.4.4395 was released and I tried that one with no success. I rolled everything back to ADX 8.3.4393 to check that again with no luck. And then I posted here for help.

I agree I probably did something to get me stuck down this rabbit hole, was hoping you had a quick magic potion. I'll work on an empty project here soon and see what happens.

Thanks,
Paul
Posted 30 Nov, 2016 17:34:56 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hello Paul,

Any news?


Andrei Smolin
Add-in Express Team Leader
Posted 06 Dec, 2016 04:47:24 Top
Paul Congdon




Posts: 9
Joined: 2013-01-02
Hi Andrei,

Sorry, been out herding cats again. :)

I've moved our solution to VS2015 and am reinstalling Add-in Express now. I'll see if that unsticks something. If it doesn't affect the current solution then I'll create a new one and try.

Thanks for following up,
Paul
Posted 06 Dec, 2016 10:35:05 Top
Paul Congdon




Posts: 9
Joined: 2013-01-02
Hi Andrei,

I am still getting same error with our solution and VS 2015. I'm still using 3.10 WiX and the ADX wizard sees that and uses it, but when it tries to initialize AddinModule class it fails.

I was able to create new ADX solution and create a setup project so the problem lies in our solution.

I'm comparing the two (new clean solution and the old one) and found things to be a bit different in structure of the AddinModule.cs. We had originally created our solution under VS 2010 and a much older version of ADX and have brought it along since then. I'm thinking of manually recreating the AddinModule.cs and its partial classes to see if I can get it to work.

Do you have a best practice on doing this? Do I need to worry about anything else in the solution?

Thanks,
Paul
Posted 06 Dec, 2016 13:44:26 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hello Paul,

I would like to access your PC remotely. Is this possible to do within the next 1.0 - 1.5 hrs? If yes, I suggest using TeamViewer 11; in this case you'll need to send me your session ID and password to the support email address; see {Add-in Express installation folder}\readme.txt.


Andrei Smolin
Add-in Express Team Leader
Posted 07 Dec, 2016 08:45:47 Top
Paul Congdon




Posts: 9
Joined: 2013-01-02
Okay, d/l TeamViewer now, I'll contact you shortly if you still have time.
Posted 07 Dec, 2016 11:07:00 Top