Class: MSBuild
- Inherits:
-
Hash
- Object
- Hash
- MSBuild
- Defined in:
- lib/msbuild.rb
Overview
Visual Studio 2008 version 9.0, solution format version 10.00 Visual Studio 2010 version 10.0, solution format version 11.00 Visual Studio 2012 version 11.0, solution format version 12.00 Visual Studio 2013 version 12.0, solution format version 12.00
Class Method Summary collapse
- .get_configurations(sln_filename) ⇒ Object
- .get_platforms(sln_filename) ⇒ Object
- .get_vs_version(sln_filename) ⇒ Object
Instance Method Summary collapse
-
#initialize ⇒ MSBuild
constructor
A new instance of MSBuild.
Constructor Details
#initialize ⇒ MSBuild
Returns a new instance of MSBuild.
11 12 13 14 |
# File 'lib/msbuild.rb', line 11 def initialize self[:vs9]="C:\\Windows\\Microsoft.NET\\Framework\\v3.5\\msbuild.exe" self[:vs12]="C:\\Program Files (x86)\\MSBuild\\12.0\\bin\\msbuild.exe" end |
Class Method Details
.get_configurations(sln_filename) ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/msbuild.rb', line 24 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 |
.get_platforms(sln_filename) ⇒ Object
34 35 36 37 38 39 40 41 42 |
# File 'lib/msbuild.rb', line 34 def self.get_platforms(sln_filename) platforms=Array.new sln_text=File.read(sln_filename,:encoding=>"UTF-8").gsub!( /\P{ASCII}/ , '') sln_text.scan( /= [\w]+\|([\w ]+)/ ).each{|m| p=m.first.to_s platforms << p if !platforms.include?(p) } return platforms end |
.get_vs_version(sln_filename) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/msbuild.rb', line 16 def self.get_vs_version(sln_filename) sln_text=File.read(sln_filename,:encoding=>'UTF-8') sln_text.scan(/Format Version 10.00/).each{|m| return :vs9 } return :vs12 end |