I've recently started using .Net 5 on Mac, and I've discovered that Console.Beep
throws an 'unsupported operation' exception.
Do the standard libraries provide a working way to make sounds for Mac? I do not believe they did in .Net Core, as per: How to play a sound in NETCore?
Asked
Active
Viewed 260 times
0

Mr. Boy
- 60,845
- 93
- 320
- 589
1 Answers
1
TLDR: From further research, I believe the answer is NO.
I discovered the System.Media.SoundPlayer
class (which is in .Net 5.0), but I got a compile error System.Media belonged to missing assembly System.Windows.Extensions
.
I found and installed this via Nuget: https://www.nuget.org/packages/System.Windows.Extensions/
My application now compiled but upon trying to call SoundPlayer.Play()
I got PlatformNotSupportedException
-
"System.Windows.Extensions types are not supported on this platform."
I can't see in the documentation anywhere if .Net 6.0 will change this though.

Mr. Boy
- 60,845
- 93
- 320
- 589