-
Notifications
You must be signed in to change notification settings - Fork 224
Conversation
… scripts - provide `%project:Configuration%` and `%project:TargetFramework%` to scripts
- remove extra quotes around `cmd /c` arguments - prevented && and similar special cases - don't strip quotes surrounding command-line arguments - prevented command paths and arguments containing spaces - `CommandGrammar` may need additional generalizations - e.g. unquoted term can't contain more than one escape sequence - but it's probably good enough for now
- handle wrapping a .NET 4.5 project that builds a console application
/cc @troydai, @davidfowl |
The change introduces a few new build script blocks which will be executed asymmetrically. If there are two build configuration and two target framework. Other then this, the scope in which the variables are exposed should be controlled. For example, I think we should overall rethink the role of executing scripts in project script. What's the real use case of these two new introduced build script block. |
@@ -99,6 +101,9 @@ public bool Build() | |||
// Build all specified configurations | |||
foreach (var configuration in configurations) | |||
{ | |||
_configuration = configuration; | |||
ScriptExecutor.Execute(project, _buildOptions.Reports, "prebuild.perconfiguration", GetScriptVariable); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GetScriptVariable
should not be shared among all build script blocks. Variables of configurations and target frameworks shouldn't been exposed to postbuild
or prebuild
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not share GetScriptVariable()
? The additional variables aren't exposed in prebuild
or postbuild
because the corresponding fields are reset to null
at the correct points.
@davidfowl OK in general. I didn't realized these two bugs (both without an assigned milestone) had been triaged. Could you please let me know offline who's on the triage team? Separately, any objection to leaving the bugs assigned to me? I'll resurrect this PR or the commits it contains when the bugs get milestones. |
See individual commits for details