简体   繁体   English

Xamarin.Forms UWP缺少参考

[英]Xamarin.Forms UWP missing references

When I create a new project in Xamarin.Forms I get a lot of errors in the UWP part of the project. 当我在Xamarin.Forms中创建新项目时,在项目的UWP部分中出现很多错误。 It looks like I miss all the referencs in UWP? 看起来我想念UWP中的所有参考资料吗?

I installed Xamarin trough Visual Studios modify 我安装了Xamarin槽Visual Studios修改

Below is a screenshot of my Visual Studio 以下是我的Visual Studio的屏幕截图

在此处输入图片说明

I also started to work with Xamarin about two weeks ago and came across many problems and one was just like yours. 大约两周前,我也开始与Xamarin合作,遇到了许多问题,其中一个与您一样。 If you dont have Xamarin studio go and download it. 如果您没有Xamarin Studio,请下载它。 Just do it. 去做就对了。

Intellisense breaks really often and you get 200 errors that are dump(or not). Intellisense经常中断,您会得到200个转储(或未转储)的错误。

To get rid of the errors there are many ways. 要消除错误,有很多方法。

Sometimes you just have to wait. 有时您只需要等待。

Open the xaml pages and save them. 打开xaml页面并保存。

Clean - rebuild the project it should run(at third try). 清理-重建应该运行的项目(第三次尝试)。 If it doesnt you have to open Xamarin studio and built it from there. 如果没有,您必须打开Xamarin Studio并从那里构建它。

If your project is new, just delete it and create a new one. 如果您的项目是新项目,只需删除它并创建一个新项目即可。

If you have MVC 5 or Core 1 Installed you will have to remove them(if that doesnt help do a PC Reset like a format). 如果您安装了MVC 5或Core 1,则必须将其删除(如果那样无济于事,请像格式一样进行PC重置)。

If it says something for .zip files, find them keep a backup and delete them. 如果显示.zip文件,请找到它们进行备份并删除。 Xamarin will re-download on Build. Xamarin将在Build上重新下载。

I had same problem here using Visual Studio 2015 Update 2. Unload the UWP and everything works. 我在这里使用Visual Studio 2015 Update 2遇到相同的问题。卸载UWP,一切正常。

Tried in Xamarin Studio Professional and the following error: - Could not load project 'blah\\blah.UWP\\blah.UWP.csproj' with unknown item type '{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A}' 在Xamarin Studio Professional中尝试过以下错误:-无法加载项目类型为“ {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A}”的项目“ blah \\ blah.UWP \\ blah.UWP.csproj”

The following link has some helpful points and mentions "UWP is available in Xamarin.Forms 2.1 and later" 以下链接提供了一些有用的信息,并提到“ Xamarin.Forms 2.1和更高版本中提供了UWP”

https://developer.xamarin.com/guides/xamarin-forms/platform-features/windows/installation/universal/ https://developer.xamarin.com/guides/xamarin-forms/platform-features/windows/installation/universal/

The default setup when creating a new project in VS 2015 Up2 is to use Xamarin Forms v2.0.0.6482, however when I try to update to v2.1.0.6529 I get nuget errors 在VS 2015 Up2中创建新项目时的默认设置是使用Xamarin Forms v2.0.0.6482,但是当我尝试更新至v2.1.0.6529时却遇到了nuget错误

Checking my output when trying to update to 2.1 using nuget i got the following: - 在尝试使用nuget更新到2.1时检查我的输出,得到以下信息:-

The content at 'https://{myteamcityserver}/guestAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.NETCore.UniversalWindowsPlatform'' is not valid XML. “ https:// {myteamcityserver} /guestAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id ='Microsoft.NETCore.UniversalWindowsPlatform”中的内容不是有效的XML。 Root element is missing. 根元素丢失。

So I turned of my local Package Source in Tools | 因此,我在“工具”中打开了本地软件包源。 NuGet Package Manager | NuGet软件包管理器| Package Manager Settings | 包管理器设置| Package Sources 包裹来源

And woo hoo it all worked for me. 呜呜,一切对我有用。

Regards Peter 问候彼得

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM