我试图获取Visual Studio 2015 Community Edition的Type,但结果(类型)始终为null.
System.Type type = Type.GetTypeFromProgID("VisualStudio.DTE.15.0", false);
EnvDTE.DTE dte = (EnvDTE.DTE) System.Activator.CreateInstance(type);
Run Code Online (Sandbox Code Playgroud)
虽然产品名称是Visual Studio 2015,但版本号是14.0.所以尝试:
"VisualStudio.DTE.14.0"
Run Code Online (Sandbox Code Playgroud)
(我没有机会查看社区版,但至少它适用于我的VS 2015专业版.)