When I looked at the code I realized that HandleCSharpConfigProperties used an if/else/else block which checked to see if the $item was a script block but HandleCSharpMainProperties used a switch on the value and never checked if $item was a script block.
Thanks, Dave! I've been working on a big update to support VS 2017. I've merged this change into that local branch and I'll be pushing it this week. I really appreciate the fix. You rock!
I noticed that the inline documentation for this script implies that both
CustomGeneralProperties
andCustomConfigurationProperties
support script blocks but I discovered through trial and error that script blocks only worked withCustomConfigurationProperties
.When I looked at the code I realized that
HandleCSharpConfigProperties
used an if/else/else block which checked to see if the$item
was a script block butHandleCSharpMainProperties
used a switch on the value and never checked if$item
was a script block.This commit transposed the
pattern from
HandleCSharpConfigProperties
intoHandleCSharpMainProperties