Merge pull request #2841 from lambdageek/dev/bug-40060
[mono.git] / mcs / tools / xbuild / SolutionParser.cs
index 47ae1d9c0448332bba287d202e754d40e6929974..44ac70d2f963f328fd8bb2ad840912446e262454 100644 (file)
@@ -121,7 +121,9 @@ namespace Mono.XBuild.CommandLine {
                        string slnVersion = GetSlnFileVersion (reader);
 
                        if (slnVersion == "12.00")
-#if XBUILD_12
+#if XBUILD_14
+                               p.DefaultToolsVersion = "14.0";
+#elif XBUILD_12
                                p.DefaultToolsVersion = "12.0";
 #else
                                p.DefaultToolsVersion = "4.0";
@@ -351,11 +353,9 @@ namespace Mono.XBuild.CommandLine {
 
                void EmitBeforeImports (Project p, string file)
                {
-#if NET_4_0
                        p.AddNewImport ("$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\SolutionFile\\ImportBefore\\*",
                                        "'$(ImportByWildcardBeforeSolution)' != 'false' and " +
                                        "Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\SolutionFile\\ImportBefore')");
-#endif
 
                        string before_filename = Path.Combine (Path.GetDirectoryName (file), "before." + Path.GetFileName (file) + ".targets");
                        p.AddNewImport (before_filename, String.Format ("Exists ('{0}')", before_filename));
@@ -363,11 +363,9 @@ namespace Mono.XBuild.CommandLine {
 
                void EmitAfterImports (Project p, string file)
                {
-#if NET_4_0
                        p.AddNewImport ("$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\SolutionFile\\ImportAfter\\*",
                                        "'$(ImportByWildcardAfterSolution)' != 'false' and " +
                                        "Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\SolutionFile\\ImportAfter')");
-#endif
 
                        string after_filename = Path.Combine (Path.GetDirectoryName (file), "after." + Path.GetFileName (file) + ".targets");
                        p.AddNewImport (after_filename, String.Format ("Exists ('{0}')", after_filename));
@@ -512,8 +510,8 @@ namespace Mono.XBuild.CommandLine {
                                if (solutionTarget.Configuration == targetInfo.Key.Configuration &&
                                                solutionTarget.Platform == targetInfo.Key.Platform) {
                                        solutionConfigurationContents.AppendFormat (
-                                                       "<ProjectConfiguration Project=\"{0}\">{1}|{2}</ProjectConfiguration>",
-                                       guid.ToString ("B").ToUpper (), targetInfo.Value.Configuration, targetInfo.Value.Platform);
+                                                       "<ProjectConfiguration Project=\"{0}\" AbsolutePath=\"{1}\">{2}|{3}</ProjectConfiguration>",
+                                                       guid.ToString ("B").ToUpper (), projectInfo.FileName, targetInfo.Value.Configuration, targetInfo.Value.Platform);
                                }
                        }
                }