How to find the Current SolutionPath in VS 2012?
-
25-06-2021 - |
سؤال
i´m working on an addin for VS 2012..
The problem is, i need to find out the current SolutionPath to put a file in the current solution..
How can i do this?
Thx!
المحلول
A few options:
Using
EnvDTE.Solution
, get theFullName
of the SolutionUsing
IVsSolution
, callGetProperty
to get theVSPROPID_SolutionFileName
(orVSPROPID_SolutionDirectory
if you want the directory)Get the MSBuild project for the Solution and get the
$(SolutionDir)
property.
لا تنتمي إلى StackOverflow