C
C#11mo ago
Mikkel12345

✅ 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 😭
No description
No description
9 Replies
Thinker
Thinker11mo ago
... why do you have a class named GlobalUsings? It's incredibly bizarre that VS apparently overrode your file with an auto-generated one.
Pobiega
Pobiega11mo ago
you should not be writing your own code in that file, its generated.
Thinker
Thinker11mo ago
oh, yeah you should not be writing anything in that file
Pobiega
Pobiega11mo ago
your Main method should probably be written in Program.cs if you want to follow standard conventions
Mikkel12345
Mikkel12345OP11mo ago
I 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)
Pobiega
Pobiega11mo ago
🙂
Mikkel12345
Mikkel12345OP11mo ago
I fixed it. I apologise for takin yalls time on this 🤦
Pobiega
Pobiega11mo ago
thats fine. If you're done with this thread, feel free to $close it 🙂
MODiX
MODiX11mo ago
Use the /close command to mark a forum thread as answered
Want results from more Discord servers?
Add your server