user3470887
user3470887

Reputation:

Cannot reference a class in portable project from UWP project

I am trying to reference a public class in my portable project from the UWP project but it does not allow me to.

Here is my project file structure:

[1]

Here is the class located in the portable project: enter image description here

Here is the class located in the UWP project, you'll notice it cannot access the class from the portable project: enter image description here

And here's what happens when I use the dot operator, the UWP namespace is the only thing that appears.

enter image description here

Any ideas on why I cannot access the public class in the portable project? Or how I can access that class?

Thanks!

Upvotes: 1

Views: 289

Answers (1)

user3470887
user3470887

Reputation:

Thank you Ken Tucker your question shed light on the issue.

Windows 10 was not selected in the targets.

I did the following:

  • Uninstall Xamarin.Forms from the portable project using NuGet
  • Check the Windows 10 box in the targets of the portable project
  • Reinstall Xamarin.Forms to the portable project

Glad it was an easy solution!

Upvotes: 0

Related Questions