UPDATE: I've filed this as an issue on Microsoft Connect if you can reproduce this and/or would love to see this fixed please help vote up the issue over there.
I've been trying to solve this problem for hours now.
Would really appreciate whatever idea/advice you can think of.
First of all, I have 3 files Class.cs
Definitions.cs
and Program.cs
. I've pasted file contents over at http://pastie.org/1049492 for you to try out.
The problem is that, If you have ALL 3 files in the same console application project. The application compiles and runs just fine.
If however, I have Class.cs
and Definitions.cs
in a "library" project which is referenced to from the main console application project which has only the Program.cs
file, compilation fails with:
- Delegate
Act
does not take 2 arguments. - Cannot convert lambda expression to delegate type 'DC.Lib.Produce' because some of the return types in the block are not implicitly convertible to the delegate return type ...
Here is a complete solution with 3 projects -- 1 with all files combined together and another with the definitions put in another project:
http://dl.dropbox.com/u/149124/DummyConsole.zip
I'm using VS2010 RTW Professional edition.