VisualStudio.DTE 对象可以通过检索 GetService() 方法

DTE dte = (DTE)GetService(typeof(DTE));
string solutionDir = System.IO.Path.GetDirectoryName(dte.Solution.FullName);

 

posted @ 2016-12-26 15:28  云上青天  阅读(339)  评论(0编辑  收藏  举报