Compilation error after Add-In version upgrade to 9.4.4644.0

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

Compilation error after Add-In version upgrade to 9.4.4644.0
 
Dinesh Porwal




Posts: 3
Joined: 2017-12-26
Hi Support Team,

Recently I upgraded the Add-In version from 8.7.4430.0 to 9.4.4644.0 (Add-in Express for Office and .NET) and my existing code is giving me compilation error for class name "Security". If I use full path reference (including namespace) then code compiles. Can you please confirm if any class was added with the name "Security" and that's why it is conflicting with my class name?

So like earlier my code was like this

using ABC.QPR.XYZ.Models;

internal static List<Security> ABC()
{
//write code here
}

But after upgrading the add-in version code works if I use full path reference including namespace

using ABC.QPR.XYZ.Models;

internal static List<ABC.PQR.XYZ.Models.Security> ABC()
{
//write code here
}

Visual studio is forcing to user full reference path. So I am wondering if the new add-in version has any security class, as I am not getting an error for other class names.

Regards,
Dinesh
Posted 10 Oct, 2019 11:04:10 Top
Andrei Smolin


Add-in Express team


Posts: 16672
Joined: 2006-05-11
Hello Dinesh,

A class with this name exists in one of the namespaces referenced via the “using” statements in that .cs file. Search for "Security" in the Object Browser to find the namespace. Or, comment out these “using” things one by one. Add-in Express doesn’t have such a class.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 11 Oct, 2019 02:53:01 Top
Dinesh Porwal




Posts: 3
Joined: 2017-12-26
Thanks, I have updated all my security class reference by using the alias.

My other question is that I want to create the installer for office 64 bit so what I need to change in my existing installer (support 32-bit office only) and using Add-In version 8.7.4430.0. While for the 64-bit installer I just downloaded the Add-In version and AdxLoader 9.4.4644.0 (Add-in Express for Office and .NET). Do I also need to update the reference for these

- Microsoft.Office.Interop.Excel.dll
- Microsoft.Office.Interop.Word.dll
- Wix Installer (WPFToolkit.dll)

If you have any reference link that will really help.

Regards,
Dinesh
Posted 16 Oct, 2019 08:06:50 Top
Andrei Smolin


Add-in Express team


Posts: 16672
Joined: 2006-05-11
Hello Dinesh,

Add-in Express generates a setup project creating a 32bit installer. This allows the installer to run on both 32bit and 64bit systems. By default, the installer delivers both 32bit and 64bit loaders (adxloader.dll, adxloader64.dll) to the target machine. It also delivers your add-in assembly: if it is built for the Any CPU platform (recommended), your add-in would be loaded by 32bit and 64bit Office. In order to register the add-in for 32bit and 64bit Office, the installer also deploys adxregistrator.exe. When run as a custom action of your setup project, it registers the add-in as follows:
- on a 32bit Windows, it registers for 32bit Office only; this is natural.
- on a 64bit Windows, it registers the add-in for 32bit and 64bit Office at the same time. Note that it doesn't even check what Office bitness is used on the machine. In fact, it doesn't even check if Office is present.

I strongly suggest that you read the background info we provide in section Deployment: Things to Consider; see the PDF file in the folder {Add-in Express}\Docs on your development PC. A step by step is given in section Deploying a per-user Office extension via an MSI installer. There's also a section for per-machine add-ins and other deployment technologies; check the manual.

Dinesh Porwal writes:
using Add-In version 8.7.4430.0


If you need your add-in to support the recent builds of Office 2016/2019/365 on recent builds of Windows 10, you need to switch to using Add-in Express 9.4 and make sure that all the adx* files mentioned (and not mentioned) that your add-in uses are of that Add-in Express version.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 16 Oct, 2019 08:26:59 Top
Dinesh Porwal




Posts: 3
Joined: 2017-12-26
So I have downloaded new Addin version 9.4 and also adx* files for the same version. I have a question that I want to create an installer for 64 bit, do I need to compile my project for target platform = x64? Currently, I am compiling the target platform = "Any CPU". As my all users have OS 64 bit and Office 64 bit so for better performance, I want to create an installer for 64 bit only. Do I also need to make changes in the existing wix installer which I was using for 32 bit? A couple of places I am seeing x86 like in <Package tag seeing Platform="x86". Also in Setup project file seeing Platform = "x86".
Posted 23 Oct, 2019 11:21:50 Top
Andrei Smolin


Add-in Express team


Posts: 16672
Joined: 2006-05-11
Hello Dinesh,

We've never tried doing this because we regard this as unwise.

I wouldn't recommend doing this. The current installer works while the new installer requires debugging efforts. The gains don't exist. Moreover, you introduce an unnecessary restriction - what would you do if tomorrow some users will start using Office 32bit because of a third-party add-in which isn't available in 64bit?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 24 Oct, 2019 04:22:38 Top