CodeAnalysis shows the CRR0038 warning for this code.
Visual BasicPublic Function RunTaskAsync(ByVal source As CancellationTokenSource) As Task
'the code warning is shown for this method
'CRR0038: CancellationToken parameter should be used in method
If source Is Nothing Then
Throw New ArgumentException(NameOf(source))
End If
Return New Task(Sub()
'do something
End Sub, source.Token)
End Function
John,
I have reproduced this issue. Please give us some time to fix it.