Skip to content
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

Use a task in _CheckForInvalidConfigurationAndPlatform #3105

Closed
wants to merge 3 commits into from

Conversation

jeffkl
Copy link
Contributor

@jeffkl jeffkl commented Mar 19, 2018

This gives us the ability to localize messages that are logged in this target.

Related to #3059

This gives us the ability to localize messages that are logged in this target.
/// <summary>
/// Verifies some critical properties like OutputPath are set. This runs as part of the _CheckForInvalidConfigurationAndPlatform target.
/// </summary>
public class CheckConfigurationAndPlatform : TaskExtension
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than make a specialized task, why not make general localized Error and Warning tasks (maybe subclass the existing ones if that fits) that take in a resource name?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started with that but couldn’t figure out a good way to specify the assembly and resource. You would need one Error task per assembly that contained resources right? And if you specify an assembly in XML, it would need to be a path. And then the way you call it with format args would be interesting. Any ideas?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just always have it be a resource in the Tasks resources, and just pass in a name? It'd only work for us, but it'd be a step in the right direction, I think.

Passing in things for the format string is definitely interesting. Maybe pass in an item and have metadata like Field1 Field2? That's not exactly elegant :(

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AndyGerlicher
Copy link
Contributor

@jeffkl do you want to update this for what Daniel suggested or close the issue? I'd rather not take this as-is but rather introduce a generic task (generic for us to use).

@jeffkl
Copy link
Contributor Author

jeffkl commented Mar 30, 2018

@AndyGerlicher I barely had time to code this up as it was. The only thing missing is unifying our HasTrailingSlash logic.

@jeffkl
Copy link
Contributor Author

jeffkl commented Apr 5, 2018

I'd rather just fix HasTrailingSlash, if we want a whole new task that accepts a resource name and arguments that'll be a different PR.

@jeffkl jeffkl closed this Apr 5, 2018
@jeffkl jeffkl deleted the CheckConfigurationAndPlatform branch October 9, 2019 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants