Skip to content

Instantly share code, notes, and snippets.

@JayBazuzi
Created November 17, 2013 21:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JayBazuzi/7518446 to your computer and use it in GitHub Desktop.
Save JayBazuzi/7518446 to your computer and use it in GitHub Desktop.
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