Today, my project full of these errors. Same with "string", "int", etc. I am running the latest VS Code on Yosemite. Uninstalled and reinstalled DNVM. Deleted all packages from .dnx. I can run my program, but this is really bothering me.
3rd party edit
Using visual studio code 1.73.1 on windows-10 with .net-7.0 the error is this
Type "System.Object" is not defined or imported csharp(CS0518)
Steps to reproduce
- Open a folder with vs code
- Open a terminal and run
dotnet new console --use-program-main
- Open
Program.cs
and see the result below
Screen of vs-code error
3rd party VS Code version details
Version: 1.73.1 (system setup)
Commit: 6261075646f055b99068d3688932416f2346dd3b Date: 2022-11-09T04:27:29.066Z Electron: 19.0.17
Chromium: 102.0.5005.167 Node.js: 16.14.2
V8: 10.2.154.15-electron.0OS: Windows_NT x64 10.0.19042
Sandboxed: No
In my version