更新Xamarin.Forms NuGet软件包后,“无法从程序集中加载... ...任务." [英] After updating Xamarin.Forms NuGet package, "The ... task could not be loaded from the assembly..."

查看:168
本文介绍了更新Xamarin.Forms NuGet软件包后,“无法从程序集中加载... ...任务."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Visual Studio 2017中处理Xamarin.Forms项目,并且刚刚将NuGet包从Xamarin.Forms.2.2.0.31更新为Xamarin.Forms.2.3.4.247.

I'm working on a Xamarin.Forms project in Visual Studio 2017, and just updated the NuGet package from Xamarin.Forms.2.2.0.31 to Xamarin.Forms.2.3.4.247.

这样做之后,当我尝试运行该应用程序时,在Visual Studio控制台中出现以下错误:

After doing so, when I try to run the app, I get the following error in my Visual Studio console:

无法从程序集C:\ Workspaces \ OmniChannel \ Dev \ Mobile \ NativeApp \ Features \ F6173-I18n \ packages \ Xamarin.Forms.2.2加载"Xamarin.Forms.Build.Tasks.FixedCreateCSharpManifestResourceName"任务. 0.31 \ build \ portable-win + net45 + wp80 + win81 + wpa81 + MonoAndroid10 + MonoTouch10 + Xamarin.iOS10 \ Xamarin.Forms.Build.Tasks.dll.无法加载文件或程序集'file:///C:\ Workspaces \ OmniChannel \ Dev \ Mobile \ NativeApp \ Features \ F6173-I18n \ packages \ Xamarin.Forms.2.2.0.31 \ build \ portable-win + net45 + wp80 + win81 + wpa81 + MonoAndroid10 + MonoTouch10 + Xamarin.iOS10 \ Xamarin.Forms.Build.Tasks.dll'或其依赖项之一.该系统找不到指定的文件.确认声明正确,程序集及其所有依赖项均可用,并且任务包含实现Microsoft.Build.Framework.ITask的公共类. StoreFulfillment.Core

The "Xamarin.Forms.Build.Tasks.FixedCreateCSharpManifestResourceName" task could not be loaded from the assembly C:\Workspaces\OmniChannel\Dev\Mobile\NativeApp\Features\F6173-I18n\packages\Xamarin.Forms.2.2.0.31\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Build.Tasks.dll. Could not load file or assembly 'file:///C:\Workspaces\OmniChannel\Dev\Mobile\NativeApp\Features\F6173-I18n\packages\Xamarin.Forms.2.2.0.31\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Build.Tasks.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. StoreFulfillment.Core

这告诉我它正在寻找旧Xamarin.form版本("packages/Xamarin.Forms.2.2.0.31")的packages文件夹中.

That tells me it's looking in the packages folder for the old Xamarin.form version ("packages/Xamarin.Forms.2.2.0.31").

问题:到底是什么在试图使用旧参考,我该如何对其进行更新?

QUESTION: What exactly is trying to use the old reference, and how do I update it?

推荐答案

我认为您应该删除<对于.csproj中的旧Xamarin版本,请导入Project =".... \ packages \>.有时在更新Nuget时并未将其删除.

I think you should remove < Import Project="....\packages\ > for old Xamarin version in .csproj. Sometimes it wasn't removed when you update Nuget.

这篇关于更新Xamarin.Forms NuGet软件包后,“无法从程序集中加载... ...任务."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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