Describe the bug
I faced a couple of problems with System.IO.IOException: Unable to read data from the transport and found comments that it was fixed at Refit v6.
But when I upgrade from 5.2.4 to any v6 I've got this:

Environment
6.0.245.2.4What should I do to resolve this issue? Help me pls...
You need to contact JetBrains, sorry. It looks like the MSBuild they're using is too old and doesn't contain support for Source Generators.
So I was able to recreate the same issue. The issue arises when you are using the .NET 3.1 SDK and targeting .NET Standard 2.1.
The fix is to install the .NET 5 SDK and add a global JSON.
{
"sdk": {
"version": "5.0.100",
"rollForward": "Minor"
}
}
This will make sure that Rider (and other IDEs) pick up the right build tools.
Most helpful comment
So I was able to recreate the same issue. The issue arises when you are using the
.NET 3.1 SDKand targeting .NET Standard 2.1.The fix is to install the .NET 5 SDK and add a global JSON.
This will make sure that Rider (and other IDEs) pick up the right build tools.