Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. ATL / WTL / STL
  4. How to get the active project in visual studio

How to get the active project in visual studio

Scheduled Pinned Locked Moved ATL / WTL / STL
c++csharpquestionvisual-studiotutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JabraJabra
    wrote on last edited by
    #1

    hi, im coding an Add-In (Visual C++) that do some changes to the document files in Visual Studio (.NET). in the code i need to get the Active Project that in the solution explorer (the one that will run when the project is execute). how can i do that? in MFC i think , in the class IApplication, there's ->get_ActiveProject, but in the classes of EnvDTE there's not (i didn't find). does anyone know about something like that? or is there another way to know which is the active/startup project? thanks in advance, Avi.

    S 1 Reply Last reply
    0
    • J JabraJabra

      hi, im coding an Add-In (Visual C++) that do some changes to the document files in Visual Studio (.NET). in the code i need to get the Active Project that in the solution explorer (the one that will run when the project is execute). how can i do that? in MFC i think , in the class IApplication, there's ->get_ActiveProject, but in the classes of EnvDTE there's not (i didn't find). does anyone know about something like that? or is there another way to know which is the active/startup project? thanks in advance, Avi.

      S Offline
      S Offline
      Stuart Dootson
      wrote on last edited by
      #2

      Looking at a (good) sample add-in that comes with source code(Fast Solution Build by Joshua Jensen[^]), it looks like: The DTE has a property called Solution, which has a property called SolutionBuild, which has a property called StartupProjects. This is the list of startup projects for the solution. HTH! Stuart Dootson 'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'

      J 1 Reply Last reply
      0
      • S Stuart Dootson

        Looking at a (good) sample add-in that comes with source code(Fast Solution Build by Joshua Jensen[^]), it looks like: The DTE has a property called Solution, which has a property called SolutionBuild, which has a property called StartupProjects. This is the list of startup projects for the solution. HTH! Stuart Dootson 'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'

        J Offline
        J Offline
        JabraJabra
        wrote on last edited by
        #3

        thanks mate!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups