Closed Montellese closed 1 year ago
OK I think I figured out what the issue is. My project is targeting .NET Standard 2.0
but System.Collections.Generic.IAsyncEnumerable<>
has been introduced in .NET Standard 2.1
. So I changed the target framework to .NET Standard 2.1
and then I got the next issue with https://github.com/nenoNaninu/TypedSignalR.Client.TypeScript/blob/ea4ef672b51286fcb3840985e7bb43618b8ee12c/src/TypedSignalR.Client.TypeScript/TypeMappers/StreamTypeMapper.cs#L37 since System.Threading.Channels.ChannelReader<>
is not available in .NET Standard 2.1
.
What is the minimum supported framework and is there any way to support older frameworks as well?
The easiest solution is to add the following packages.
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="7.0.0" />
<PackageReference Include="System.Threading.Channels" Version="7.0.0" />
However, it is better to work correctly with netstandard2.0, so I will fix this issue.
This issue was resolved in v1.7.3. Please try it!
Thanks a lot for the quick response and fix! It works perfectly fine now.
Hey, thanks a lot for your work. I've already tried
Tapper
to transpile my DTOs into TypeScript which works great but I'd also like to transpile my SignalR hub. Unforunately I always get the following output when runningdotnet tsrts --project myproject.csproj --output generated
:I've reduced my project to the following C# code:
Do you have any idea what the problem could be. Looking at the exception the problem seems to be that https://github.com/nenoNaninu/TypedSignalR.Client.TypeScript/blob/ea4ef672b51286fcb3840985e7bb43618b8ee12c/src/TypedSignalR.Client.TypeScript/TypeMappers/StreamTypeMapper.cs#L13 results in
Assign
beingnull
.