C
C#2y ago
razkanaz

❔ ✅ visual studio code intelisense problem

i'm using Visual studio code to make a .cs script and when i typr in it doesn't register Console. WriteLine(); and yes, i have the plugin installed
24 Replies
Buddy
Buddy2y ago
$vscode
MODiX
MODiX2y ago
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.png
razkanaz
razkanazOP2y ago
it says "Could not locate .NET Core project. Assets were not generated"
Buddy
Buddy2y ago
have you created a new project ? using dotnet cli
razkanaz
razkanazOP2y ago
i'm trying to make a git
Buddy
Buddy2y ago
Simply making a file called foo.cs will not work.
razkanaz
razkanazOP2y ago
oh
razkanaz
razkanazOP2y ago
thank you hold on let me try
Buddy
Buddy2y ago
If you want to create a console application, open command prompt, change to the directory you want to create it in and type dotnet new console That will create a new Console Application project. After that follow the steps that was sent first. Specifically.
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)
razkanaz
razkanazOP2y ago
Thank you!! oh quick question
Buddy
Buddy2y ago
👍
razkanaz
razkanazOP2y ago
now that the neccesary files are there can i now just make another .cs file
Buddy
Buddy2y ago
Yes, as long as it's a part of a project.
razkanaz
razkanazOP2y ago
how do i make it part of a project?
Buddy
Buddy2y ago
If you opened the folder containing the .csproj or .sln that's all you need to do.
razkanaz
razkanazOP2y ago
Thank you! i'm learning git for the first time
Buddy
Buddy2y ago
Good luck.
razkanaz
razkanazOP2y ago
so i'm very confused about this stuff thanks do i need to close this? or just leave it be
Buddy
Buddy2y ago
Close what? Oh, the thread?
razkanaz
razkanazOP2y ago
yes
Buddy
Buddy2y ago
type /close when you're finished.
razkanaz
razkanazOP2y ago
got it thank you again!
Accord
Accord2y ago
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.
Want results from more Discord servers?
Add your server