0

I'm currently working on a Multi-Project solution in VisualStudio 2010 which has like 20+ projects in VB.net & C#.net.

Sometimes when I build my project I get like 100 similar errors for example "an object reference is missing" in both c# and vb projects, bare in mind I build my solution couple of times in a day.

But surprisingly when I re-open VisualStudio those errors disappear most of the time, if not they would disappear definitely after I restart my PC (Weird, I know!!!) .

I am really keen to know why this is happening and what reopening VisualStudio has anything to do with build errors?! Also I am really interested to know has anyone experienced such a problem or its only me facing with this problem?

Maryam
  • 53
  • 8
  • 1
    make sure dependencies and references are properly set and that all the parts are ticked to "Build" in configuration manager. beyond that, Clean the solution periodically. – Ňɏssa Pøngjǣrdenlarp Nov 12 '14 at 14:12
  • 1
    Without knowing more about what all the errors are, it would be impossible to conjecture as to what's going on. Sometimes, if there's a problem with a reference (which can occur due to a file lock) that can then be resolved by closing and re-opening. – rory.ap Nov 12 '14 at 14:13
  • Surely you are not quoting the error message correctly. The common message when you have this kind of problem is "are you missing an assembly reference?" You do, you have to target the full version of the .NET Framework, not the Client profile. VS2010 doesn't discover this until you start building the project. And forgets it again when you reopen the solution. – Hans Passant Nov 12 '14 at 15:56

1 Answers1

0

In VS2010 --> Configuration Manager, I have changed the Active solution platform to Mixed Platforms and include all the projects into Build, also selected x86 as the solution Platform.

Haven't had any problem since done these changes.

Plutonix, Thanks for your comment.

Maryam
  • 53
  • 8