This project has moved and is read-only. For the latest updates, please go here.

WCF Service Reference Updates Not Working When LinqToTwitter.DLL Registered

Jul 18, 2013 at 8:02 PM
I have a WPF project that uses LinqToTwitter and also has a couple of WCF service references.

My Service Reference settings (Advanced tab) clearly having the Collection type set to System.Collections.Generic.List.

When the LinqToTwitter.DLL is referenced and I update the service reference, my proxy classes no longer have Generic.List's as collections they all change to array's and my proxy code is about twice the size as before.

It's as if the service reference thinks it's an XML Web Service instead of a Windows Communication Foundation service.

For now to make the service update work, I have to delete the LinqToTwitter reference and then update the service references. The proxy classes return back to using List's instead of array's and I can re reference the LinqToTwitter.dll.
Jul 18, 2013 at 9:09 PM

I downloaded the L2TWcfService demo on the Samples page, switched the collection type to List, rebuilt, and then did an Update Service Reference. The collection was still List.

What's the delta between what you're doing?

Jul 18, 2013 at 10:07 PM
The service reference configuration dialog always has the "Collection Type" = "System.Collections.Generic.List". Nothing changes there when using the LinqtoTwitter.dll.

The difference is in the proxy code.

When the "LinqToTwitter.dll" is not referenced and I update the service, the code looks like:

-------------SAMPLE Reference.vb without dll-------------------
Imports System
Imports System.Runtime.Serialization

<System.Runtime.Serialization.DataMemberAttribute()> _
Public Property Retailers() As System.Collections.Generic.List(Of Service.Retailer)

When I have the DLL referenced and I update the service, the code looks like:

-------------SAMPLE Reference.vb with dll-------------------
Imports System.Data

<System.Xml.Serialization.XmlArrayAttribute(IsNullable:=true, Order:=2)> _
Public Property Retailers() As Retailer()

(notice the "Retailers" list changes to an array.
Mar 21, 2014 at 3:17 PM
Has there been any updates that address this issue?
Mar 25, 2014 at 6:40 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.