0
votes

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.

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

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

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?

1
I would perform a clean all and double checked that the contents of the obj directories are clean and then do a rebuild all.SushiHangover
How did you update the nuget package? Please check the assembly path in the References. And delete everything in the package, bin, obj folder. Then start up VS again and rebuild your project, check if it works fine.Leo Liu-MSFT
Also look for additional <Import> elements (maybe even <UsingTask> elements) in your csproj file that may be left over since Xamarin.Forms installs build tasks as well..Martin Ullrich
Can I just delete my .csproj file? If I then build, will it be recreated correctly?jbyrd

1 Answers

5
votes

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