How to pass /restore to MSBuild 15.5+?
logiclrd opened this issue · 11 comments
The Wiki has documentation of an other_switches
parameter, but this doesn't appear anywhere in the source code. Is there a proper way to pass MSBuild's new /restore
command-line switch into a build?
You're reading v1 docs, https://github.com/Albacore/albacore/wiki/build is the current.
Okay, so... this doesn't directly answer the question, but it's implying that the correct/best/only? way to pass /restore
to MSBuild is to call msb.add_parameter '/restore'
? In my use case, I'm not using a configuration callback in the DSL, I'm passing a hash directly into the Rake task:
Rake::Task['msbuild'].execute(:project_variables => build_toolkit_profile)
How would I get the same results as add_parameter
with this? I tried setting a parameters
array in the hash, it had no effect.
Would a PR that makes it so that the MSBuild task recognizes a specific :restore
entry in the hash be welcomed?
Hmm, I don't see :msbuild
in the Albacore code, maybe that's an intermediate thing in an internal Gem here. Investigating...
No, the msbuild task went away in v2
it's just called build now.
We must have made our own then because this codebase is targeting Albacore 2.8.0.
ok, so let's clarify:
- task type:
build
- task (name, yours!):
msbuild
Okay, yes, that makes sense. I found the definition of it, and I see a way to make calls into the configuration object, so I think we're all good. :-)
https://github.com/Albacore/albacore/blob/master/spec/build_spec.rb#L6-L29 are the specs for it; you can either call it like the test does or you can use the DSL
it's designed to be extensible and not lock you in, by layering abstractions on top of a data model
Thanks :-) I updated the v1 Wiki page to call out the fact that it applies to v1 only, with a link to the "build" task documentation you gave.