I'm trying to Publish a Web Site using Team Build 2010, but I didn't see any easy options out there. So I tried to create a custom activity which calls a process in the agent ("aspnet_compiler.exe") with my parameters and publish my site.
I can delete folders, create folders, compile and build projects...
But this process just doesn't start on the agent when I call it... what is the problem?
protected override void Execute(CodeActivityContext context)
{
// Obtain the runtime value of the Text input argument
// string text = context.GetValue(this.Text);
Process proc = new Process();
proc.EnableRaisingEvents = true;
proc.StartInfo.WorkingDirectory = @"C:\Windows\Microsoft.NET\Framework\v2.0.50727";
proc.StartInfo.FileName = "aspnet_compiler.exe";
proc.StartInfo.Arguments = "-p "+context.GetValue(this.SourcesDirectory) +
" -v / " + PublishDirectory;
proc.Start();
proc.WaitForExit();
while (!proc.HasExited)
{
}
context.SetValue(Result,proc.StandardOutput.ReadToEnd());
}
Is there any other way to build/publish web sites? What's wrong with my code ?