Repository navigation
Conversation
Replace the instance Equals call with string.Equals(t.TargetAlias, frameworkAlias, StringComparison.Ordinal) to make the comparison explicit and culture-independent and to avoid potential NullReferenceException when TargetAlias is null.
|
first commit added the test. second fixes it. |
|
@SimonCropp Thanks for creating this fix. Do you have the real world scenario in which this happens? I think the alias should be hydrated by the reader, so it's making me thing I'm missing something. |
|
@nkolev92 sorry, i have not been able get a nice stand alone repro. it happens when moving between cli actions and Rider. |
if the assumption is TargetAlias should be not null, then should we add a throw when it is null? |
|
I've been annotating nullable and targetAlias should be empty now as far as I could tell, but it's very possible that it wasn't empty in previous versions. Let's keep the simple fix for now, but I'll look into it more. |
|
looks similar to dotnet/sdk#39316 ? |
|
It doesn't look like it. |
Replace the instance Equals call with string.Equals(t.TargetAlias, frameworkAlias, StringComparison.Ordinal) to make the comparison explicit and culture-independent and to avoid potential NullReferenceException when TargetAlias is null.
Bug
Fixes:
Description
PR Checklist