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=126.96.36.199, 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 (188.8.131.527273).
- 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?
After adding a reference to X.Core to the X.Mobile.UWP project directly, I can compile. This shouldn't be the answer though since the UWP project never directly references the Core project.