1
我想使用团队构建2010发布网站,但我没有看到任何简单的选项。所以我试着创建一个自定义活动,用我的参数调用代理中的进程(“aspnet_compiler.exe”)并发布我的网站。关于团队构建和构建网站,自定义代码活动问题
我可以删除文件夹,创建文件夹,编译和构建项目...
但这个过程只是不上时,我把它叫做代理开始... ...这是什么问题?
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());
}
有没有其他的方式来建立/发布网站?我的代码有什么问题?
我有使用aspnet_compiler上的invokeprocess相同的问题。除了aspnet_compiler之外,我可以得到任何可以使用invokeprocess的东西。真奇怪。 – Flores 2013-02-06 12:03:59