[英]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).在 visual studio 2017 中,我创建了一个新的跨平台项目,移动应用程序 (Xamarin Forms)。 I choose Blank project for the Android platform and shared code.我为 Android 平台和共享代码选择了空白项目。 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"在不输入新代码行的情况下,当创建解决方案时,我收到一条错误消息:“找不到类型或命名空间名称‘System’”
Restore NuGet packages, didn't work.恢复 NuGet 包,没有用。 Clean solution, didn't work.干净的解决方案,没有工作。 Buid project, didn't work... Buid项目,没有工作...
Has anyone happened to you?你有没有遇到什么事?
In my case this worked for me:就我而言,这对我有用:
Just clean your project.只需清理您的项目。 You can find it in Build tab.您可以在构建选项卡中找到它。
The solution was reinstall visual studio and all components.解决方案是重新安装 visual studio 和所有组件。 Now, when I create a new project, start with no errors and can compile and execute without any problems.现在,当我创建一个新项目时,开始时没有任何错误,并且可以毫无问题地编译和执行。
Something is wrong with your xamarin installation.您的 xamarin 安装有问题。 I hate to say it but reinstalling xamarin is probably your only option我不想这么说,但重新安装 xamarin 可能是你唯一的选择
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.