C
C#7mo 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
Thinker7mo 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
Pobiega7mo ago
you should not be writing your own code in that file, its generated.
Thinker
Thinker7mo ago
oh, yeah you should not be writing anything in that file
Pobiega
Pobiega7mo ago
your Main method should probably be written in Program.cs if you want to follow standard conventions
Mikkel12345
Mikkel123457mo 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
Pobiega7mo ago
🙂
Mikkel12345
Mikkel123457mo ago
I fixed it. I apologise for takin yalls time on this 🤦
Pobiega
Pobiega7mo ago
thats fine. If you're done with this thread, feel free to $close it 🙂
MODiX
MODiX7mo ago
Use the /close command to mark a forum thread as answered