[Mono-dev] xbuild not passing /platform: commandline

technomage1972 dellis1972 at googlemail.com
Tue Nov 9 11:57:41 EST 2010


I have recently discovered that the xbuild sytems was not passing the
platform setting from project files on to the compiler. 

I tracked the issue down to the Csc.cs.

The following is a patch to correct the issue.

Dean



diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs
b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs
index 18f3096..5941f58 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs
@@ -88,7 +88,12 @@ namespace Microsoft.Build.Tasks {
 				commandLine.AppendSwitch ("/nostdlib");
 
 			//platform
-			//
+			//					
+			if (Bag ["Platform"] != null)
+			{
+				commandLine.AppendSwitch(String.Format("/platform:{0}", Platform));
+			}
+			
 			if (References != null)
 				foreach (ITaskItem item in References)
 					commandLine.AppendSwitchIfNotNull ("/reference:", item.ItemSpec);

-- 
View this message in context: http://mono.1490590.n4.nabble.com/xbuild-not-passing-platform-commandline-tp3034648p3034648.html
Sent from the Mono - Dev mailing list archive at Nabble.com.


More information about the Mono-devel-list mailing list