❔ 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
have you followed the potential fixes?
It just has "convert to top level statement " which does nothing
i think he means the recommendation in the message
adding a reference to that assembly
No. Just the above one.
so try what it tells you to do and see if that helps
Like I said. The error remains
so you added a reference to
System.Windows.Extensions
?It says: type or namespace extensions does not exist in namespace system. Windows
an assembly reference, not a using
Cannot find it. There is only system. Windows
Have u installed the System.Windows.Extensions nuget package?
to me
new SoundPlayer("").Play();
works
what project/framework version are you usingIt says packag cannot be installed for 4.7.2 framework
aaaaah
Then there is your
Does that mean i cant play a simple wav sound on 4.7.2?
you absolutely can
...but why are you using such an old version
Long story, old pc, old visual studio. But how can i play sound?
You can download the latest .NET version from https://dotnet.microsoft.com/download, which you absolutely should.
SoundPlayer is present on 4.7.2, so it should compile
check packages and dependencies maybe
But it's not compiling. The error is still there
try using SoundPlayer in an empty project
Ok
also, again, what do you have in the dependencies of the project?
is there any installed package?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
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?
they don't
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
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•2y ago
Message Not Public
Sign In & Join Server To View
@TeBeClone you're right. My bad. Thank you!
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.