Test launching uses Win32 configuration even if x64 is the current platform


I have a project with Win32 and x64 configurations. Test launching (all varieties) was failing with a message about unable to find the specified path
It turned out I had changed the output path for the x64 build, but not the Win32 build as this project won't ever be used 32-bit. The AddIn appears to be always picking up the Win32 configuration regardless of the actively selected platform.
Poking around with the code the culprit seems to be Connect.cs:345
                l_vcConfig = l_vcProj.Configurations.Item(applicationObject.ActiveDocument.ProjectItem.ContainingProject.ConfigurationManager.ActiveConfiguration.ConfigurationName);
This line was finding the Win32 configuration rather than the x64 one. I will add a patch that fixes the problem. I don't know the available APIs for AddIns at all so there may be a better solution that iterating through all the configurations as I have done.

file attachments


mellowpellow wrote Sep 17, 2012 at 2:46 AM

TortoiseSVN isn't letting me create patch files - apparently it can't deal with UCS-2 files, so I've attached my Connect.cs from the GoogleTestAddIn folder (i.e. VS2010) that I changed against revision 16511.

wrote Sep 17, 2012 at 2:46 AM

wrote Feb 14, 2013 at 1:40 AM

wrote Mar 24, 2013 at 8:53 PM

wrote Jun 17, 2014 at 7:50 PM