I was handed a .zip file with a moderately complex project structure and which had been ripped out of subversion. The code is referencing Microsoft.CSharp, as in:
As you can see, visual studio was missing the actual DLL.
I don’t normally think about where these things are physically located. I dug around here, created a new console app (after following reading through this little exchange) and found the DLL on my environment at: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\Microsoft.CSharp.dll.
This actually gave rise to an issue with visual studio complaining that I was targeting the wrong environment, “Microsoft.CSharp.dll or one of its dependencies requires a later version of .NET blah blah blah”. In the end, I remove the reference altogether and that seems to have solved the issue.
It’s just another one of those oddly difficult things to figure out and the sort of thing that is less interesting than an argument with your wife over whether there are too many women’s coats in the closet
Follow me on Twitter at http://www.twitter.com/pagalvin