❔ Cannot find explanation of error

Hello. I came across this error, but when I clicked on its reference (cs1069), it took me here: https://learn.microsoft.com/en-us/dotnet/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error?f1url=%3FappId%3Droslyn%26k%3Dk(CS1069) What is it and how can I solve it?
Sorry, we don't have specifics on this C# error
List of possible resources for compiler errors and warnings that haven't been documented yet.
32 Replies
Omnissiah
Omnissiah2y ago
have you followed the potential fixes?
lambdacore12
lambdacore12OP2y ago
It just has "convert to top level statement " which does nothing
Jimmacle
Jimmacle2y ago
i think he means the recommendation in the message adding a reference to that assembly
lambdacore12
lambdacore12OP2y ago
No. Just the above one.
Jimmacle
Jimmacle2y ago
so try what it tells you to do and see if that helps
lambdacore12
lambdacore12OP2y ago
Like I said. The error remains
Jimmacle
Jimmacle2y ago
so you added a reference to System.Windows.Extensions?
lambdacore12
lambdacore12OP2y ago
It says: type or namespace extensions does not exist in namespace system. Windows
Jimmacle
Jimmacle2y ago
an assembly reference, not a using
lambdacore12
lambdacore12OP2y ago
Cannot find it. There is only system. Windows
Luciferno
Luciferno2y ago
Have u installed the System.Windows.Extensions nuget package?
Omnissiah
Omnissiah2y ago
to me new SoundPlayer("").Play(); works what project/framework version are you using
lambdacore12
lambdacore12OP2y ago
It says packag cannot be installed for 4.7.2 framework
Omnissiah
Omnissiah2y ago
aaaaah
Luciferno
Luciferno2y ago
Then there is your shrug
lambdacore12
lambdacore12OP2y ago
Does that mean i cant play a simple wav sound on 4.7.2?
Omnissiah
Omnissiah2y ago
you absolutely can ...but why are you using such an old version
lambdacore12
lambdacore12OP2y ago
Long story, old pc, old visual studio. But how can i play sound?
Thinker
Thinker2y ago
You can download the latest .NET version from https://dotnet.microsoft.com/download, which you absolutely should.
Omnissiah
Omnissiah2y ago
SoundPlayer is present on 4.7.2, so it should compile check packages and dependencies maybe
lambdacore12
lambdacore12OP2y ago
But it's not compiling. The error is still there
Omnissiah
Omnissiah2y ago
try using SoundPlayer in an empty project
lambdacore12
lambdacore12OP2y ago
Ok
Omnissiah
Omnissiah2y ago
also, again, what do you have in the dependencies of the project? is there any installed package?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
lambdacore12
lambdacore12OP2y ago
It works now . I tried reinstalling that nuget package with an older version (4.7) and soundplayer now works. Thanks, everyone! By the way, why do class libraries have a max framework of 4.8?
Jimmacle
Jimmacle2y ago
they don't
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
MODiX
MODiX2y ago
When creating a new project, prefer using .NET over .NET Framework, unless you have a very specific reason to be using .NET Framework. .NET Framework is now legacy code and only get security fix updates, it no longer gets new features and is not recommended. https://cdn.discordapp.com/attachments/569261465463160900/899381236617855016/unknown.png
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
lambdacore12
lambdacore12OP2y ago
@TeBeClone you're right. My bad. Thank you!
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