stevencl's WebLog

VS automation samples

I've been asked for suggestions for a list of VS automation samples that would help solve tricky tasks that I've observed users working on during usability studies. Just wanted to check if anybody has such a list of samples that they would like us to provide.

One example from a recent study that I can think of would be a sample to show how to automate migrating or copying a bunch of project settings from one project to a collection of other projects.

Any other suggestions?

Published Wednesday, July 14, 2004 11:08 AM by stevencl
Filed under: ,

Comments

 

Jeff Lewis said:

CVS integration similar to http://ankhsvn.com/ would be a wonderful sample.
July 14, 2004 11:59 AM
 

Paul said:

Copying VS options from one machine to another (ie, environmental options, debugger options, source control options, edit options, etc). This way when a new machine is built we don't have to spend the next couple days ensuring we've got the options right, which we invariably miss.
July 14, 2004 1:27 PM
 

Frank Hileman said:

We have a little program that runs as a pre-build event to update the build version number in a couple source files -- the build number is based on the date. I wanted to be able to update the version number in a setup project as well, but could not see how to automate that, since it causes a dialog box to pop up. Is such a thing possible?
July 14, 2004 3:55 PM
 

preEnvy said:

Frank Hileman,

Is there a way that little program could be shared? I am actually in the process to develop our own program that can do this but only to update the AssemblyFileVersionAttribute.
July 15, 2004 11:43 AM
 

Steven Clarke said:

Frank - I sent your question to Craig Skibo (http://blogs.msdn.com/CraigSkibo). Here's his reply:

You could write code to select the setup project within the solution explorer. When the setup project is selected you can goto the property grid and get/set the version #. You select the item in the solution explorer by getting the UIHierarchy object with code such as this:

dim uihier as UIHierarchy = DTE.Windows.Item(Constants.vsWindowKindSolutionExplorer).Object
uihier.GetItem("Setup1\Setup1").Select(vsUISelectionTypeSelect) 'Setup1\Setup1 is SolutionName\ProjectName

Then you call off to DTE.SelectedItems.SelectionContainer.Item(1), which returns to you the IDispatch/System.Object of the item in the properties window.
July 15, 2004 1:20 PM
 

David Starr said:

Alphabetize the using statements! PLEASE!
July 25, 2004 10:12 PM
New Comments to this post are disabled

© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker