Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
# Steps to reproduce
Include Autofac nuget in a Xamarin.Forms project and build iOS project.
# Expected behavior
Project builds successfully.
# Actual behavior
iOS project build fails with error:
The item "C:\Users\...\.nuget\packages\Autofac\4.5.0\lib\netstandard1.1\Autofac.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. ... C:\Program Files (x86)\MSBuild\Xamarin\Xamarin.Apple.Sdk.targets 29
# Supplemental info (logs, images, videos)
Downgrading Xamarin VS to 4.4 resolves the issue.
# Test environment (full version information)
Visual Studio 2015 Update 3
Project enabled for Nuget 3
See the issue https://bugzilla.xamarin.com/show_bug.cgi?id=56205
@Ruben Buniatyan: That appears to be a private bug. If it contains any useful solutions could you reproduce them here? Thanks.
Well, the solution is not that useful, but at least, I was able to run the project. I just commented out _ResolveAssemblies target in Xamarin.Apple.Sdk.targets. I'm not sure about side effects though.
Created attachment 22091 [details]
A test project to reproduce the issue
I get a similar message with AutoMapper.dll. I was unable to recreate the issue in a test solution sadly.
The item "C:\Users\...\.nuget\packages\AutoMapper\6.0.2\lib\netstandard1.3\AutoMapper.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. UI.XamarinForms.iOS
*** Bug 56205 has been marked as a duplicate of this bug. ***
## Off-site cross-referencing for bookkeeping
## Possible temporary workaround
Deleting the project.json file from the App1 iOS app project in the test case from Comment 4 allows the project to build successfully. For users who have the option to convert their iOS app projects away from using project.json for NuGet packages, this could be a way forward for the moment.
## Confirmation testing results
- Deleting the project.json file from the App1 iOS app project allows the solution to build successfully.
- A simplified test case where ClassLibrary1 only calls `typeof(System.IO.Compression.ZipArchive)` (for example) and has the Newtonsoft.Json and System.ValueTuple packages removed is still sufficient to hit the issue.
- The unmodified test case from Comment 4 build successfully in Visual Studio on Mac.
- I was also able to hit the problem in a new test case created from scratch. I added a project.json file to an iOS app project and then referenced a .NET Standard library that called `typeof(System.IO.Compression.ZipArchive)`.
## Steps followed to test
1. Ensure Visual Studio 2017 has the ".NET Core cross-platform development" workload installed.
2. Attempt to build the attached test case from Comment 4 in the "Debug|iPhoneSimulator" configuration.
## Regression status: Regression between the 15.1 Release and the 15.2 Release
> BAD: Xamarin.VisualStudio 126.96.36.1993 (c871575) + Xamarin.iOS 10.10.0.33 (d15-2: 3e5ac5ff) + Mono 188.8.131.52 (9667aa6) + VS 2017 version 15.2
> GOOD: Xamarin.VisualStudio 184.108.40.206 (3f99c5a) + Xamarin.iOS 10.8.0.175 (d15-1: a04678c2) + Mono 4.8.1 (22a39d7) + VS 2017 version 15.1
(Note: To test with the 15.1 Release, I added `<DebugType>Full</DebugType>` to the ClassLibrary1.csproj since the Xamarin 15.1 Release did not yet support portable .pdb debugging symbols.)
## Testing environment info (brief)
Xamarin.VisualStudio 220.127.116.113 (c871575)
Microsoft Visual Studio Enterprise 2017
Version 15.2 (26430.6) Release
Microsoft .NET Framework
Windows 10 (64-bit) Version 1607 (OS Build 14393.1198)
US English locale, US Eastern time zone
Xamarin.iOS 10.10.0.33 (d15-2: 3e5ac5ff)
Mono 18.104.22.168 (2017-02/9667aa6)
Xcode 8.3, Build version 8E162
US English locale, US Eastern time zone
Created attachment 22182 [details]
Example diagnostic build output
Unfortunately, removing project.json is not an option when referencing .NET Standard libs from Xamarin projects as Xamarin projects still use the same old .csproj format and project.json is a must in this case.
I found this link to be a temporary workaround.
However, the path to the "Xamarin.Apple.Sdk.targets" for VS2015 is located here: 'C:\Program Files (x86)\MSBuild\Xamarin'
The aforementioned link was the path for VS2017. I tried to upgrade to VS2017, but that's another disastrous story.
So far this appears to have fixed the 'ReferenceCopyLocalPaths' issue, although not sure about what may be lurking from having modified the .targets file.
## Verification status: verified fixed with Xamarin.VisualStudio 22.214.171.1245 (70f1268) "Xamarin 15.2.2 release"
GOOD: Xamarin.VisualStudio 126.96.36.1995 (70f1268)
BAD: Xamarin.VisualStudio 188.8.131.523 (c871575)
This is the expected result based on the overlap of this bug with the symptoms from Bug 56457, Comment 2, and the corresponding fixes from Bug 56457, Comment 6.
## Fix location information for internal bookkeeping (from Bug 56457, Comment 6)
Fixed in 15.2.2: 846ca8f70ebf376d7b41c136afbbccd90a581d74
Fixed in master: 2fce8f00f71c75df56a7eb499fe9d5422ac84020