New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH2953: Allow setting MSBuild target via MSBuildSettings using a string #3721
GH2953: Allow setting MSBuild target via MSBuildSettings using a string #3721
Conversation
Is there something else I need to do to move this forward? It's my first contribution and I don't want to miss anything. |
Thanks @sbwaggoner. You're all set. Next step is for us to review and merge or give you feedback when we have chance. |
|
||
private void SetTargets(string value) | ||
{ | ||
foreach (var target in value.Split(";").Where(p => !string.IsNullOrEmpty(p))) |
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.
I would expect something like this
foreach (var target in value.Split(";").Where(p => !string.IsNullOrEmpty(p))) | |
Targets.Clear(); | |
foreach (var target in value?.Split(';', _targetStringSplitOptions) ?? Array.Empty<string>()) |
so setting Target
to a new value isn't keeping the old values or what do you think @augustoproiete ?
Where is something like this on top of class
#if NETCOREAPP3_1
private static readonly StringSplitOptions _targetStringSplitOptions = StringSplitOptions.RemoveEmptyEntries;
#else
private static readonly StringSplitOptions _targetStringSplitOptions = StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries;
#endif
Hello @devlead, I have merged changes from |
Superceeded by #3954 |
PR to address this feature request:
#2953