Search code examples
portable-class-librarywin-universal-app

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?


Solution

  • 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).