Jordi Prat
Jordi Prat

Reputation: 141

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

In visual studio 2017, I created a new Cross-Platform project, Mobile app (Xamarin Forms). I choose Blank project for the Android platform and shared code. NET Standard.

Without entering a new line of code, when solutio was created I get an error that said: "The type or namespace name 'System' could not be found"

enter image description here

Restore NuGet packages, didn't work. Clean solution, didn't work. Buid project, didn't work ...

Has anyone happened to you?

Upvotes: 1

Views: 2063

Answers (5)

Sucy
Sucy

Reputation: 11

In my case this worked for me:

  1. Right click on the project -> Unload Project
  2. Right click on the project -> Reload Project with Dependencies

Upvotes: 1

Edwin Mendez
Edwin Mendez

Reputation: 542

I just unloaded the project and then I reloaded on VS 2019, at least for me worked. I hope this could help someone.

enter image description here

Upvotes: 1

Jordi Prat
Jordi Prat

Reputation: 141

The solution was reinstall visual studio and all components. Now, when I create a new project, start with no errors and can compile and execute without any problems.

Upvotes: 0

Kenneth Pasigna
Kenneth Pasigna

Reputation: 1

Just clean your project. You can find it in Build tab.

Upvotes: 0

Nick Brown
Nick Brown

Reputation: 41

Something is wrong with your xamarin installation. I hate to say it but reinstalling xamarin is probably your only option

Upvotes: -1

Related Questions