Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/287.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何在cmd行预提交钩子应用程序中向客户端写入错误?_C#_Svn_Command Line_Pre Commit Hook - Fatal编程技术网

C# 如何在cmd行预提交钩子应用程序中向客户端写入错误?

C# 如何在cmd行预提交钩子应用程序中向客户端写入错误?,c#,svn,command-line,pre-commit-hook,C#,Svn,Command Line,Pre Commit Hook,我正在C#中编写一个预提交钩子,我知道我必须返回1表示失败,返回0表示成功,但我无法让它向客户端写入任何消息。目前我正在使用 static int Main(string[] args) { var repository = args[0]; var transaction = args[1]; // TODO: do stuff and return 1 or 0 appropriately Console.WriteLine("This m

我正在C#中编写一个预提交钩子,我知道我必须返回1表示失败,返回0表示成功,但我无法让它向客户端写入任何消息。目前我正在使用

static int Main(string[] args)
{
    var repository = args[0];
    var transaction = args[1];       

    // TODO: do stuff and return 1 or 0 appropriately 

    Console.WriteLine("This message should go to the client");

    return 1;
}
乌龟只是给出了反馈:

错误:提交失败(详细信息如下): 错误:提交被预提交阻止 挂钩(退出代码1),无输出


如何使我的命令行应用程序向svn客户端提供反馈(本例中为乌龟)?

Console.WriteLine更改为
Console.Error.WriteLine