Im migrating an Addin to vs 2008. The addin is only active if the current project is a C++ project. The current code tries to detect this with the following Dim proj As VCProject = Nothing Dim projects As System.Array Try projects = CType(Connect.oVB.DTE.ActiveSolutionProjects(), System.Array) If projects.Length > 0 Then Dim prj As Project = CType(projects.GetValue(0), EnvDTE.Project) proj = CType(prj, VCProject) End If Catch ex As Exception Return Nothing End Try The following exception is then thrown when trying to cast a valid Project object to a VCProject. I can assure you the current project is C++. Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.VisualStudio.VCProjectEngine.VCProject'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{238B5174-2429-11D7-8BF6-00B0D03DAA06}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)). Any suggestions would be greatly appreciated?