I realized that I can't use ctrl + .
shortcut to import other C#
classes. This shortcut works just fine for other file types like typescript.
I have uninstalled and installed back again. I also installed old version of VS code too. But nothing worked.
As I shown above, there is no import feature shows up when I do ctrl + .
. Those are only the choices I was given. It's fine using without it but it's also annoying to import those files manually typed.
You have to change it so it runs in the terminal. Go to the menu Code > Preferences > Settings. In the User tab on the left panel, expand the Extensions section. Find and select Run Code Configuration.
1. We need to click on the extension button that displays a sidebar for downloading and installing the C/C++ extension in the visual studio code. In the sidebar, type C Extension. In this image, click on the Install button to install the C/C++ extension.
For Visual Studio 2017 (and I think Visual Studio 2019 also), close Visual Studio, go into the . vs folder in your projects folder and delete all the contents apart from the . suo file, then reopen Visual Studio. This way you can rebuild the Intellisense cache without losing your preferences.
The C# language features in VS Code are provided by a service called OmniSharp .
A couple of things you could try:
Type Omnisharp: Restart OmniSharp
Select OmniSharp Log
from the dropdown)
Enabling C# debugger logging in Omnisharp
"configurations": [
{
"...": "...",
"logging": {
"engineLogging": true
}
},
{ "...": "..." }
]
Something that solved it in my case was, in Unity, to set the Edit -> Project Settings -> Player -> Other Settings -> Api Compatibility Level to .NET 4.x.
Probably not appropriate in some cases, and indiciative of another issue in my Omnisharp/ VS Code setup, but just in case it helps someone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With