Sha256: 7ec0e6cd296aec236cc364e54ddc422fe4ae9b4d4cbcedc548abfd1bf37840f8

Contents?: true

Size: 757 Bytes

Versions: 2

Compression:

Stored size: 757 Bytes

Contents

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dev_commands-0.0.19 lib/msbuild.rb
dev_commands-0.0.18 lib/msbuild.rb