错误:Xamarin.Forms目标已多次导入 [英] Error:Xamarin.Forms targets have been imported multiple times

查看:188
本文介绍了错误:Xamarin.Forms目标已多次导入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几个小时前,我的解决方案取得了成功,但是之后出现错误"Xamarin.Forms目标已多次导入".我整整一个星期都在努力.

a few hours ago, my solution just builds success, but after that it has error "Xamarin.Forms targets have been imported multiple times." I have struggled with that a whole week.

我在这里的项目:

提交我的项目

我根本没有看到任何多个xamarin.forms.

I didn't see any multiple xamarin.forms at all.

推荐答案

这可能是因为对NuGet软件包使用PackageReference的原因,而一个简单的修复方法正等待着您.

This can be because of the move to using PackageReference for your NuGet packages and a simple fix awaits you.

1.关闭Visual Studio并导航到文件资源管理器"中的解决方案".删除隐藏的.vs文件夹.

1.Close Visual Studio and navigate to the Solution in File Explorer Delete the hidden .vs folder .

2.进入每个受影响的项目子文件夹并删除以下文件; project_name.nuget.props和project_name.nuget.targets.

2.Go into each affected project sub folder and delete the following files; project_name.nuget.props and project_name.nuget.targets .

3.在Visual Studio中打开解决方案,执行清理并重建".

3.Open the solution in Visual Studio, do a Clean and Rebuild.

这篇关于错误:Xamarin.Forms目标已多次导入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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