❔ StringSyntax attribute not available
Yesterday I updated VS to the latest version and installed .NET SDK 7 but whenever I try to use
[StringSyntax(StringSyntaxAttribute.Regex)]
on a parameter, VS doesn't seem to be able to find it for importing. My project uses .net v4.8.1 framework.4 Replies
You'll need to polyfill it
Something like PolySharp from nuget will do the trick
Though, why target 4.8.1 in this day and age?
You use the old .NET Framework 4.8, so you will only ever get the features of the old .NET Framework 4.8
You could go into the future, get .NET 69 SDK installer, go back, install them, it would not change things
I just upgraded to .net 7, apparently that attribute doesn't even work on string arrays, well that's it i guess :P
Oh it does work, it just stops working if you use variables with it or just a simple
that kinda makes sense, but it'd be still useless for me
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.