C# svnlook始终返回错误且无输出
我正在运行这个从预提交批处理文件启动的小型C#测试程序C# svnlook始终返回错误且无输出,c#,svn,pre-commit-hook,C#,Svn,Pre Commit Hook,我正在运行这个从预提交批处理文件启动的小型C#测试程序 private static int Test(string[] args) { var processStartInfo = new ProcessStartInfo { FileName = "svnlook.exe", UseShellExecute = false, ErrorDialog = false, CreateNoWindo
private static int Test(string[] args)
{
var processStartInfo = new ProcessStartInfo
{
FileName = "svnlook.exe",
UseShellExecute = false,
ErrorDialog = false,
CreateNoWindow = true,
RedirectStandardOutput = true,
RedirectStandardError = true,
Arguments = "help"
};
using (var svnlook = Process.Start(processStartInfo))
{
string output = svnlook.StandardOutput.ReadToEnd();
svnlook.WaitForExit();
Console.Error.WriteLine("svnlook exited with error 0x{0}.", svnlook.ExitCode.ToString("X"));
Console.Error.WriteLine("Current output is: {0}", string.IsNullOrEmpty(output) ? "empty" : output);
return 1;
}
}
我故意调用svnlook help
并强制执行一个错误,以便在提交时看到发生了什么
当该程序运行时,SVN显示
svnlook已退出,错误为0xC0000135
当前输出为:空
我查找了错误0xC0000135,这意味着应用程序未能正确初始化
,尽管它不是特定于svnhook的
为什么
svnlook help
没有返回任何内容?通过另一个进程执行时会失败吗?我有一个类似的应用程序,名为svnlook,它工作正常,需要检查/尝试两件事