After upgrading VS 2008 C# project to VS 2010 project, its not building and fail with error “The type 'ABC.Class1' is defined in an assembly that is not referenced. You must add a reference to assembly 'XYZ.Test1'

lf the projects were building fine in VS 2008 but after upgrade to VS 2010 project it’s not building and fail with error “The type 'ABC.Class1' is defined in an assembly that is not referenced. You must add a reference to assembly 'XYZ.Test1, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'”

One important thing to check that the assemblyinfo.cs doesnot contain [assembly:CLSComplaint(false)]

If it contains CLSComplaint (false) then comment it out  as if CLSComplaint is not in the code then the default value is false so removing it would not cause any difference in the code and the code should build fine.