Merge pull request #1659 from alexanderkyte/stringbuilder-referencesource
[mono.git] / msvc / scripts / genproj.cs
index 60b4036396213371311c9beeed78e78876abd830..32d6d8574b31add493ef6ccdba2d132f41a86920 100644 (file)
@@ -539,6 +539,9 @@ class MsbuildGenerator {
                case "/codepage":
                        CodePage = value;
                        return true;
+
+               case "/-getresourcestrings":
+                       return true;
                }
 
                Console.WriteLine ("Failing with : {0}", arg);
@@ -688,8 +691,8 @@ class MsbuildGenerator {
                const string condition_unix    = "Condition=\" '$(OS)' != 'Windows_NT' \"";
                const string condition_windows = "Condition=\" '$(OS)' == 'Windows_NT' \"";
                prebuild =
-                       "    <PreBuildEvent " + condition_unix + ">\n" + prebuild_unix + "\n    </PreBuildEvent>\n" +
-                       "    <PreBuildEvent " + condition_windows + ">\n" + prebuild_windows + "\n    </PreBuildEvent>\n";
+                       "    <PreBuildEvent " + condition_unix + ">" + NewLine + prebuild_unix + NewLine + "    </PreBuildEvent>" + NewLine +
+                       "    <PreBuildEvent " + condition_windows + ">" + NewLine + prebuild_windows + NewLine + "    </PreBuildEvent>" + NewLine;
 
                var all_args = new Queue<string []> ();
                all_args.Enqueue (flags.Split ());
@@ -853,8 +856,8 @@ class MsbuildGenerator {
                string postbuild_windows = string.Empty;
 
                var postbuild =  
-                       "    <PostBuildEvent " + condition_unix + ">\n" + postbuild_unix + "\n    </PostBuildEvent>\n" +
-                       "    <PostBuildEvent " + condition_windows + ">\n" + postbuild_windows + "\n    </PostBuildEvent>";
+                       "    <PostBuildEvent " + condition_unix + ">" + NewLine + postbuild_unix + NewLine + "    </PostBuildEvent>" + NewLine +
+                       "    <PostBuildEvent " + condition_windows + ">" + NewLine + postbuild_windows + NewLine + "    </PostBuildEvent>";
                        
 
                bool basic_or_build = (library.Contains ("-basic") || library.Contains ("-build"));
@@ -866,13 +869,13 @@ class MsbuildGenerator {
                string strongNameSection = "";
                if (StrongNameKeyFile != null){
                        strongNameSection = String.Format (
-                               "  <PropertyGroup>\n" +
-                               "    <SignAssembly>true</SignAssembly>\n" +
+                               "  <PropertyGroup>" + NewLine +
+                               "    <SignAssembly>true</SignAssembly>" + NewLine +
                                "{1}" +
-                               "  </PropertyGroup>\n" + 
-                               "  <PropertyGroup>\n" + 
-                               "    <AssemblyOriginatorKeyFile>{0}</AssemblyOriginatorKeyFile>\n" +
-                               "  </PropertyGroup>", StrongNameKeyFile, StrongNameDelaySign ? "    <DelaySign>true</DelaySign>\n" : "");
+                               "  </PropertyGroup>" + NewLine +
+                               "  <PropertyGroup>" + NewLine +
+                               "    <AssemblyOriginatorKeyFile>{0}</AssemblyOriginatorKeyFile>" + NewLine +
+                               "  </PropertyGroup>", StrongNameKeyFile, StrongNameDelaySign ? "    <DelaySign>true</DelaySign>" + NewLine : "");
                }
                Csproj.output = template.
                        Replace ("@SIGNATURE@", strongNameSection).
@@ -1030,9 +1033,6 @@ public class Driver {
                var makefileDeps =  (args.Length > 0 && args [0] == "deps");
 
                var sln_gen = new SlnGenerator (slnVersion);
-               var two_sln_gen = new SlnGenerator (slnVersion);
-               var four_sln_gen = new SlnGenerator (slnVersion);
-               var three_five_sln_gen = new SlnGenerator (slnVersion);
                var four_five_sln_gen = new SlnGenerator (slnVersion);
                var projects = new Dictionary<string,MsbuildGenerator> ();
 
@@ -1061,10 +1061,7 @@ public class Driver {
                Func<MsbuildGenerator.VsCsproj, bool> additionalFilter;
                additionalFilter = fullSolutions ? (Func<MsbuildGenerator.VsCsproj, bool>)null : IsCommonLibrary;
 
-               FillSolution (two_sln_gen, MsbuildGenerator.profile_2_0, projects.Values, additionalFilter);
                FillSolution (four_five_sln_gen, MsbuildGenerator.profile_4_5, projects.Values, additionalFilter);
-               FillSolution (four_sln_gen, MsbuildGenerator.profile_4_0, projects.Values, additionalFilter);
-               FillSolution (three_five_sln_gen, MsbuildGenerator.profile_3_5, projects.Values, additionalFilter);
 
                var sb = new StringBuilder ();
                sb.AppendLine ("WARNING: Skipped some project references, apparent duplicates in order.xml:");
@@ -1073,9 +1070,6 @@ public class Driver {
                }
                Console.WriteLine (sb.ToString ());
 
-               WriteSolution (two_sln_gen, MakeSolutionName (MsbuildGenerator.profile_2_0));
-               WriteSolution (three_five_sln_gen, MakeSolutionName (MsbuildGenerator.profile_3_5));
-               WriteSolution (four_sln_gen, MakeSolutionName (MsbuildGenerator.profile_4_0));
                WriteSolution (four_five_sln_gen, MakeSolutionName (MsbuildGenerator.profile_4_5));
 
                if (makefileDeps){