Skip to content

Instantly share code, notes, and snippets.

@dck-jp
Created May 19, 2016 05:17
Show Gist options
  • Save dck-jp/dcf13bb2658f97a010f59f4a207363bb to your computer and use it in GitHub Desktop.
Save dck-jp/dcf13bb2658f97a010f59f4a207363bb to your computer and use it in GitHub Desktop.
Get SolutionDirectory @ C# Interactive in VS2015
#r "EnvDTE"
var solutionFilePath = ((EnvDTE.DTE)System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE.14.0")).Solution.FullName;
var solutionDirectory = System.IO.Path.GetDirectoryName(solutionFilePath);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment