COMError in GetActiveConfigurationName


The use of cascaded method calls in the Microsoft.VisualStudio.Project.Utilities.GetActiveConfigurationName method causes an unspecified COM error to be thrown when creating a new project type that inherits from ProjectNode.

The line causing the error is:

EnvDTE.Configuration activeConfig = automationObject.ConfigurationManager.ActiveConfiguration;

The following change avoids the error:

EnvDTE.ConfigurationManager configManager = automationObject.ConfigurationManager;
EnvDTE.Configuration activeConfig = configManager.ActiveConfiguration;


deltics wrote Sep 18, 2014 at 9:59 PM

This change does not resolve the problem for me.

I suspect that I am missing something in my project implementation but haven't yet determined what it is that I have done (or haven't done) in the area of "ActiveConfiguration" support.