-3

Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location

It is wrong code, because the result is the add-in directory/location.

I would like to open a file on the directory.

1 Answers1

0
 EnvDTE80.Solution2 solution2;
 string solutionFileFullName;
 string solutionFolderFullName; 
 Solution2 = (EnvDTE80.Solution2)_applicationObject.Solution;               
                        solutionFileFullName = solution2.FileName;                  
                        solutionFolderFullName = System.IO.Path.GetDirectoryName(solutionFileFullName);

Source:

http://www.mztools.com/articles/2013/MZ2013022.aspx