首页 > 技术文章 > VisualStudio.DTE 对象可以通过检索 GetService() 方法

xlong 2016-12-26 15:28 原文

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

 

推荐阅读