In Visual Studio 2008, what determines the order in which projects appear within a solution folder? It\'s not alphabetical order, nor is it build order.
I cannot find an
Hacky alternative: Copy out the section with these lines into a text file.
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "etc..."
EndProject
Use this F# script to sort it alphabetically (changing file path as required):
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've only got a few projects, just sort it by hand)