Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > Getting the path of the solution
 

Getting the path of the solution

Hello everyone,

I'm trying to programatically retrieve the physical path on which my solution is located.

I do this in the following manner:

DTE vs = this.GetService<DTE>(true);

string solutionPath = (string)vs.Solution.Properties.Item("Path").Value;

This doesn't seem to work, because the return value I get in solutionPath = "C:\", while the actual path is a couple of folders deeper than the C:\ disk.

Does anyone know what I'm doing wrong?

Thanks in advance,

Nocto

Nocto  Thursday, December 20, 2007 1:19 PM

Hi Nocto,

Try using vs.Solution.FullName which contains the solution full path.

hth.

jose.

Jose Escrich  Friday, December 21, 2007 7:54 PM

Hi Nocto,

Try using vs.Solution.FullName which contains the solution full path.

hth.

jose.

Jose Escrich  Friday, December 21, 2007 7:54 PM

You can use google to search for other answers

Custom Search

More Threads

• GAT July 2007 Cannot Find ENVDTE
• Smart Client Software Factory (Recipe Framework Error) during Enable and Disable Packages
• Simple class template reference
• Use AddEntity recipe form HoL on existing porjects
• Issue passing input parameters to actions
• MetaGuidancePackage error when creating a new Guidance Package or Solution
• GuidanceAutomationExtensions.msi install error
• GAT Documentation/Walkthroughs
• Change the solution path
• This forum is moving â€?week of 5/27