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
I have just begun my COM Outlook add-in project using VS 2015 Pro and the latest version of Add-in express. I am following the tutorial at https://www.add-in-express.com/docs/net-first-com-addin.php. For step 3, I added a single ADXRibbonTab and then I skipped to Step 15 to build the project so i could see if the ribbon would show in Outlook. When i choose 'Add-in Express > Register', I get an error pop up in the UI that says 'Add-in Express Visual Studio Package encountered an exception. You can get more information by examining the add-in-express-package-log.txt log file. The log entry from that file is:

<LogEntry Date="2019-05-30 14:02:27" Severity="Exception" Source="AddinExpress.Projects.Common.Registrator.dteBuildEvents_OnBuildProjConfigDone" ProcessId="10712">
<Exception Type="System.TypeLoadException" Source="System.AppDomain.CreateAppDomainManager">
<Message>The domain manager specified by the host could not be instantiated.</Message>
<Exception Type="System.IO.FileNotFoundException" Source="mscorlib">
<Message>Could not load file or assembly 'PowerLeech, Version=1.0.0.0, Culture=neutral, PublicKeyToken=012b62721be4aeeb' or one of its dependencies. The system cannot find the file specified.</Message>
<StackTrace> at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean&amp; canBeCached, RuntimeMethodHandleInternal&amp; ctor, Boolean&amp; bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark&amp; stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark&amp; stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark&amp; stackMark)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(String assemblyString, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark&amp; stackMark)
at System.Activator.CreateInstance(String assemblyName, String typeName)
at System.AppDomain.CreateInstance(String assemblyName, String typeName)
at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName)
at System.AppDomain.CreateAppDomainManager()</StackTrace>
</Exception>
</Exception>
</LogEntry>

I have searched the forums and I can't find any other instance of users experiencing this issue.

Update: I also tried running the sample C# outlook add-in from https://www.add-in-express.com/free-addins/net-outlook-addin.php and that also failed to Register with the same error
Posted 30 May, 2019 13:00:10 Top
Andrei Smolin


Add-in Express team


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

I assume you haven't written any code, correct? You've just put a Ribbon tab onto the module's surface, right? If so, try to reinstall Add-in Express. Make sure you start Visual Studio using the Run as Administrator option.

Also, check if your antivirus logs contain something of value while you install Add-in Express.

Responding to your email: you can use any way to contact us. Most things can be discussed on the forum. But, if delicate or weighty info is involved, using email is the best way.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 31 May, 2019 02:29:56 Top
Tim Robbins




Posts: 14
Joined: 2019-05-30
Right, I haven't written any code, just dragged a button onto the designer view.

I re-installed it, but that didn't help. Also, I tried this on VS Pro 2019 as well, as I have 2015 and 2019 installed. In 2019, I can't even find the 'ADX' project types. Do you support VS Pro 2019? If so, how do I find that add-on?

I don't have any anti-virus programs running either.
Posted 31 May, 2019 07:01:32 Top
Andrei Smolin


Add-in Express team


Posts: 16334
Joined: 2006-05-11
The Add-in Express installer lets you register Add-in Express with specified Visual Studio versions. VS 2019 is supported starting with Add-in Express 8.3; you download it at https://www.add-in-express.com/downloads/adxnet.php.

Re VS 2015. Choose Help | About in the main menu of the IDE. In the About dialog, you see the version string. In my case, this is Microsoft Visual Studio Professional 2015 Version 14.0.25431.01 Update 3. What .NET Framework version is listed in that dialog window?

Also, try to run .net Framework Repair Tool.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 31 May, 2019 07:12:16 Top
Tim Robbins




Posts: 14
Joined: 2019-05-30
I Have Version 14.0.25431.01 Update 3. and .NET 4.7.03056
Posted 31 May, 2019 07:23:40 Top
Tim Robbins




Posts: 14
Joined: 2019-05-30
I ran the .NET fix tool, and it didn't help either. Another piece of info about my failures is that when I run Add-in Express > Register, I also get this output in the console:

1>------ Rebuild All started: Project: MyAddin1, Configuration: Debug Any CPU ------
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4604,5): warning MSB3061: Unable to delete file "C:\Users\Tim\documents\visual studio 2015\Projects\MyAddin1\MyAddin1\bin\Debug\MyAddin1.dll". Access to the path 'C:\Users\Tim\documents\visual studio 2015\Projects\MyAddin1\MyAddin1\bin\Debug\MyAddin1.dll' is denied.
1> MyAddin1 -> C:\Users\Tim\documents\visual studio 2015\Projects\MyAddin1\MyAddin1\bin\Debug\MyAddin1.dll
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

Now, I doubt this is relavant to the issue, b/c the very first time I ran 'Register', I didn't get this warning, but I still got the error I am trying to get help with.
Posted 31 May, 2019 07:28:46 Top
Tim Robbins




Posts: 14
Joined: 2019-05-30
So, as a next step, I tried to install an older version of your software, but it won't let me activate it. I downloaded version v809-b4453. When i go to activate it, it wants an activation code, which I don't have nor do I know what that even means. There is a 'Go' button in the installer to get the activation code. When i click it, it says 'The license key you have entered is either incorrect or does not match the product page you are installing'.

is there a different key for different versions of this add-on? At this point, I'm assuming your latest version has a bug, as it's newly released, so I'm hoping that going to an earlier version will resolve my issue
Posted 31 May, 2019 07:38:22 Top
Tim Robbins




Posts: 14
Joined: 2019-05-30
Out of curiosity, can you tell me more about the log entry I posted? Is 'PowerLeech' something out of your code? Can I search my computer for this file?
Posted 31 May, 2019 07:41:18 Top
Andrei Smolin


Add-in Express team


Posts: 16334
Joined: 2006-05-11
No, it isn't. I assume this is your file and assembly. Can it be that the add-in project itself doen't rebuild?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 31 May, 2019 07:53:13 Top
Tim Robbins




Posts: 14
Joined: 2019-05-30
I am confused by your last post. I haven't added any code, so none of these are my files or assembilies. I have even tried with the Sample Outlook COM add-in and simply opened the project then attempted to register it, and I get the same error.

Also, I don't understand what you mean by 'Can it be that the add-in project itself doen't rebuild?'. When I choose register, that does a rebuild right? is there some other thing that is also being rebuilt?
Posted 31 May, 2019 08:08:40 Top