Skip to content

VS2026 + .NET 10 broke SvcUtil System.ObjectModel / ObservableCollection #5869

@Montago

Description

@Montago

I've been using SvcUtil for a period of 2-3 years to generate the WCF Soap client, but after upgrading the project to .NET 10 things have changed / broken...

System.ObjectModel
Visual Studio 2026 reports that the reference to System.ObjectModel should be removed or that it CAN be removed... i'm not sure what the right decision is here.

When using SVCUtil i get this error:

error:

Error: No type could be loaded for the value 'System.Collections.ObjectModel.ObservableCollection`1' passed to the --collectionType option. Ensure that the assembly this type belongs to is specified via the --reference option.

If you would like more help, type "dotnet-svcutil -h"

If i instead use Visual Studio to generate the client, it seems to work, although way slower than SVCUtil... and the following config is generated in my new client:

Configuration:

{
  "ExtendedData": {
    "inputs": [
      "https://urlurlurlurl/Service_Development.svc"
    ],
    "collectionTypes": [
      "System.Collections.Generic.Dictionary`2",
      "System.Collections.ObjectModel.ObservableCollection`1"
    ],
    "enableDataBinding": true,
    "namespaceMappings": [
      "*, ClientCore.ServiceAPI"
    ],
    "references": [
      ".............SharedCore.dll"
    ],
    "sync": true,
    "targetFramework": "net10.0-windows7.0",
    "typeReuseMode": "Specified"
  }
}

So what gives - is SvcUtil supposed to work ? do i need to update something ?

What should i do with System.ObjectModel ?

I guess i'll continue using VS2026 to generate the client for now. it seems to work...

EDIT:

I tried removing System.ObjectModel nuget ref.. and VS2026 is able to create the client.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions