Loading ...
Sorry, an error occurred while loading the content.
 

How do I get the active project's directory?

Expand Messages
  • imran@merc-int.com
    Hopefully this will be a very easy question: I am able to get the path to the current/active document s full path using: applicationObject.ActiveDocument.Path
    Message 1 of 2 , Dec 1, 2001
      Hopefully this will be a very easy question:

      I am able to get the path to the current/active document's full path
      using:
      applicationObject.ActiveDocument.Path

      But how do I get the active project's path?

      Thanks.
    • Elton Wells
      There may be a better way, but I ve done it by getting a Project reference through the DTE s ActiveSolutionProjects property, then using
      Message 2 of 2 , Dec 1, 2001
        There may be a better way, but I've done it by getting a Project
        reference through the DTE's ActiveSolutionProjects property, then using
        System.IO.Path.GetDirectoryName() on the Project object's FullName
        property. Also, if it's a Visual C++ project, the VCProject object has
        a ProjectDirectory property.

        - Elton

        -----Original Message-----
        From: imran@... [mailto:imran@...]
        Sent: Saturday, December 01, 2001 5:09 PM
        To: vsnetaddin@yahoogroups.com
        Subject: [vsnetaddin] How do I get the active project's directory?


        Hopefully this will be a very easy question:

        I am able to get the path to the current/active document's full path
        using:
        applicationObject.ActiveDocument.Path

        But how do I get the active project's path?

        Thanks.


        Yahoo! Groups Sponsor
        ADVERTISEMENT




        Replies go to the entire list. Visit
        http://groups.yahoo.com/group/vsnetaddin to unsubscribe, search message
        archives, or change delivery options.



        Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.