[英]Visual Studio 2017 will not compile xamarin cross platform project
I am getting a bunch of errors 我遇到很多错误
"The type or namespace name 'Forms' does not exist in the namespace 'Xamarin' (are you missing an assembly reference?)".
“类型或名称空间名称'Forms'在名称空间'Xamarin'中不存在(您是否缺少程序集引用?)”。
What I have tried is updating the Xamarin.Android.Support packages but it fails to update to 26.1.0.1. 我尝试过更新Xamarin.Android.Support程序包,但无法更新到26.1.0.1。 Current version installed is 25.4.0.2.
当前安装的版本是25.4.0.2。
I also tried Clean Solution and Build Solution, but no success. 我也尝试过“清洁解决方案”和“构建解决方案”,但没有成功。 I believe I am only getting these errors on Cross Platform mode because I was able to compile and run on Android project only.
我相信我只会在跨平台模式下收到这些错误,因为我只能在Android项目上编译和运行。 How do I fix this issue?
如何解决此问题?
I tried the usual things. 我尝试了平常的事情。 Clean the build.
清理构建。 Restore Nuget Packages.
恢复Nuget软件包。 I tried to clear the Nuget cache via the Tools -> Nuget Package Manager -> Nuget Package Settings, but after a long wait I got an error.
我试图通过工具-> Nuget程序包管理器-> Nuget程序包设置清除Nuget缓存,但是等待了很长时间,我得到了一个错误。 Out of desperation I decided to update the Nuget Package Automapper from version 7 to 7.01.
出于绝望,我决定将Nuget Package Automapper从版本7更新到7.01。 As far as the errors were concerned Automapper was completely irrelevant.
就错误而言,Automapper完全不相关。 And yet it worked, I could suddenly compile again.
但是,它奏效了,我突然可以再次编译。 Amazing.
惊人。 Maybe this cleared the Nuget cache?
也许这清除了Nuget缓存? Well next time this happens I will do something similar - maybe change the Automapper version back to 7 again and see if that works.
好吧,下次发生这种情况时,我会做类似的事情-也许再次将Automapper版本改回7,看看是否可行。 It did this time.
这次做了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.