Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin.iOS build error MSB4096: "ReferenceCopyLocalPaths" does not define a value for metadata "ResolvedFrom"

After updating Visual Studio 2017 (including Xamarin) I get an error on several Nuget packages like:

...\MSBuild\Xamarin\Xamarin.Apple.Sdk.targets(29,5): error MSB4096: The item "....nuget\packages\HockeySDK.Xamarin\4.1.3\lib\Xamarin.iOS10\HockeySDK.dll" in item list "ReferenceCopyLocalPaths" does not define a value for metadata "ResolvedFrom". In order to use this metadata, either qualify it by specifying %(ReferenceCopyLocalPaths.ResolvedFrom), or ensure that all items in this list define a value for this metadata.

The error only occurs when building for Xamarin.iOS. Building for Android works fine.

Does anybody know how to fix this?

like image 379
Marcel W Avatar asked May 11 '17 10:05

Marcel W


1 Answers

I was able to fix this for my own solution by modifying the Xamarin.Apple.Sdk.targets file located at C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin. I added the ReferenceCopyLocalPaths qualification to lines 31 and 35.

Line 31

<FrameworkFile>$([System.String]::new('%(ReferenceCopyLocalPaths.ResolvedFrom)').StartsWith('$(FrameworkPathOverride)').ToString().ToLowerInvariant())</FrameworkFile>

Line 35

'%(ReferenceCopyLocalPaths.ResolvedFrom)' != 'ImplicitlyExpandDesignTimeFacades' And

like image 200
Jeremy Avatar answered Nov 15 '22 08:11

Jeremy