I have the Portable Library Tools beta 2 installed in Visual Studio 2010. I created a new library and set it to be compatible with .Net 4.0.3 and Silverlight 5. I then tried to add a reference to the PCL project from a Silverlight Web project. I got the message:
Unable to add a reference to project “PortableClassLibrary”. The
current project’s target framework is not one of or compatible with
the target frameworks of Portable Library project
“PortableClassLibrary”.A Portable Library project’s target frameworks can be changed via the
Library tab in the project’s properties.
I don’t want to change the PCL target, I want to change the target of the Web project. I went the the Properties > Application tab and the Target framework is “.Net Framework 4.0”. There wasn’t an option for 4.0.3. I checked and realised that the update for 4.0.3 (KB2600211) wasn’t installed on this machine, so I installed it and rebooted, as requested.
There still isn’t a 4.0.3 option in VS and I’m still getting the message. Any ideas?
EDIT
VS 2010 SP1 is already installed.
To target .NET Framework 4.0.3, you need to install KB2600214, and then change the Project Properties -> Application -> Target Framework to .NET Framework 4.0.3.