Create a gist now

Instantly share code, notes, and snippets.

Initial test for running MSBuild w/ custom task
[TestMethod]
public void TestMethod1()
{
var process = new Process
{
StartInfo =
{
FileName = @"C:\Program Files (x86)\MSBuild\12.0\bin\MSBuild.exe",
Arguments = @"..\..\my.proj /v:m /nologo",
UseShellExecute = false,
RedirectStandardOutput = true,
}
};
process.Start();
var result = process.StandardOutput.ReadToEnd();
process.WaitForExit();
const string expected = "";
Assert.AreEqual(expected, result);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment