473,385 Members | 2,014 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Determine projects in solution within VS2005 macro

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,

--

(O)enone
Jul 12 '06 #1
2 1325
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

--
Jared Parsons [MSFT]
ja******@online.microsoft.com
All opinions are my own. All content is provided "AS IS" with no warranties,
and confers no rights.
Jul 12 '06 #2
Jared Parsons [MSFT] wrote:
Try this code out
Perfect -- thanks very much.

--

(O)enone
Jul 12 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Geoff Jones | last post by:
Hi I'm starting to look at C# after programming in C++ and was wondering if anybody could help me with the following questions: (1) What is the difference between a Project and Solution In...
2
by: jw56578 | last post by:
Hi, Is there a way to discover all the classes within a given namespace? thanks
2
by: D | last post by:
I have normalized data in sql server in a table like (testset, testnumber, result) . There can be 5-10 tests in a testset and anywhere from 1500 rows to 100000 rows of testsets. I need to start...
0
by: TrtnJohn | last post by:
I have a Windows Application that has been ported from VB6 to VB.NET using VS 2003. The code conversion was painful but almost complete. But, now I am having trouble because the original...
7
by: **Developer** | last post by:
Public Shared Sub junk... Dim PF2 As Wnd.PARAFORMAT2 PF2.cbSize = Marshal.SizeOf(PF2) 'ERROR HERE PF2.dwMask = Wnd.PFM_LINESPACING ....snip
0
by: wan | last post by:
Hi, Any idea of why a proper running Application in VS 2003 , could not run after converted to VS 2005 with the error "Could not load file or assembly , . Strong name validation failed".... The...
5
by: =?Utf-8?B?QmVu?= | last post by:
Hi all, Can you share with a few examples in which to create multi-project solutions. I am not sure why that would be necessary. Why would I opt to use this feature in VS2005? I know ...
2
by: jk2l | last post by:
Solution | +-- Project 1 | +-- Project 2 (downloaded from somewhere) | +-- Project 3 (my project) Project 1 generate exe Project 2 and 3 generate dll
1
by: jacob l | last post by:
I am trying to return a list of indices for elements within another list that pass some sort of rule (as fast as possible). Currently I am doing: Elementspassed= for x in Elements passed: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.