Determine projects in solution within VS2005 macro

  • Thread starter Thread starter Oenone
  • Start date Start date
O

Oenone

I wish to create a macro (that runs within the BuildEvents_OnBuildDone
environment event IN VS2005) that loops through each of the projects in the
current solution and retrieves some details about each. At present I just
want to do something simple such as MsgBox each project's .vbproj
path/filename.

I've been unable so far to locate any reference material to help me figure
out how to do this.

Could anyone provide an example or a link to a good reference site that
would help me to achieve this?

Many thanks,
 
Hello Oenone,
I wish to create a macro (that runs within the BuildEvents_OnBuildDone
environment event IN VS2005) that loops through each of the projects
in the current solution and retrieves some details about each. At
present I just want to do something simple such as MsgBox each
project's .vbproj path/filename.

I've been unable so far to locate any reference material to help me
figure out how to do this.

Could anyone provide an example or a link to a good reference site
that would help me to achieve this?

Try this code out

Public Sub ShowFilePath(ByVal scope As EnvDTE.vsBuildScope, ByVal action
As EnvDTE.vsBuildAction) Handles BuildEvents.OnBuildDone
For Each project As EnvDTE.Project In DTE.Solution
Dim fileName As String = project.Properties.Item("FileName").Value
MessageBox.Show(fileName)
Next
End Sub
 
Back
Top