Edit: This is now a confirmed VS bug. |
Occasionally I get this –
– when trying to add a reference from one project to another in VS2010. I’ve no idea what CPS is and what shim object they’re talking about, but I’ve discovered a hack around it.
Suppose you’ve encountered this error when trying to add a reference from projectA to projectB. Albeit cryptic, the message distinguishes an actual project reference (which VS found), from some internal representation or (more likely) satellite object, the shim object – which is missing.
To resolve this discrepancy edit projectA.vcxproj (you can unload projectA, right click it and choose ‘edit’, but notepad would do just fine). Locate and delete the lines that encode the existing reference to projectB:
…
<ProjectReference Include=”..\projectB\projectB.vcxproj”>
<Project>{66d572b3-b340-47dc-94fe-93515aebaaf4}</Project>
</ProjectReference>
…
The discrepancy is fixed. Reload projectA in VS and merrily add the reference to projectB.
Worked like a champ! Thanks for sharing
Thanks! Saved me some time. Don’t know why VS doesn’t just use the one it found.
Ofek, dude, this is unbelievable, I encountered this problem and you were the first result on Google. Small planet I guess!
Costya
P.S. Works perfectly!
Yo Costya!
If I had known it would help *you*, I wouldn’t have written it… :)
Thanks a lot!
good man!
Great, resolved my issue! tnx
Works, thanks! Was produced when I added a project reference A to my project B, then removed the referenced project A from the solution file and added it back after changing the referenced project A’s location.
Thi still happns? 7 yers later??