Build automatically all projects in path

8. May 2009

For a long time i was searching a tool that it would build all my projects when i get latest version from sourcesafe/svn without opening solutions one-by-one so i create one to fit my needs. It's very simple get-things-done program, the whole class goes like that

        private void addProjectsToList()
{
desProjectsFound.Items.Clear();
foreach (string strFileTypes in desProjectTypes.Items)
{
foreach (string item in Directory.GetFiles(
desPathToProjects.Text,
string.Format("*.{0}", strFileTypes),
SearchOption.AllDirectories))
{
desProjectsFound.Items.Add(item, false);
}
}
desProjectsFound.Sorted = true;
}

public static string GetVSExeLocation()
{
return string.Format("{0}\\devenv.exe",
ConfigurationManager.AppSettings["DevEnvLocation"]);
}

private void btnBuild_Click(object sender, EventArgs e)
{
ExecuteAction(" /Build");
}

private void btnRebuild_Click(object sender, EventArgs e)
{
ExecuteAction(" /Rebuild");
}

private void ExecuteAction(string action)
{
for (int i = 0; i < desProjectsFound.Items.Count; i++)
{
if (desProjectsFound.GetItemChecked(i))
{
Process.Start(GetVSExeLocation(),
desProjectsFound.Items[i] + action);
}
}

}


As you will see in download i use Krypton Toolkit

Below is the compiled version of the program, don't forget to modify the VS path in the config file to match the destination of your visual studio installation

 

ProjectBuilder.zip (697,82 kb)

Hope this helps someone besides me!

Bookmark and Share DotnetKicks dotnetshoutout

Programming, C#, Visual Studio

Comments

5/9/2009 1:15:48 PM #
Build automatically all projects in path

You've been kicked (a good thing) - Trackback from DotNetKicks.com
5/9/2009 1:16:07 PM #
Build automatically all projects in path

Thank you for submitting this cool story - Trackback from DotNetShoutout
12/10/2009 4:19:15 PM #
Interesting post
12/17/2009 10:33:21 AM #
I like what I see. keep it going
1/20/2010 2:13:11 AM #
To do something, however small, to make others happier and better, is the highest ambition, the most elevating hope, which can inspire a human being.
1/26/2010 5:08:52 AM #
The human race has one really effective weapon, and that is laughter.
1/29/2010 3:38:22 PM #
thanks.  very helpful post!! like the template btw ;)
2/2/2010 6:01:46 AM #
What is once well done is done forever.
2/15/2010 4:43:10 AM #
To do something, however small, to make others happier and better, is the highest ambition, the most elevating hope, which can inspire a human being.
2/18/2010 2:10:39 AM #
The winners in life think constantly in terms of I can, I will, and I am.
2/20/2010 8:42:08 AM #
Didn't know that this discussion would get so heated. At least I put my hat in the ring.