question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The type or namespace name 'System' could not be found

See original GitHub issue

Environment data

dotnet --info output:

.NET Command Line Tools (2.1.103)

Product Information: 
  Version:                       2.1.103
  Commit SHA-1 hash:  60218cecb5

Runtime Environment:
 OS Name:     Windows OS 
 Version:        6.1.7601 OS 
 Platform:      Windows
 RID:              win7-x64 
 Base Path:   C:\Program Files\dotnet\sdk\2.1.103\

Microsoft .NET Core Shared Framework Host
  Version  : 2.0.6  
  Build      : 74b1c703813c8910df5b96f304b0f2b78cdf194d

VS Code version: 1.21.1

C# Extension version: 1.14.0

Issue: I upgraded from VS Code 1.19 and C# Extension 1.13 to the latest VS Code and # Extension and all of sudden every reference is all messed up, but I’m able to do dotnet build without issues. Attached screenshot and trace logs from OmniSharp.

OmniSharp.log

capture

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:53 (13 by maintainers)

github_iconTop GitHub Comments

19reactions
rchandecommented, Apr 3, 2018

@dmumladze Thanks for including your omnisharp log. Can you try deleting the C:\Users\{username}\.vscode\extensions\ms-vscode.csharp-1.14.0\.omnisharp directory and see if that helps? Also, it looks like you’re on a pretty recent release of the CLI. Have you updated the CLI recently, and if so, was everything working before you updated?

13reactions
hbrooks3commented, Oct 1, 2019

Disable the C# plugin and the error messages will go away (KISS).

Read more comments on GitHub >

github_iconTop Results From Across the Web

The type or namespace name 'System' could not be found
Open 'References' under the project. · Right click on 'System' reference. · Click on 'Remove'. · Right click on 'References'. · Click 'Add...
Read more >
The type or namespace name 'System' could not be found
Firstly, please close your VS. then open you project folder, delete all bin and obj folders(projectName folder , projectName.Android folder, ...
Read more >
The type or namespace name System could not be found
The type or namespace not found errors include Controller, IActionResult, etc. Created the same application using the same template in Visual Studio 2017 ......
Read more >
The type or namespace name 'System' could not be found
I am creating an extension using P11 Integration Studio and it is weird that every time i try to update the source code,...
Read more >
vs code The type or namespace name 'System' could not ...
I have a simple project built with dotnet new console -o CSharpTutorial and I can run it safely with dotnet run CSharpTutorial but...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found