简体   繁体   English

VS2008中的csproj无法使用mono xbuild进行编译

[英]csproj from VS2008 fail to compile with mono xbuild

I use Mono 2.6.4 compiled from source on CentOS to compile a VS2008 project in C#. 我使用从CentOS上的源代码编译的Mono 2.6.4来编译C#中的VS2008项目。 Some csproj compile, but this one doesn't, here is the output of xbuild /t:detailed : 一些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

Anyone has an idea ? 有人有主意吗? Thanks ? 谢谢 ?

This might already be fixed in svn. 这可能已经在svn中修复。 I changed that code to use regex some time back. 我将代码更改为使用正则表达式。 Could you try this with a mono daily build [1]? 您能以单声道每日构建[1]尝试一下吗? Or just file a bug with the project file and i'll check it. 或者只是向项目文件提交错误,我会对其进行检查。

  1. http://mono.ximian.com/daily/ http://mono.ximian.com/daily/

It's probably a bug in xbuild. 这可能是xbuild中的错误。 File a bug with a test case to get it fixed: 提交带有测试用例的错误以将其修复:

http://www.mono-project.com/Bugs http://www.mono-project.com/错误

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM