2
我想以当前解决方案的参考的参考,使用与C#DTE对象在Visual Studio 2015年获取在Visual C#DTE对象2015年
using System;
using EnvDTE;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Shell.Interop;
namespace TemplatesExample
{
class Program
{
static void Main(string[] args)
{
IVsSolution solution = Package.GetGlobalService(typeof(DTE)) as IVsSolution;
Console.WriteLine(solution.ToString());
Console.ReadKey();
}
}
}
但是,当我用这个,我解决方案对象始终为NULL。
那么,如何使用.NET Framework 4.6中的C#在VS2015中获得当前的解决方案对象?
我跟了解决方案http://stackoverflow.com/questions/4724381/get-the-reference-of-the-dte2-object-in-visual-c-sharp-2010,但仍然问题没有解决。 – user2790976