1 year ago
#382345
Paul
In Visual Studio "No quick actions available here" for "using" blocks
Several days ago, if I press Ctrl+. key combination, Visual Studio would suggest me to convert following code:
try
{
using (StreamReader reader = new StreamReader(context.Request.Body, leaveOpen: true))
{
sb.AppendLine("Raw request body:");
sb.AppendLine(await reader.ReadToEndAsync());
context.Request.Body.Position = 0;
}
}
finally
{
//.....
}
to this:
try
{
using StreamReader reader = new StreamReader(context.Request.Body, leaveOpen: true);
sb.AppendLine("Raw request body:");
sb.AppendLine(await reader.ReadToEndAsync());
context.Request.Body.Position = 0;
}
finally
{
//.....
}
But now it is showing "No quick actions available here". Other quick actions, like converting implicit var type to explicit one etc., are still there.
What could happen? How to restore the original behavior?
c#
visual-studio-2019
0 Answers
Your Answer