I thought I would pass this on, as I have oft' seen this problem reported,
with no solution.
The problem is that in a solution containing several projects, the compiler
will sometimes report a selection of errors that are quite false. For
example, on one build the error "... cannot handle event because they do not
have the same signature" might be reported. Build again and the problem goes
away. Change something unrelated and the problem reappears. Restarting the
IDE can sometimes cause the problem to vanish temporarily, but on a
subsequent rebuild it comes back.
Another error that can be reported incorrectly is that an assembly requires
a reference to another assembly when it already has a reference.
The problem can also be characterised by errors being reported when you try
to debug (F5). The "Errors were reported. Do you wish to continue?" dialog
is displayed and in the task list you can see a list of unexpected errors.
Click No, and the dialog closes, and the errors vanish.
It turns out that the fault lies with the compiler. It sometimes gets
confused when a project in a solution references the assembly created by
another project in the same solution. It doesn't recognise that the
reference to the assembly is the same as the project (I hope that makes
sense).
The good news is that there is a workaround.
If you need to reference an assembly created by another project in your
solution, add it as a 'Project Reference'. You will see the difference if
you go to the Project menu, and open the Add Reference dialog.
The third tab is Projects. Click on it and you will see a list of all the
projects in your solution.
If you add your reference from this dialog, rather than browsing to a
directory for it, you will no longer get the problem. Make sure you don't
mix file references and project references in the same solution, though, as
this will likely make the problem worse.
There a couple of beneficial side-effects too. Your solution will build
quicker, as the compiler will not build assemblies that haven't changed (I
know it should do this anyway, but it doesn't).
The other advantage is that if you try to navigate to a definition
(Shift+F2) that is in another project within your solution, the IDE will
take you there instead of opening up the object browser window.
Anyway, I hope this helps someone.
Charles
[The reason for the error, and workaround are courtesy of Microsoft, who
were extremely helpful - as always - in diagnosing the problem with me over
the last few weeks]