babelshift / SteamWebAPI2

🎮 C# / .NET library that makes it easy to use the Steam Web API. It conveniently wraps around all of the JSON data and ugly API details with clean methods, structures and classes.
MIT License
263 stars 43 forks source link

SteamWebInterfaceFactory broken in .NET 7 #132

Closed BowDown097 closed 1 year ago

BowDown097 commented 1 year ago

Upgraded my project to .NET 7, now I get this exception upon using the SteamWebInterfaceFactory(string) constructor. e.txt

Land3r commented 1 year ago

Hello,

I have the same issue. Tried to update existing project from .Net 5 to .Net 7 and i have the same exception upon SteamWebInterfaceFactory injection on Startup:

        services.AddSingleton<SteamWebInterfaceFactory>(new SteamWebInterfaceFactory("41C7178A14704C0357A480444C06BV88"));

Resulting exception is the following :

        System.ArgumentException : 'GenericArguments[0], 'SteamWebAPI2.Models.CSGO.ServerStatusResultContainer', on 'T MaxInteger[T](System.Collections.Generic.IEnumerable`1[T])' violates the constraint of type 'T'.'
        Internal exception : VerificationException : Method System.Linq.Enumerable.MaxInteger: type argument 'SteamWebAPI2.Models.CSGO.ServerStatusResultContainer' violates the constraint of type parameter 'T'.

@babelshift Can you have a look into @BowDown097 's PR ?

RainOrigami commented 1 year ago

PR #133 fixes this, please merge and deploy!

ablizorukov commented 1 year ago

Hi, have the same issue, have a look please and merge 🚀

emmanuelrflores commented 1 year ago

Any chance to get this issue merged?

babelshift commented 1 year ago

Thanks and sorry for the delay. Check out NuGet package 4.4.1.