I've solved that.
Empty reference was due to some problems with ambiguous types. When I fixed it, reference.cs file generated well.
So, solution is to look not only at errors, but at warnings too. I have found there all information what I need for my problem. Happy codding