I recently migrated and re-tartgeted a solution from VS 2010 and .NET 4.0 to VS 2012 and .NET 4.5. However now all of a sudden and randomly VS 2012 reports almost all cross-project references as:
"The referenced component X could not be found" (warning)
Now, I know for a fact that this is not correct. Firstly because I can see the assembly in the directory set for the assembly reference and secondly because when I bring up the "Add Reference" dialog the warning suddenly goes away and so do the yellow warning icons on the assembly reference
Doing a full rebuild clears the warning and then it will stay that way for a while and then randomly the same warnings show again.
Has anyone seen this? What can be the cause and how can I fix it?
Edit: I was not seeing this weird behaviour in VS 2010
Edit: The warnings are reported for references to other projects in the same solution.
It is caused by parallel build. Setting "maximum number of parallel project builds" to 1 will resolve the issue.
See also: http://social.msdn.microsoft.com/Forums/en-US/msbuild/thread/a9ac83eb-14b3-4bd2-bc51-7c2ae7363c46
I just had similar issue with 31 projects and it turned out to be framework version mismatch - you should check framework version dependencies.
In my case, 4.0 library failed to build because it was dependent on 4.5 libraries and it was failing to resolve types from the 4.5 libraries.
Seen this behaviour sometimes in VS 2008, and 2010 after project version upgrade. Usually removing and adding references again fixes issues.
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