Albacore / albacore

Albacore is a professional quality suite of Rake tasks for building .NET or Mono based systems.
www.albacorebuild.net
221 stars 64 forks source link

Registry entries might not be ordered. #185

Closed wallymathieu closed 9 years ago

wallymathieu commented 9 years ago

If the registry entries are in another order than expected when iterating over the entries, the wrong version of msbuild is used. Instead of assuming that the entries are ordered, we can use ruby "max".

wallymathieu commented 9 years ago

This pull request is related to #171 The problem could be that I've installed vs2013 after vs2015 ?

haf commented 9 years ago

So there's something I can't see without Windows in this PR; how is it that max on hash produces an array where key 1 is the max always? Does max return an array with key-value and 1 picks out the value?

Also, what happens when VS is not installed?

wallymathieu commented 9 years ago

Yes, the max thing is not to clear. Basically what I do is the following

{14=>"PATH14", 12=>"PATH12", 11=>"PATH11"}.max 

returns [14, "PATH14"] When tools version is missing, the current logic is that it returns "msbuild_not_found"

wallymathieu commented 9 years ago

What I've done is that I've moved the logic to get registry entries and interpret them into a separate file instead of mixed with trying to find the Max one.

haf commented 9 years ago

@devployment @aaronasmith I think this is pretty much ready to merge, do you agree?

haf commented 9 years ago

@wallymathieu Thanks for your contribution!