* SolutionParser.cs: Identify and emit warning for a
authorAnkit Jain <radical@corewars.org>
Wed, 7 Apr 2010 10:58:14 +0000 (10:58 -0000)
committerAnkit Jain <radical@corewars.org>
Wed, 7 Apr 2010 10:58:14 +0000 (10:58 -0000)
common problem on some installations of windows.

svn path=/trunk/mcs/; revision=154928

mcs/tools/xbuild/ChangeLog
mcs/tools/xbuild/SolutionParser.cs

index de4a0b6b9a2110b4e9759edd5b92d225b87b3f3b..c1cd7021b965a6a33c9292114dcdd1ee6f66bb45 100644 (file)
@@ -1,3 +1,8 @@
+2010-04-06  Ankit Jain  <jankit@novell.com>
+
+       * SolutionParser.cs: Identify and emit warning for a
+       common problem on some installations of windows.
+
 2010-04-06  Ankit Jain  <jankit@novell.com>
 
        * Makefile: Add xbuild_targets.make .
index c4b9482100c18e75aac6f665f499b9cc7764a315..c2cece8e9afc9c2e1c48f80df261e53b9bfc5f72 100644 (file)
@@ -680,7 +680,17 @@ namespace Mono.XBuild.CommandLine {
                void AddValidateSolutionConfiguration (Project p)
                {
                        Target t = p.Targets.AddNewTarget ("ValidateSolutionConfiguration");
-                       BuildTask task = t.AddNewTask ("Error");
+                       BuildTask task = t.AddNewTask ("Warning");
+                       task.SetParameterValue ("Text", "On windows, an environment variable 'Platform' is set to MCD sometimes, and this overrides the Platform property" +
+                                               " for xbuild, which could be an invalid Platform for this solution file. And so you are getting the following error." +
+                                               " You could override it by either setting the environment variable to nothing, as\n" +
+                                               "   set Platform=\n" +
+                                               "Or explicity specify its value on the command line, as\n" +
+                                               "   xbuild Foo.sln /p:Platform=Release");
+                       task.Condition = "('$(CurrentSolutionConfigurationContents)' == '') and ('$(SkipInvalidConfigurations)' != 'true')" +
+                                       " and '$(Platform)' == 'MCD' and '$(OS)' == 'Windows_NT'";
+
+                       task = t.AddNewTask ("Error");
                        task.SetParameterValue ("Text", "Invalid solution configuration and platform: \"$(Configuration)|$(Platform)\".");
                        task.Condition = "('$(CurrentSolutionConfigurationContents)' == '') and ('$(SkipInvalidConfigurations)' != 'true')";
                        task = t.AddNewTask ("Warning");