Visual Studio 2022 winforms problem
Eror: CS1061
I wrote the error code numbers in the code, I couldn't find a solution
I wrote the error code numbers in the code, I couldn't find a solution
14 Replies
I don't remember all error codes by hearth. I don't think anybody does, actually
So what are CS0144 and CS1061?
Excuse me, you wouldn't understand it even if I threw it because my IDE is in Turkish, now I'm sending the official error message:
CS1061 : 'type' does not contain a definition for 'name' and no accessible extension method 'name' accepting a first argument of type 'type' could be found (are you missing a using directive or an assembly reference?).
CS0144 : Cannot create an instance of the abstract class or interface 'interface'
They seem pretty obvious
Menu
is an abstract class or an interface, and those cannot be instantiated
And whatever Menu
is, it has no method named Show()
menu.cs (form)
I didn't understand the menu I created as a Windows form and I didn't understand why the error was caused by everything is correct from my point of view but I don't know
I must have a small mistake somewhere, when I opened another form for the experiment, it worked fine before I took any form settings, unfortunately the errors did not leave me when I came back to this project
Why is it
partial
?
It could be that another partial Menu
class exists, and this one is abstract
So in total you get an abstract Menu
classAngius
REPL Result: Failure
Exception: CompilationErrorException
Compile: 233.367ms | Execution: 0.000ms | React with ❌ to remove this embed.
@ZZZZZZZZZZZZZZZZZZZZZZZZZ Shouldn't it be partial, it's a winform, and as far as I know, all forms are partial.
Are they? Never worked much with Winforms so maybe
Yes, they are all partisan
No idea, then
😦
My friend, I solved it, at the end of 2 days, it turns out that with the new update, there is a feature called Menu, a class called Visual A Menu has come, so the two overlap @ZZZZZZZZZZZZZZZZZZZZZZZZZ
Ah, makes sense
Glad you solved it!
how to upgrade visual studio 2017 to 2022
i have 2022 in my other laptop but in this machine i have windows 10 and vs 2017 version.
Just uninstall 2017 and install 2022
Or just install 2022, they can exist besides eachother