Sha256: aea1f1461f57b517408e7e73d3d0d828657e5d02a9c3d8594d3ef329487f2389

Contents?: true

Size: 806 Bytes

Versions: 10

Compression:

Stored size: 806 Bytes

Contents

module Rake
  module Funnel
    module Support
      module MSBuild
        class BuildTool
          class << self
            def find
              return 'xbuild' unless Rake::Win32.windows?

              require 'win32/registry'

              %w(12.0 4.0 3.5 2.0).collect { |version|
                key = "SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\#{version}"

                begin
                  ::Win32::Registry::HKEY_LOCAL_MACHINE.open(key) do |reg|
                    candidate = File.join(reg['MSBuildToolsPath'] || '', 'msbuild.exe')
                    next candidate if File.exist?(candidate)
                  end
                rescue
                  next
                end
              }.compact.first
            end
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rake-funnel-0.11.0.pre lib/rake/funnel/support/msbuild/build_tool.rb
rake-funnel-0.10.0.pre lib/rake/funnel/support/msbuild/build_tool.rb
rake-funnel-0.9.1.pre lib/rake/funnel/support/msbuild/build_tool.rb
rake-funnel-0.9.0.pre lib/rake/funnel/support/msbuild/build_tool.rb
rake-funnel-0.8.0.pre lib/rake/funnel/support/msbuild/build_tool.rb
rake-funnel-0.7.0.pre lib/rake/funnel/support/msbuild/build_tool.rb
rake-funnel-0.6.1.pre lib/rake/funnel/support/msbuild/build_tool.rb
rake-funnel-0.6.0.pre lib/rake/funnel/support/msbuild/build_tool.rb
rake-funnel-0.5.0.pre lib/rake/funnel/support/msbuild/build_tool.rb
rake-funnel-0.4.0.pre lib/rake/funnel/support/msbuild/build_tool.rb