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
Improving the log of CombineTargetFrameworkInfoProperties fails with not valid RootElementName #9002
Conversation
…not valid RootElementName
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.
While the MSBuild engine handles exceptions thrown from tasks and provides a generic error message, it's almost always better to log an explicit error from the task instead of throwing an exception. It's easier to understand, you can provide more information about the specific failure, and it can get a unique error code.
Can you please rewrite to use that approach?
Done |
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.
Looks good to me!
src/Tasks.UnitTests/CombineTargetFrameworkInfoProperties_Tests.cs
Outdated
Show resolved
Hide resolved
…not valid RootElementName (dotnet#9002) Fixes dotnet#8320 Context CombineTargetFrameworkInfoProperties) is not handling null case of RootElementName. And empty RootElementName when UseAttributeForTargetFrameworkInfoPropertyNames is false. Changes Made Add the verification with the name of the parameter. Testing RootElementNameNotValid() Notes
Fixes #8320
Context
CombineTargetFrameworkInfoProperties) is not handling null case of RootElementName. And empty RootElementName when UseAttributeForTargetFrameworkInfoPropertyNames is false.
Changes Made
Add the verification with the name of the parameter.
Testing
RootElementNameNotValid()
Notes