❔ DateOnly is not available in .net6.0 for me
I had to add these to make it available:
But now I'm getting warnings that these aren't necessary because they're implicitly referenced. What could be happening that I need to add them?
24 Replies
can you show your csproj
you should not need to include that framework reference
if you have this
you are probably not on .NET 6.0
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
@Henkypenky @tebeco
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
because I could not use DateOnly without them. Maybe I don't need both but definitely one of them.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Yeah. But I could not use DateOnly. As soon as I added those lines it worked.
I removed them and it's still working.
So strange.
It would not recognize DateOnly before at all
I've had a similar experience when records were introduced
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I see. Thanks. I don't understand why adding it and then removing it fixed it.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Hmm. When I added it. I wasn't even running the app. As soon as I added the lines the error underline disppaeared from DateOnly
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I know. But I did absolutely nothing other than adding the lines.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Ok, yeah that might be it. This was on VSCode though
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Got it.
Thanks for the info
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Makes sense.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Ok. I'll have to spend a few minutes reading this. Thanks
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
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.