I use Mono 2.6.4 compiled from source on CentOS to compile a VS2008 project in C#. Some csproj compile, but this one doesn't, here is the output of 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. I changed that code to use regex some time back. Could you try this with a mono daily build [1]? Or just file a bug with the project file and i'll check it.
- http://mono.ximian.com/daily/
It's probably a bug in xbuild. File a bug with a test case to get it fixed:
http://www.mono-project.com/Bugs
精彩评论