C# VS2008中的csproj无法使用mono xbuild编译

C# VS2008中的csproj无法使用mono xbuild编译,c#,mono,csproj,xbuild,C#,Mono,Csproj,Xbuild,我使用CentOS上源代码编译的Mono 2.6.4在C#中编译VS2008项目。 一些csproj编译,但这一个没有,下面是xbuild/t的输出:detailed: /opt/mono-2.6.4/lib/mono/2.0/Microsoft.CSharp.targets: error : Error executing task Csc: Input string was not in the correct format Error executing t

我使用CentOS上源代码编译的Mono 2.6.4在C#中编译VS2008项目。 一些csproj编译,但这一个没有,下面是xbuild/t的输出:detailed:

/opt/mono-2.6.4/lib/mono/2.0/Microsoft.CSharp.targets: error : Error executing task Csc: Input string was not in the correct format
                Error executing task Csc: System.FormatException: Input string was not in the correct format
  at System.Int32.Parse (System.String s) [0x00000] in <filename unknown>:0
  at Microsoft.Build.Utilities.ToolTask.ParseOrigin (System.String origin, System.String& filename, System.Int32& lineNumber, System.Int32& columnNumber, System.Int32& endLineNumber, System.Int32& endColumnNumber) [0x00000] in <filename unknown>:0
  at Microsoft.Build.Utilities.ToolTask.LogEventsFromTextOutput (System.String singleLine, MessageImportance importance) [0x00000] in <filename unknown>:0
  at Microsoft.Build.Utilities.ToolTask.ProcessOutputFile (System.String filename, MessageImportance importance) [0x00000] in <filename unknown>:0
  at Microsoft.Build.Utilities.ToolTask.ExecuteTool (System.String pathToTool, System.String responseFileCommands, System.String commandLineCommands) [0x00000] in <filename unknown>:0
  at Microsoft.Build.Utilities.ToolTask.Execute () [0x00000] in <filename unknown>:0
  at Microsoft.Build.BuildEngine.TaskEngine.Execute () [0x00000] in <filename unknown>:0
  at Microsoft.Build.BuildEngine.BuildTask.Execute () [0x00000] in <filename unknown>:0
        Task "Csc" execution -- FAILED
        Done building target "CoreCompile" in project "/mnt/virtualbox/Project/(API)/Base/Base.csproj".-- FAILED

OnError for target CoreBuild skipped due to false condition:  '$(RunPostBuildEvent)' == 'Always' or '$(RunPostBuildEvent)' == 'OnOutputUpdated'
        Target _GetCompileOutputsForClean:
        Done building target "_GetCompileOutputsForClean" in project "/mnt/virtualbox/Project/(API)/Base/Base.csproj".

        Target _RecordCleanFile:
        Done building target "_RecordCleanFile" in project "/mnt/virtualbox/Project/(API)/Base/Base.csproj".

Done building project "/mnt/virtualbox/Project/(API)/Base/Base.csproj".-- FAILED
/opt/mono-2.6.4/lib/mono/2.0/Microsoft.CSharp.targets:错误:执行任务时出错Csc:输入字符串的格式不正确
执行任务时出错Csc:System.FormatException:输入字符串的格式不正确
在0中的System.Int32.Parse(System.String s)[0x00000]处
在Microsoft.Build.Utilities.ToolTask.ParseOrigin(System.String原点、System.String和文件名、System.Int32和lineNumber、System.Int32和columnNumber、System.Int32和endLineNumber、System.Int32和endColumnNumber)[0x00000]中:0
在Microsoft.Build.Utilities.ToolTask.LogEventsFromTextOutput(System.String单线,Message重要性)[0x00000]中:0
在Microsoft.Build.Utilities.ToolTask.ProcessOutputFile(System.String文件名,message重要性)[0x00000]中:0
在Microsoft.Build.Utilities.ToolTask.ExecuteTool(System.String路径工具、System.String响应命令、System.String命令行命令)[0x00000]中,输入:0
在Microsoft.Build.Utilities.ToolTask.Execute()[0x00000]中:0
在Microsoft.Build.BuildEngine.TaskEngine.Execute()[0x00000]中:0
在Microsoft.Build.BuildEngine.BuildTask.Execute()[0x00000]中:0
任务“Csc”执行--失败
已完成在项目“/mnt/virtualbox/project/(API)/Base/Base.csproj”中构建目标“CoreCompile”。--失败
由于错误条件,已跳过目标CoreBuild的OnError:“$(RunPostBuildEvent)”==“始终”或“$(RunPostBuildEvent)”==“OnOutputUpdated”
目标\u GetCompileOutputsForClean:
已完成在项目/mnt/virtualbox/project/(API)/Base/Base.csproj中构建目标“\u GetCompileOutputsForClean”。
目标_RecordCleanFile:
已完成在项目“/mnt/virtualbox/project/(API)/Base/Base.csproj”中构建目标“\u RecordCleanFile”。
已完成生成项目“/mnt/virtualbox/project/(API)/Base/Base.csproj”。--失败

有人有主意吗?谢谢

这可能是xbuild中的一个bug。用测试用例归档bug以修复它:


这可能已在svn中修复。不久前我把代码改成了使用正则表达式。你能试试单声道的每日构建[1]吗?或者只是在项目文件中添加一个bug,我会检查它


  • 这看起来像是相同的问题:,已在svn中修复。