0

I am developing a Visual Studio Addin using C#. I want to determine the location on file system of a solution or a project whichever is loaded in Visual Studio, using my Addin that is also loaded.

Please suggest as how i can do this? pointer to any resource will be helpful.

Thanks

Steve

Steve Johnson
  • 3,054
  • 7
  • 46
  • 71
  • 2
    You might try this... http://stackoverflow.com/questions/633985/visual-studio-addin-finding-current-solution-folder-path – krawl Nov 26 '12 at 21:47
  • Thanks. But i cant mark the comment as answer. Could you please post its as an answer so that i could mark it, please? Thanks – Steve Johnson Nov 27 '12 at 16:48

1 Answers1

1

Using the GetDirectoryName function in the System.IO.Path namespace should get you what you need.

public String SolutionPath()
{
    return Path.GetDirectoryName(_applicationObject.Solution.FullName);
}

This was also answered here... Visual studio addin - finding current solution folder path

Community
  • 1
  • 1
krawl
  • 399
  • 1
  • 7