简体   繁体   English

Visual Studio 2017将无法编译Xamarin跨平台项目

[英]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.

相关问题 Visual Studio 2017-跨平台应用程序-无PCL - Visual Studio 2017 - Cross Platform App - No PCL 我在Visual Studio 2017上找不到跨平台应用程序Xamarin - I can't find cross platform app Xamarin on visual studio 2017 Xamarin Visual Studio 2017:无法添加跨平台视图页面 - Xamarin Visual Studio 2017: Cannot Add Cross-Platform View Page 创建Xamarin.Forms跨平台应用程序时出现“此项目需要Visual Studio更新才能加载”错误 - “This project requires a Visual Studio update to load” error when creating a Xamarin.Forms Cross-Platform Application 创建Xamarin.Forms跨平台应用程序时,“此项目需要加载Visual Studio更新”错误 - “This project requires a Visual Studio update to load” error when creating a Xamarin.Forms Cross-Platform Application Visual Studio 2015和Xamarin Form在跨平台下可移植 - Visual studio 2015 and Xamarin Form portable under cross platform Visual Studio 2015社区Xamarin跨平台中没有.WinPhone模板 - no .WinPhone template in Visual Studio 2015 Community Xamarin Cross-Platform Xamarin传统Android项目在Visual Studio 2017上构建但出现错误 - Xamarin Traditional Android Project Build On Visual Studio 2017 But Have Error Visual Studio 2017 RC Core Console项目无法编译 - Visual Studio 2017 RC Core Console Project does not compile 如何在Visual Studio跨平台android项目中引用.so库? - How to reference .so library in visual studio cross platform android project?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM