Xamarin.Forms新项目创建有无数错误。 nuget出了什么问题? [英] Xamarin.Forms new project creation has countless errors. Something wrong with nuget?

查看:175
本文介绍了Xamarin.Forms新项目创建有无数错误。 nuget出了什么问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我是Visual Studio新手。

I am new to Visual Studio.


使用Xamarin.Forms模板创建一个新项目会产生无数错误,例如"无法解析引用:  Xamarin.Forms.Xaml
引用  App4
请为  Xamarin.Forms.Xaml
或删除对  App4
App4.Android""引用的组件"system.xml""找不到。""参考组件" ;系统"找不到。"

creating a new project with Xamarin.Forms template gives countless errors, such as "Can not resolve reference: Xamarin.Forms.Xaml, referenced by App4. Please add a NuGet package or assembly reference for Xamarin.Forms.Xaml, or remove the reference to App4. App4.Android" "the referenced component "system.xml" could not be found." "the reference component "system" could not be found."


我认为安装有些重大错误;我已经尝试卸载,修复并尝试了VS 2017和VS 2019.似乎没什么用。

I think something substantial is wrong with the installation; I have tried uninstalling, repairing, and tried VS 2017 and VS 2019. Nothing seems to work.


我试图从包管理器和控制台手动安装nuget包。包管理器指示所有包都是uptodate,并且不允许我安装任何新包;从控制台,安装任何包导致此错误:

I tried to manually install the nuget packages, from the package manager and the console. The package manager indicates all the packages are uptodate, and does not let me install any new packages; from the console, installing any package results in this error:


" Install-Package Xamarin.Forms -Version 3.6.0.344457恢复C:\ Users \ Navid\source \repos\App4 \ App4 \ App4的软件包。 Android \ App4.Android.csproj ... GET 'System.Numerics.Vectors'& semVerLevel = 2.0.0'。响应状态代码不表示成功:
404(未找到)。在行: 1 char:1 + Install-Package Xamarin.Forms -Version 3.6.0.344457 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~ + CategoryInfo:NotSpecified :( :) [Install-Package],Exception + FullyQualifiedErrorId:NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

"Install-Package Xamarin.Forms -Version 3.6.0.344457 Restoring packages for C:\Users\Navid\source\repos\App4\App4\App4.Android\App4.Android.csproj... GET 'System.Numerics.Vectors'&semVerLevel=2.0.0'. Response status code does not indicate success: 404 (Not Found). At line:1 char:1 + Install-Package Xamarin.Forms -Version 3.6.0.344457 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Install-Package], Exception + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand


经过时间:00:00:01.0871186"

Time Elapsed: 00:00:01.0871186"

推荐答案

你好NavidDz,

欢迎来到MSDN论坛。

你什么时候遇到这些错误?调试或构建或部署?我不能在我这边重现这个问题,你能否在这里分享我们的详细步骤,之后我会帮你解决问题的原因。

您是否尝试使用Package Console并运行
Update-Package -Reinstall 或``Update-Package -Reinstall -IgnoreDependencies`"?

Have you try to Use Package Console and run Update-Package -Reinstall or ``Update-Package -Reinstall -IgnoreDependencies`"?

此外,您是否可以仔细检查是否安装了Android SDK?打开开始菜单并输入Android SDK Manager。运行它并确保您已下载构建工具和最近的API之一
级。

期待您的回复

最佳

可能


这篇关于Xamarin.Forms新项目创建有无数错误。 nuget出了什么问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆