Error while converting of SIlverlight 3.0 Projects with WCF Proxies

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives

While converting of SIlverlight 3.0 applications to implemented in Visual Studio 2008 to Visual Studio 2010 (and Silverlight 4.0) you will experience few problems if your Silverlight project(s) use WCF.

Error message will in this case look like:

Error    1    YourType' is an ambiguous reference between ‘Namespace1.YourType’ and ‘Namespace2.YourType’

This happen if the SIlverlight project contains WCF Web Service reference with option ”Reuse Types in other assemblies”. Somehow conversion wizard of VS2010 ignores this option and recreates all types.

To solve the problem, click the proxy generated code node located under Service References in the project and select Configure Service Reference.

image

Ensure that Reuse Types is clicked and press ok. This will automatically remove double created references from generated code.

image


Posted Apr 22 2010, 09:44 AM by Damir Dobric
developers.de is a .Net Community Blog powered by daenet GmbH.