I have a project which used to build in VS2010 and now won't in VS2012. It's structured as follows:
-Lime49 (Portable Class Library)
-Myproject.Shared (Portable Class Library)
--Myproject.Core (.NET4, references the above two libraries)
The first to build fine on their own, but when I try to build the third, I get The type or namespace 'Lime49' could not be found
and the console shows this:
>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3268: The primary reference "Lime49" could not be resolved because it has an indirect dependency on the framework assembly "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETPortable,Version=v4.0,Profile=Profile2". To resolve this problem, either remove the reference "Lime49" or retarget your application to a framework version which contains "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".
1>C:\<snipped>\MyProject\trunk\MyProject.Shared\Fraction.cs(11,7,11,13): error CS0246: The type or namespace name 'Lime49' could not be found (are you missing a using directive or an assembly reference?)
1>C:\<snipped>\MyProject\trunk\MyProject.Shared\Nutrition\USDA\USDAUtils.cs(5,7,5,13): error CS0246: The type or namespace name 'Lime49' could not be found (are you missing a using directive or an assembly reference?)
1>C:\<snipped>\MyProject\trunk\MyProject.Shared\UrlHelper.cs(6,7,6,13): error CS0246: The type or namespace name 'Lime49' could not be found (are you missing a using directive or an assembly reference?)
========
There are also two projects in my solution which reference both the portable libraries and the .NET 4 library, neither of which builds due to the others refusing to build. I've tried removing and recreating the portable libraries, but they still won't build when referenced from another project.
This is what I have in the framework setup for both Portable Class Libraries:
You state that the 3rd project is failing to build, but it looks like it's actually the 2nd project. It appears, from the warning message, that you are building against a version of Lime49.dll that is actually a .NET 4.x binary and not portable.
Can you make sure you that Lime49 is actually a portable project or that you are not building against an older build of the binary that used to be .NET 4.x?