1
Vote

RAD Studio and Visual Studio 2015

description

I had to make a change to the Visual Studio Project Updater; I had did this home and forgot about it until I started using VS 2015 at work.

In the class:

RADStudioClient >> ClientUtil >> VisualStudioHelper

You must change the GetObjectType method to look for DTE 14.0:

This should work for 2015, 2013 and 2012; for 2010 add an entry for 10.0.
#region GetObjectType()
/// <summary>
/// This method returns the Object Type
/// </summary>
private static Type GetObjectType()
{
     // Initial value
    Type objectType = null;

    try
    {
          // First we are going to see if Visual Studio 2015 is installed
          objectType = Type.GetTypeFromProgID("VisualStudio.DTE.14.0");
     }
     catch (Exception error)
     {
         // for debugging only
         string err = error.ToString();

         try
         {
             // First we are going to see if Visual Studio 2013 is installed
             objectType = Type.GetTypeFromProgID("VisualStudio.DTE.12.0");
         }
         catch (Exception error2)
         {
             // for debugging only
             string err2 = error2.ToString();

             try
             {
                 // Now we are now going to try Visual Studio 2012
                 objectType = Type.GetTypeFromProgID("VisualStudio.DTE.11.0");
             }
             catch (Exception error3)
             {
                 // for debugging only
                 string err3 = error3.ToString();
             }
         }
    }

    // return value
    return objectType;
} 
#endregion

comments