class MSBuild def self.get_vs_version(sln_filename) sln_text=File.read(sln_filename,:encoding=>'UTF-8') return :vs9 if sln_text.include?('Format Version 10.00') return :vs12 end def self.get_configurations(sln_filename) configs=Array.new sln_text=File.read(sln_filename,:encoding=>'UTF-8') sln_text.scan( /= ([\w]+)\|/ ).each{|m| c=m.first.to_s configs << c if !configs.include?(c) } return configs end def self.get_platforms(sln_filename) platforms=Array.new sln_text=File.read(sln_filename,:encoding=>"UTF-8") sln_text.scan( /= [\w]+\|([\w ]+)/ ).each{|m| p=m.first.to_s platforms << p if !platforms.include?(p) } return platforms end end