Everything was rolling along smoothly until a few days ago when UWP all of a sudden stopped building after pulling a new version from VSTS (git) with the errors:
- Cannot resolve Assembly or Windows Metadata file 'Type universe cannot resolve assembly: X.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.'
- Could not copy the file "obj\x86\Debug\MainPage.xbf" because it was not found.
- Could not copy the file "obj\x86\Debug\App.xbf" because it was not found.
- Could not copy the file "obj\x86\Debug\X.Mobile.UWP.xr.xml" because it was not found.
I have a solution structure of the following:
- X.Core (.NET Standard class library)
- X.Mobile (.NET Standard PCL)
- X.Mobile.UWP (UWP specific project)
UWP references Mobile, and Mobile references Core (Core is also referenced by a web API project).
The commit that I pulled from source control did not have any changes to the X.Mobile.UWP .csproj file.
Things I have tried:
- The obligatory clean and rebuild.
- Delete all obj and bin folders for the entire solution.
- Remove and re-add all references in the .UWP project.
- Upgrade Xamarin.Forms to the latest stable (3.1.0.637273).
- Remove and re-add X.Core reference in the X.Mobile project.
- Delete C:\Users\%username%.nuget folder.
- Update Microsoft.NETCore.UniversalWindowsPlatform to the latest stable (6.1.5).
- Change the target version to all available versions - we've been running on build 16299 for several months.
And I've been beating my head against this problem on and off for days now. Android and iOS projects build just fine, which is ironic considering UWP has been our most stable platform. Anyone have any insight?
EDIT: After adding a reference to X.Core directly to the X.Mobile.UWP project, I can compile. This shouldn't be the answer though since UWP never directly references Core.