Reputation: 59
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:
I have a solution structure of the following:
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:
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.
Upvotes: 2
Views: 2347
Reputation: 111
I installed NuGet package "NETStandard.Library" and added a reference to all my .Net Standard libraries to my UWP project. This solved the problem for me!
Upvotes: 2
Reputation: 21
I found the solution.
I had the very same problem because I had added a new (.Net Standard 2.0 Class Library) project into my Xamarin.Forms solution.
In short, initially my solution included the following projects:
BackgroundTaskTest (which have all my Views and ViewModels)
BackgroundTaskTest.Android
BackgroundTaskTest.iOS
BackgroundTaskTest.UWP
Suddenly I decided to add a class library named "BackgroundTaskTest.Common" in the same solution folder:
BackgroundTaskTest.Common (new one)
BackgroundTaskTest (which have all my Views and ViewModels)
BackgroundTaskTest.Android
BackgroundTaskTest.iOS
BackgroundTaskTest.UWP
The Android was working fine with it but the UWP project didn't like that new neighbor (which in your case is named "X.Core"). So I moved my classes from that new project to the "BackgroundTaskTest" again and deleted "BackgroundTaskTest.Common" from my solution with all the references and it has started working.
To finalize and make it short, please compare your X.Mobile.csproj file with X.Mobile.Core.csproj file. you will find the issue in the differences. Plus try to check all your dependencies to the X.Core project to make sure they are the same.
Upvotes: 1