Programmatically setting multiple startup projects on a Visual Studio solution

  A month or so ago I was waist deep in Visual Studio automation code trying to figure out how to create a solution programmatically with multiple startup projects.  I searched and searched on the Internet, but could never find the answer.  I knew that the code I was writing was very, very close, but it wasn’t working.  At the time I had to step away and work on other things that were more important, but today I was in and around that code and tried again.  I found the answer on good old Google in less than 10 minutes – http://www.dotnetmonster.com/Uwe/Forum.aspx/vs-ext/1609/Editing-DTE2-Solution-SolutionBuild-StartupProjects .  It is as simple as setting the StartupProjects property of the SolutionBuild object to an array of objects populated with the unique name of projects in the solution.  I had been trying to set it to a string array of the same thing!  Talk about close.  Either way job accomplished.  Our VS automation is now just a little more polished as a result.

Note: I use this blog to post both Personal and Technical articles.  For a technical only feed use the following URL (http://bryanandnoel.spaces.live.com/category/technology/feed.rss).  For a family only feed use the following URL (http://bryanandnoel.spaces.live.com/category/family/feed.rss)

Technorati Tags: ,
Advertisements
This entry was posted in Technology. Bookmark the permalink.

One Response to Programmatically setting multiple startup projects on a Visual Studio solution

  1. anon says:

    The link is dead, but I found the article on archive.org.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s