Mikael Dúi Bolinder
Mikael Dúi Bolinder

Reputation: 2287

Why am I unable to add my PCL to my Universal App?

I get "Unable to add reference" when I try to add my PCL as reference. The projects are in the same solution. The error message doesn't say anything more.

When I try to add the .dll via Browse... I get the an error telling me that I can not add a PCL targeted at .NET Framework to a project targeting .NETCore.

What's wrong?

Upvotes: 2

Views: 466

Answers (2)

Daniel Plaisted
Daniel Plaisted

Reputation: 16744

It sounds like the library you think is a PCL is not actually a Portable Class Library. It's just a .NET Framework library.

Try creating a new PCL and referencing that. See this MSDN page for information on how to create a PCL.

Upvotes: 1

Mikael Dúi Bolinder
Mikael Dúi Bolinder

Reputation: 2287

The error is that your PCL is targeted at .NET Framework and not .NETCore. .NETCore does only contain a subset of .NET Framework.

To solve this, replace your PCL project with a Class Library (Portable for Universal Apps).

Upvotes: 0

Related Questions