Visual studio addin - finding current solution folder path

前端 未结 3 987
终归单人心
终归单人心 2021-01-12 02:24

I have an add-in loaded, and a solution loaded, how would I find the folder path of that solution programmatically in C# in my addin?

3条回答
  •  伪装坚强ぢ
    2021-01-12 02:55

    Alas I figured it out after a lot of goooogling!!

    In connect.cs:

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

提交回复
热议问题