Nuget Packages'dll will not be copied into output folder of Xamarin.iOS project in NETStandard 1.4

Hi.

As in the question title. I'm trying to migrate all my packages and projects of Xamarin.Forms projects to NETStandard 1.4 and currently using Xamarin.Forms 2.3.5.256-pre6 since it's the only one support NETStandard 1.4 right now.

The problem is: when installing any packages in the PCL project (NETStandard 1.4), the dll of the PCL projects will not be copied to output folder of the iOS Project, which cause the error like: System.IO.FileNotFoundException: Could not load file or assembly xxx or one of its dependencies. Which is not case in the old PCL projects

I've attached a sample project to reproduce the bug:

  • Run the XamarinFormsDependencyTest.iOS and it will throw this bug:
    System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies.

  • Run the XamarinFormsDependencyTest2.iOS and it will run fine although the PCL still using Newtonsoft.Json.

  • Check the ouput folder of both iOS Project and you see will the difference, the Newtonsoft.Json reference is existed in the second project, which is not existed in the first one.

I've tested in both VS 2015 Update 3 and VS 2017
So how do you i resolve this properyl. I don't want to install Newtonsoft.Json package directly in iOS project just to solve this error.

Thanks

Sign In or Register to comment.