A wrong way of checking the Visual Studio version where an add-in is loaded
December 10, 2012Take a look at this code of an add-in that checks that it is loaded only in Visual Studio 2012 and try to figure out what’s wrong: private DTE2 _applicationObject; private AddIn _addInInstance; public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom) { const string REGISTRY_KEY_VS_11_0 = “SOFTWARE\\MICROSOFT\\VISUALSTUDIO\\11.0”; string addInRegistryRoot = null; _applicationObject […]