Can't get C# COM add-in tutorial to work. Fails 'Step 15. Running the COM Add-in'

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

Can't get C# COM add-in tutorial to work. Fails 'Step 15. Running the COM Add-in'
 
Subscribe
Tim Robbins




Posts: 14
Joined: 2019-05-30
Here is the output from a brand new COM add-in, for the first register attempt, to show that there is no 'Unable to delete file' error. I still got the 'PowerLeech' error however:

1>------ Rebuild All started: Project: MyAddin2, Configuration: Debug Any CPU ------
1> MyAddin2 -> c:\users\tim\documents\visual studio 2015\Projects\MyAddin2\MyAddin2\bin\Debug\MyAddin2.dll
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
Posted 31 May, 2019 08:12:44 Top
Tim Robbins




Posts: 14
Joined: 2019-05-30
Still trying to understand your last post. So, If i choose to Build or Rebuild my solution, it does succeed, and I see the .DLLs in my debug folder. It's when I choose 'Register' that I get the error. When i check the registry, i can see that my add-in did not get registered
Posted 31 May, 2019 08:20:22 Top
Andrei Smolin


Add-in Express team


Posts: 16312
Joined: 2006-05-11
Please ZIP and send me your test project's folder to the support email address.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 31 May, 2019 08:22:45 Top
Andrei Smolin


Add-in Express team


Posts: 16312
Joined: 2006-05-11
Tim,

Thank you. Everything is clear in the project. Close Visual Studio, make sure no devenv.exe processes are run, start it again. Try to restart the machine.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 31 May, 2019 10:04:41 Top
Tim Robbins




Posts: 14
Joined: 2019-05-30
So, I was able to get around the issue. I re-installed your product again, but this time i only selected VS 2019 as my target, instead of only VS 2015 or both. And then this time, the ADX project type showed up in VS and when I registered the add-in, the issue does not happen and it says it registered successfully
Posted 31 May, 2019 10:05:16 Top
Andrei Smolin


Add-in Express team


Posts: 16312
Joined: 2006-05-11
Great!

I've sent you an email asking to send me the list of programs registered with your VS 2015. Please send me that list to the support email address.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 31 May, 2019 10:08:36 Top
Andrei Smolin


Add-in Express team


Posts: 16312
Joined: 2006-05-11
Hello Tim,

Thank you for VS2015 info. Unfortunately, it doesn't contain any suspicious things. Moreover, in my VS 2015 I have most of the software products registered with your VS2015.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 03 Jun, 2019 05:48:47 Top
Tim Robbins




Posts: 14
Joined: 2019-05-30
Hi,

Thanks for taking a look. I thought I was past that error, but now I'm ready to create a Setup project for my add-in, and I'm using Visual Studio 2019. When I choose the Add-in Express > Create Setup Project option, it pops up an error that says 'Could not load file or assembly 'PowerLeach...'. the rest of the error matches the one in the beginning of my post. Then, the setup dialog does show after i close that error, but all options are disabled.

Anyways, let's assume we can't resolve that error. I'm wonder what my options are for deployment. Previously, we had a InstallShield build setup with our VSTO add-in that we ran from the command-line. Could I still use that option?

I've also been reading up on ClickOnce and ClickTwice, and I'm not sure if those are options for me. We previously had a multi-step dialog that showed a license agreement, so it seems like I should go with ClickTwice.

What are your thoughts on this?
Posted 03 Jun, 2019 13:11:00 Top
Andrei Smolin


Add-in Express team


Posts: 16312
Joined: 2006-05-11
Hello Tim,

From https://support.symantec.com/en_US/article.TECH253762.html and https://social.msdn.microsoft.com/Forums/en-US/d3242236-645b-40eb-87c4-9173fc5a8286/error-running-installmodule-sharepointpnppowershellonline?forum=appsforsharepoint, I deduce that the issue relates to PowerShell. The first page suggests: Disable/Uninstall powershell protection in cyberreason on the Internet Gateway Server. The second page suggests installing the latest PowerShell build.

I suppose that if you can't solve the issue, you'll be unable to deploy your add-in.

ClickTwice is a custom technology that allows installing and updating your add-in by publishing MSI files, utility files and metadata. The multi-step dialog should be part of the MSI file. You can prepare the .MSI using any installation software product.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 04 Jun, 2019 05:04:55 Top
Tim Robbins




Posts: 14
Joined: 2019-05-30
Hi,

We are going to first attempt to use our existing InstallShield, command-line based install process, so that would be comparable to your 'Windows Installer' option on this (https://www.add-in-express.com/docs/net-deploy-office-addin.php) page. I will you let you know when/if we run into problems.

But, for this particular post, I have a separate issue I'd like to bring up. I have been unable to add an image to a ribbon toolbar button. I've seen posts from you that recommend to use the 'Glyph' setting on a button. However, when I do that, it just doesn't do anything. I open the Glyph dialg and choose an existing project resource. when I confirm that choice, the Glyph is still set as 'None'. this same image can be set via the ImageList route, but as you describe elsewhere, I lose my alpha transparency. Can you describe how I might set the Glyph property via code? I need to have the image be centered and large, above the text, so if your answer could describe the format for formatting the image properties, that would be very helpful.

Thanks,
Tim
Posted 04 Jun, 2019 07:02:21 Top