Reputation: 2287
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
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
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