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