Alternative to hacks: copy the section with these lines into a text file.
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "etc..." EndProject
Use this F # script to sort alphabetically (changing the file path as needed):
open System.IO let readlines p = File.ReadAllLines(p) let writelines p lines = File.WriteAllLines(p, lines) let startpos = @"Project(""{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"") = """.Length let getProj (s:string) = s.Substring(startpos, s.IndexOf('"', startpos) - startpos) let path = @"C:\Temp\sln.txt" path |> readlines |> Array.filter (fun s -> s.StartsWith("Project")) |> Array.map (fun s -> (getProj(s), s)) |> Array.sortBy fst |> Array.map snd |> Array.collect (fun s -> [|s;"EndProject"|]) |> writelines path
(If you have only a few projects, just collect them manually)
Benjol Nov 08 '10 at 11:15 2010-11-08 11:15
source share