❔ Setting up VSC
im trying to output some text from the terminal using Console.WriteLine() but the csc command is not outputting anything. is my VSC not set up correctly?
19 Replies
$vscode
1) Install the C# extension
2)
2.a) DO NOT USE OPEN FILE
2.b) Always use
Open Folder
(from the File
menu), and open the folder containing your sln file (or the folder containing the csproj
if you have only one csproj
)
3) To make the extension start and detect C#, either:
3.a) wait for the prompt that will appear on the bottom right of your screen that ask you if you want it to create some files, and say Yes
3.b) Command Palette (F1
or Ctrl+Shift+P
) and type > .Net : Generate Assets for build and run
4) you should see a flame on the Status
bar with the Omnisharp logo (see second attached screenshot)
5) it should load to finally say OmniSharp server is running (if not ask for help)
https://media.discordapp.net/attachments/569261465463160900/1006652191689429022/unknown.png
https://cdn.discordapp.com/attachments/569261465463160900/951015732769079336/unknown.pngYeah, don't use CSC directly
Also, you should definitely not be using csc directly
Unable to generate assets to build and debug. OmniSharp server is not running.
it says i have the C# extension installed tho
Don't use CSC, use
dotnet run
Did you follow the steps?
Particularly step 2?
feels kinda weird that you can't open a file to get O# running
omnisharp-vim allows it
and I think if you run O# manually it will work
it's just some quirk of particularly VSC' extension
Opening a single file is a more important scenario for vim
As that's the way vim actually operates
that isn't a reason why it's not done like that in VSC, tbh
does it work the same for other languages? C, Rust, Java, or some other languages with project files?
Unsure about Java. Rust and C both need roots opened
C is particularly bad
Rust enforces a file structure from the root
In the compiler itself
so you can't do
vscode main.rs
to have its LS running?I don't believe so
I could certainly be wrong
I see
Anyway, this is entirely irrelevant to the issue this thread is about 🙂
I still find it weird
but if it works consistently among languages... I guess, there's a reason
yeah sorry
thnak you dotnet run worked
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.