Eventually what solved the issue was:
- Clean every project individually (Right click> Clean).
- Rebuild every project individually (Right click> Rebuild).
- Rebuild the startup project.
I guess for some reason, just cleaning the solution had a different effect than specifically cleaning every project individually.
Edit:
As per @maplemale comment, It seems that sometimes removing and re-adding each reference is also required.
Update 2019:
This question got a lot of traffic in the past, but it seems that since VS 2017 was released, it got much less attention.
So another suggestion would be - Update to a newer version of VS (>= 2017) and among other new features this issue will also be solved
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…