简体   繁体   中英

Can't add reference to Xamarin app in my UWP project

I have a Xamarin app for which I want to add a UWP project, so I created the UWP project following these instructions . However when I reach step 5 to add a reference, I get this error:

Unable to add a reference to project 'MyProjectName'

where MyProjectName is the name of my main Xamarin app.

How can I add the required reference so I can proceed with setting up the UWP app?

Just add references from other projects by going right click references >> add references from other projects >> select target project >> Add all .NET required assembly. If packages not available to add.

else

Create new Xamarin.Forms project (select UWP,iOS, Android) or create new empty solution and add projects

Oh, I figured it out - I was adding a reference to the wrong project! I thought I was adding a reference to the Xamarin project but I was actually adding a reference to the Web API project which was .NET Framework, therefore that is not valid.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM