✅ Idk what's going on (NET 8)
I recently booted a console based C# project up, with the net NET 8. But when running my code i get an error and all the code is suddenly gone. (Before and after on images 😭
9 Replies
... why do you have a class named
GlobalUsings
?
It's incredibly bizarre that VS apparently overrode your file with an auto-generated one.you should not be writing your own code in that file, its generated.
oh, yeah you should not be writing anything in that file
your
Main
method should probably be written in Program.cs
if you want to follow standard conventionsI found the issue 🤦
Stupid me didn't realise i was writing in the wrong file. Im used to whenever i make a new project it opens the file i write code in. But this time it opened another wierd file.
and suggested the name for some reason (class name)
🙂
I fixed it.
I apologise for takin yalls time on this 🤦
thats fine.
If you're done with this thread, feel free to $close it 🙂
Use the /close command to mark a forum thread as answered