my program won't run in vs 2022, but it runs in an online compiler
can someone help me figure out what is wrong?
19 Replies
you would need to provide the error messages, and relevant code if its a compilation error of specific code passages
will do
exact same code in another compiler
if you double click on the error it should take you to the exact line it's reporting the error on, or should at least state it - where exactly is it saying the error is occurring?
it says line 5
bbut idk whats wrong with it
you could try $vsdrunk and see if that resolves the issue, my only other guess is that you haven't defined a namespace but I don't think that would cause an error as there's already clearly a warning/hint instead
* close VS
* remove the hidden folder
.vs
* remove all bin
and obj
folder next to each csproj (DO NOT TOUCH THE .git
FOLDER OR WHAT'S INSIDE)
* restart vsalso if you copied the code from a web editor, try remove that { and write it manually again
I didn't I wrote it myself?
I have no clue what that is..
oh nvm
wait the hidden folder
??
You might have to enable showing hidden files
Not at my PC so can't post a screenshot sorry
ah ill try
this is where it is on my PC if you're on windows 11 it might be different
I think you're confusing the top level statements compilation, without the namespace it's expecting statements before classes, if you wrap in a namespace does the problem disappear?
oh sorry for disappearing but I just ended up deleting vscode because i literally have 0 idea how it works and cant come here every time i have a small issue with the program and not even my own code
Giving up is a sound strategy