-
-
Notifications
You must be signed in to change notification settings - Fork 731
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
GH702 GH473: Added logger switch to MSBuild runner #1198
Conversation
Hi @cpx, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution! TTYL, DNFBOT; |
@cpx, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR. |
@cpx Looks good to me! 👍 Great job! I left some (minor) comments for you. |
@patriksvensson Done! |
|
||
// Then | ||
Assert.Equal(2, settings.Loggers.Count); | ||
Assert.Equal("LoggerAssembly1", settings.Loggers[0].Assembly); |
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.
ICollection doesn't support indexing, LINQ could be one option istead
I.e.
var first = settings.Loggers.First();
var second = settings.Loggers.Skip(1).First();
and use those variables for the asserts.
Oops, was a bit quick to push there :) Now it should work. |
@cpx excellent, could you squash into 1 commit and rebase against latest develop, and ping it's when done. |
740dafc
to
0542edc
Compare
@devlead Done. |
Hmm, any idea why the OSX build failed? Is it due to changes in this PR or something else? |
@cpx Merged 👍 Thanks for this contribution! 😄 |
Relates to #702 and #473.
The gist of it is fairly simple. I've added an extension method for adding a logger switch to the MSBuildSettings class, similar to how property switches are added, like so:
Calling that method should append an argument to MSBuild, like so:
/logger:loggerClass,loggerAssembly;loggerParameters
In addition to this, I added a MSBuildLogger class to hold the above assembly, class and parameters values, and to the MSBuildSettings class I added a collection property to hold instances of those.