Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
net5.0-platform support for Pack #3479
net5.0-platform support for Pack #3479
Changes from 1 commit
6e1356b
a509f5d
5ab918a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
nit: Add a justification.
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.
Same feedback as above, just confirm that platform and version are still the correct concept names.
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.
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.
This was intentional, in order to keep it consistent with the existing API. Are you sure I should change it? I thought we had this discussion before. I'm happy to make this change, though, if you want.
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 remember a discussion where someone was using
nameof
for strings that are compared to command line arguments customers pass in. I argued that it shouldn't usenameof
because renaming the variable in code should not break functional behaviour. I lost that argument.But for validating method parameters, I'd expect it to match the parameter name. If I use
NuGet.Frameworks
in my app, and I get an argument null exception saying that parameterx
should not be null, but none of the method parameters are namedx
, then it's confusing.You're right that the exception message will change between package versions if we change the parameter name, so it's a tradeoff of making the error message be consistent with previous versions, or be consistent with the current code. In either case we'll break anyone using named parameters, so it's ideal to avoid renaming parameters if at all possible.
overall, it's more of a nitpick, so I don't care very much. The mandatory/optional TPV is a much more important issue.
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.
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.
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.
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.
Should we verify that
PlatformVersion
is notEmptyVersion
whenPlatform
is notstring.Empty
? Only projects are allowed to omit platform version, but that means that it uses the SDK's default platform version, not that platform version is empty.Also, should we verify that
PlatformVersion
isEmptyVersion
whenPlatform
isstring.Empty
? It doesn't make sense to not have a platform, but still to have a platform version.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.
platformVersion
? My understanding is that it's only optional whenplatform
is not specified (string.Empty
). Although as I wrote in another comment, I don't understand why customers would use this API rather thanNuGetFramework.ToShortFolderName()
.