I cannot add a solution reference to a portable class library to my Windows Phone 8.0 apps in Visual Studio 2012. When I try to add it by browsing to the .DLL, then it works. I receive this error when I try:
I am able to add a reference to the portable class library in my web service project, so the library itself appears to be OK.
I have tried:
Regardless of what combination of those things I have tried, attempting to add a solution reference to a portable class library in a Windows Phone project gives me that error.
Well, it turns out that this error message was actually completely useless in what the issue actually was.
The issue was caused by a version mismatch between the PCL and Windows Phone project. I finally realized that VS 2012 only lets you target Windows Phone 8.0 for phone apps, and not 8.1, and I was selecting Windows Phone 8.1 as one of the target frameworks in my PCL. In order to allow me to add a solution reference to the PCL, I had to add "Windows Phone Silverlight 8.0" as one of the target frameworks. Now it works fine.
I have no idea why that error message is the one that I was receiving, but hopefully this can help someone else out if they run into it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With