✅ Can I use static abstract interface members in netstandard2.1?

Title -- I thought this was a language feature, not a framework feature. Shouldn't I be able to use these? I'm getting compiler errors stating it is not supported in the targeted runtime.
6 Replies
Saber
Saber2y ago
it may be a language feature, however frameworks only support up to specific language versions
sinaesthetic
sinaestheticOP2y ago
It just occurred to me... isn't netstandard going away? It's all just netx.y now, I guess I can just swap all of these (they're just solution projects, not shared libraries)
Angius
Angius2y ago
.NET Standard is there to create libraries that work with old Framework and new .NET (Core) So they only support the features common between those versions If they're not shared libraries, no point using .NET Standard IMHO Just use .NET 7 Or .NET 6 if you care about LTS
333fred
333fred2y ago
Answer for title question: no The compiler errors are correct
sinaesthetic
sinaestheticOP2y ago
I think my head was just in a different space. I had gotten so used to having libraries just be in netstandard and now it's more of a backwards-compatibility thing. I just switched everything to net7.0 and we're all good. Thanks!
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server