Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: dd25fb6ebd
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (24 sloc) 0.559 kb
using System;
using System.Diagnostics;
public class MSBuildKiller
{
public void Kill()
{
try
{
var id = Process.GetCurrentProcess().Id;
foreach (var process in Process.GetProcessesByName("MSBuild"))
{
if (process.GetParentProcess().Id == id)
{
process.Kill();
}
}
}
// ReSharper disable EmptyGeneralCatchClause
catch (Exception)
{
}
// ReSharper restore EmptyGeneralCatchClause
}
}
Jump to Line
Something went wrong with that request. Please try again.