Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / August 2005

Tip: Looking for answers? Try searching our database.

Detecting Batch Build settings through Environment Macro in MacrosIDE

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
peterdavidcampbell@hotmail.com - 19 Aug 2005 15:57 GMT
Hello,

I am currently trying to write a macro which will be able to detect
which projects and configurations are being built within a solution in
order to produce an estimation of the time left.

At present, the only method I am aware of is to us the
DTE.Solution.Count to detect the number of projects within the
solution, and then use
DTE.Solution.Item(...).ConfigurationManager.Count to detect the number
of configurations for each project. (See below)

By using this method I am able to retrieve the total number of builds
required for the complete solution.  However, it would be preferable to
detect the number of projects and configurations which have been
selected to be built.

Is there a way to detect the number of build/rebuild/clean events which
are going to be performed by looking at which projects and
configurations have been selected?  Also, is it possible to
differentiate between a build event and a batch build event?

Thanks in advance for any help I receive! J

sol = DTE.Solution
For i = 1 To sol.Count
 'Look for a valid project
 If sol.Item(i).FullName <> "" Then
    counter = counter + sol.Item(i).ConfigurationManager.Count()

(counter is the number of builds which are going to be performed)
Paul Skelton - 19 Aug 2005 21:12 GMT
Try
DTE.ActiveSolutionProjects

> Hello,
>
[quoted text clipped - 27 lines]
>
> (counter is the number of builds which are going to be performed)
peterdavidcampbell@hotmail.com - 24 Aug 2005 10:18 GMT
DTE.ActiveSoltuionProjects returns the number of projects currently
selected in the solution explorer, but what I would like to detect is
how many projects and configurations are selected from within the batch
build dialog box.

For example, if I have a solution with 4 projects (A, B, C and D), each
with five configurations, I would like to be able to detect what is
selected to be built/rebuilt/cleaned.  Eg, 2 configurations from
project A, all 5 config from project B and 3 from project C.

Thanks in advance for any advice.
Pete

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.