Runtime error occurred during loading com add in.

Apr 22, 2015 at 8:59 AM
Can you please advise.
I have installed dax studio 2.1.1 and installed all perquisites.
When I try to enable excel com dax add in I get following error: Runtime error occurred during loading com add in.

I am running on 64bit windows 7 Ultimate and office 2013 32 bit professional plus

Apr 23, 2015 at 9:43 AM
I have not heard of this happening before. Do you have any other Excel addins installed? I'm wondering if there is some sort of conflict
Jun 11, 2015 at 2:31 PM
I am getting the same thing. All dependencies checked and good. I have tried to install older versions and still get the same error: "Not loaded. A runtime error occurred during the loading of the COM Add-in"
Jun 11, 2015 at 9:00 PM
As above - do you have any other add-ins (other than PowerPivot) installed? If so have you tried temporarily disabling them to see if that helps?

The other thing you could try is temporarily enabling the VSTO alerts using these instructions - that should give us a more detailed error message to work with.
Jun 12, 2015 at 3:20 PM
Edited Jun 12, 2015 at 3:22 PM
I disabled all Add Ins and then tried to activate Dax Studio Add In. No Luck.

I then Activated the Power Pivot Add In (successfully) and tried to activate the Dax Studio Add In. No Luck

Next, I put in the environmental variable you suggested above and tried to activate the Dax Studio Add In again, but no new error message window popped up.
Jun 12, 2015 at 9:01 PM
Hmmm, I tried it again later in the day and an error message did pop up:

"The common language runtime could not be loaded by file:///C:/Program Files/DAX Studio/DaxStudio.vsto|vstolocal. Contact your administrator for further assistance."
Jun 12, 2015 at 10:06 PM
I updated to .net 4.5.2 just to be sure. Still getting the error message when trying to activate the add-in ("The common language runtime could not be loaded by file:///C:/Program Files/DAX Studio/DaxStudio.vsto|vstolocal. Contact your administrator for further assistance."). Here is the output of the dependency script:

PSChildName - Version
v2.0.50727 - 2.0.50727.5420
v3.0 - 3.0.30729.5420
Windows Communication Foundation - 3.0.4506.5420
Windows Presentation Foundation - 3.0.6920.5011
v3.5 - 3.5.30729.5420
Client - 4.5.51209
Full - 4.5.51209
Client -

ADOMD: Microsoft.AnalysisServices.AdomdClient, Version=, Culture=neutral, Public
AMO: Microsoft.AnalysisServices, Version=, Culture=neutral, PublicKeyToken=89845
Jun 12, 2015 at 10:52 PM
Solved sort of. I installed Visual Studio Tools for Office Runtime vstor_redist.exe. Now the Add-In loads but doesnt seem to work (see pic)

Jun 12, 2015 at 11:47 PM
It's good that you got that sorted out. I tested the installer on a number of new virtual machines with only the operating system and Excel installed and the install script was able to identify and install any missing prerequisites correctly. I'm not sure what causes the issue you ran into, but a handful of other users have had similar problems.

So step 3 is not right. That is the generic tooltip that Excel displays if you hover over a ribbon button and because I don't have a specific help file for Dax Studio it must be displaying just the generic help for Add-ins. This means that either your click at step 2 did not register or there still an issue somewhere, but at least now that the addin is loading we should be able to figure out what is going on.

So the first thing I would try is click on the Dax Studio button at step 2 again and see if the UI launches.

If that still does not launch the UI then enabling the application logging settings as outlined here should give us more information about what's going on.
Jun 13, 2015 at 3:30 PM
Getting closer.......

Still same behavior as above but I am getting application logging from the Add-In. Below are the contents of the log file:

2015-06-13 11:27:20.063 -04:00 [Information] ============ Excel Add-in Startup =============
2015-06-13 11:28:29.955 -04:00 [Verbose] "ThisAddIn" "currentDomain_AssemblyResolve" "Microsoft.Owin.Hosting, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" {args_RequestingAssembly}
2015-06-13 11:28:29.970 -04:00 [Information] DaxStudio Host started on port 9000
2015-06-13 11:28:31.818 -04:00 [Information] DaxStudio Host started on port 9000
Jun 13, 2015 at 4:03 PM
Edited Jun 13, 2015 at 4:08 PM

Not sure how. I simply did an uninstall and reinstall at this point and now Dax Studio fires up and I can connect to my power pivot model and see the metadata. Looks like Visual Studio Tools for Office Runtime (vstor_redist.exe) is a prerequisite. Im an analyst not a developer so it is no surprise that I did not have this loaded. I use the lightweight SQL Server Business Intelligence Development studio to write SSRS rdls and SSAS build cubes only and do not have a full blown version of visual studio installed.

Having a hard time getting any Dax Expression to return values though, getting errors no matter what I do. I am taking a perfectly valid DAX statement from my model and pasting it into Dax Studio but getting various errors. What is wrong with this Dax Query? The error message I get is "Object Reference not set to an instance of an object". Not sure what that means. My power Pivot model is loaded in the object browser on the left side.
IF (
    'Dim Request'[Request Type] = "Project Request",
    IF (
        AND (
            'Dim Request'[Request Type] = "Proposal Request",
            'Dim Request'[Request Status] = "Closed (Approved)"
Jun 17, 2015 at 1:58 PM
same error. In windows application error log the following error is thrown:

Customization URI: file:///C:/Program Files/DAX Studio/
Exception: The deployment manifest could not be downloaded because a connection to the network could not be established. Ensure that you can connect to the network, and try again.

Note my pc has a connection to the web (im posting here after all from the same pc).
Jun 17, 2015 at 8:53 PM
@flacrwdog - so that's just a partial DAX expression you've pasted, that's not a DAX query.

To execuate something in DAX Studio it needs to be a full DAX Query - see

To evaluate just one expression you can use the ROW function

ROW ( "Test"
IF (
    'Dim Request'[Request Type] = "Project Request",
    IF (
        AND (
            'Dim Request'[Request Type] = "Proposal Request",
            'Dim Request'[Request Status] = "Closed (Approved)"
Jun 17, 2015 at 9:00 PM
@schmintan - if you're getting the same error did you try the same resolution that worked for flacrwdog?

Have you tried any of the Troubleshooting steps on the bottom of the Documentation page? - I'm thinking particularly of the dependency check script as I don't think we'll see anything in the application logs if Excel won't even load it.

Have you tried running the standalone version of DAX Studio outside of Excel? - If that runs that should mean that the dependencies were installed correctly and this issue is isolated to Excel.