Skip to content

Instantly share code, notes, and snippets.

@neildanson
Last active August 29, 2015 14:26
Show Gist options
  • Save neildanson/076d59651bfb96e00fb8 to your computer and use it in GitHub Desktop.
Save neildanson/076d59651bfb96e00fb8 to your computer and use it in GitHub Desktop.
F# Script for periodically killing the pesky XDesProc.exe that often hangs Visual Studio for no good reason
open System
open System.Diagnostics
printfn "XDesProc killer"
printfn "Press Return to Close"
printfn "======================"
let rec killer() = async {
let xdesproc = Process.GetProcessesByName "xdesproc"
xdesproc |> Array.iter(fun proc -> printfn "Got One!"
proc.Kill ())
do! Async.Sleep 10000
return! killer()
}
killer() |> Async.StartImmediate
Console.ReadLine() |> ignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment