Wcf – Reference.cs is empty when generating service client

visual studio 2010visual studio 2012wcf

I am trying to setup a VS2010 project in VS2012 and have a problem with generating the service references. Somewhere it fails and Reference.cs becomes empty.

I looked at this:
WCF Service Reference generates an empty reference.cs due to DuplexBinding
But since the code is working for VS2010 I would prefer not to change anything.

I have tried this:
Sometimes adding a WCF Service Reference generates an empty reference.cs

Then it appears code in Reference.cs but some functions is missing so the project doesn´t work. Is there any known problems when doing this? I am totally stuck and need some ideas.

Thanks in advance!
/David

Best Answer

In the Add Service Reference dialog , click on 'Advanced', there uncheck the option 'Reuse reference types in this assembly'

enter image description here

I often encounter this problem, this workaround works most of the times.