Skip to content

Commit f60e558

Browse files
committed
WCF APIs removed
1 parent 9a5a3b3 commit f60e558

File tree

3 files changed

+66
-0
lines changed

3 files changed

+66
-0
lines changed

docs/core/compatibility/8.0.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,12 @@ If you're migrating an app to .NET 8, the breaking changes listed here might aff
155155
| [PublishedTrimmed projects fail reflection-based serialization](serialization/8.0/publishtrimmed.md) | Behavioral change |
156156
| [Reflection-based deserializer resolves metadata eagerly](serialization/8.0/metadata-resolving.md) | Behavioral change |
157157

158+
## WCF client
159+
160+
| Title | Type of change |
161+
|------------------------------------------------------------------------------------------------------|----------------------------|
162+
| [Removal of WCF APIs with a `configurationName` parameter](wcf-client/8.0/configurationname-apis.md) | Source/binary incompatible |
163+
158164
## Windows Forms
159165

160166
| Title | Type of change |

docs/core/compatibility/toc.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,10 @@ items:
326326
href: serialization/8.0/publishtrimmed.md
327327
- name: Reflection-based deserializer resolves metadata eagerly
328328
href: serialization/8.0/metadata-resolving.md
329+
- name: WCF client
330+
items:
331+
- name: Removal of WCF APIs with a `configurationName` parameter
332+
href: wcf-client/8.0/configurationname-apis.md
329333
- name: Windows Forms
330334
items:
331335
- name: Anchor layout changes
@@ -1982,6 +1986,10 @@ items:
19821986
href: visualbasic.md
19831987
- name: WCF Client
19841988
items:
1989+
- name: .NET 8
1990+
items:
1991+
- name: Removal of WCF APIs with a `configurationName` parameter
1992+
href: wcf-client/8.0/configurationname-apis.md
19851993
- name: "6.0"
19861994
items:
19871995
- name: .NET Standard 2.0 no longer supported
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: "Removal of WCF APIs with a `configurationName` parameter"
3+
description: Learn about the breaking change in .NET 8 where the WCF APIs that accept a `configurationName` parameter have been removed.
4+
ms.date: 11/13/2024
5+
ai-usage: ai-assisted
6+
ms.custom: https://github.com/dotnet/docs/issues/43111
7+
---
8+
9+
# Removal of WCF APIs with a `configurationName` parameter
10+
11+
The WCF APIs that accept either a `configurationName` parameter or an `endpointConfigurationName` parameter have been removed in .NET 8. These APIs were previously used in .NET Framework to load client configuration parameters such as the `Binding` configuration and the `EndpointAddress` details.
12+
13+
## Version introduced
14+
15+
.NET 8 GA
16+
17+
## Previous behavior
18+
19+
The removed APIs were previously suppressed from IntelliSense suggestions. Using any of the removed APIs resulted in a <xref:System.PlatformNotSupportedException> being thrown.
20+
21+
## New behavior
22+
23+
The APIs no longer exist. If you upgrade to .NET 8 and recompile your code, it will fail.
24+
25+
## Type of breaking change
26+
27+
This change is a [binary incompatible](../categories.md#binary-incompatible) and [source incompatible](../categories.md#source-incompatible) change.
28+
29+
## Reason for change
30+
31+
These APIs were never implemented on .NET and any calls to these APIs previously resulted in a run-time exception.
32+
33+
## Recommended action
34+
35+
Remove any usage of these APIs.
36+
37+
If you're using a WCF client generated by the `svcutil` utility from the .NET Framework SDK, the generated client will have constructors that call base class constructors that have been removed. The base class will be either <xref:System.ServiceModel.ClientBase`1> or <xref:System.ServiceModel.DuplexClientBase`1>. The generated constructors were unusable on .NET as they resulted in a `PlatformNotSupportedException` being thrown.
38+
39+
- If you're multi-targeting .NET Framework and .NET and are still using these generated constructors on .NET Framework, you'll need to conditionally compile their usage.
40+
- If you're not using these constructors, you can delete them from the generated code. Alternatively, consider regenerating the client using `dotnet-svcutil`.
41+
42+
## Affected APIs
43+
44+
- <xref:System.ServiceModel.NetHttpBinding.%23ctor(System.String)>
45+
- <xref:System.ServiceModel.NetTcpBinding.%23ctor(System.String)>
46+
- <xref:System.ServiceModel.ChannelFactory.ApplyConfiguration(System.String)?displayProperty=fullName>
47+
- <xref:System.ServiceModel.ChannelFactory.InitializeEndpoint(System.String,System.ServiceModel.EndpointAddress)?displayProperty=fullName>
48+
- <xref:System.ServiceModel.ChannelFactory`1.%23ctor(System.String)>
49+
- <xref:System.ServiceModel.ChannelFactory`1.%23ctor(System.String,System.ServiceModel.EndpointAddress)><xref:System.ServiceModel.DuplexChannelFactory`1.%23ctor(System.ServiceModel.InstanceContext,System.String)>
50+
- <xref:System.ServiceModel.DuplexChannelFactory`1.%23ctor(System.ServiceModel.InstanceContext,System.String,System.ServiceModel.EndpointAddress)><xref:System.ServiceModel.DuplexClientBase`1.%23ctor(System.ServiceModel.InstanceContext,System.String)>
51+
- <xref:System.ServiceModel.DuplexClientBase`1.%23ctor(System.ServiceModel.InstanceContext,System.String,System.ServiceModel.EndpointAddress)>
52+
- <xref:System.ServiceModel.DuplexClientBase`1.%23ctor(System.ServiceModel.InstanceContext,System.String,System.String)>

0 commit comments

Comments
 (0)