You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Handle Back Compat In Generated Model Operators Param Names #11669
This scenario was encountered when building the latest event grid namespaces library:
C:\Users\jorgerangel\Development\AzureSdk\azure-sdk-for-net\eng\Directory.Build.Common.targets(579,5): error CP0017: Parameter name on member 'Azure.Messaging.EventGrid.Namespaces.AcknowledgeResult.explicit operator Azure.Messaging.EventGrid.Namespaces.AcknowledgeResult(Azure.Response)' changed from 'result' to 'response'.
C:\Users\jorgerangel\Development\AzureSdk\azure-sdk-for-net\eng\Directory.Build.Common.targets(579,5): error CP0017: Parameter name on member 'Azure.Messaging.EventGrid.Namespaces.RejectResult.explicit operator Azure.Messaging.EventGrid.Namespaces.RejectResult(Azure.Response)' changed from 'result' to 'response'.
C:\Users\jorgerangel\Development\AzureSdk\azure-sdk-for-net\eng\Directory.Build.Common.targets(579,5): error CP0017: Parameter name on member 'Azure.Messaging.EventGrid.Namespaces.ReleaseResult.explicit operator Azure.Messaging.EventGrid.Namespaces.ReleaseResult(Azure.Response)' changed from 'result' to 'response'.
C:\Users\jorgerangel\Development\AzureSdk\azure-sdk-for-net\eng\Directory.Build.Common.targets(579,5): error CP0017: Parameter name on member 'Azure.Messaging.EventGrid.Namespaces.RenewLocksResult.explicit operator Azure.Messaging.EventGrid.Namespaces.RenewLocksResult(Azure.Response)' changed from 'result' to 'response'.
C:\Users\jorgerangel\Development\AzureSdk\azure-sdk-for-net\eng\Directory.Build.Common.targets(579,5): error API breaking changes found. If those are intentional, the APICompat suppression file can be updated by rebuilding with '/p:ApiCompatGenerateSuppressionFile=true'
The generated operators are part of the public api shape. We should honor any previous parameter names on these operators.
The C# client emitter generates explicit conversion operators on model types (e.g., AcknowledgeResult, RejectResult, etc.) using a parameter name (response) that differs from the previously published API (result), causing breaking API compatibility errors in the Azure SDK for .NET.
Category: Bug Area: emitter:client:csharp
⚠️ No reproduction provided. A minimal repro would help diagnose this issue.
🔍 Analysis
Affected component: @typespec/http-client-csharp — code generation for model explicit operator methods
Root cause: The generated parameter name for explicit cast operators changed from result to response, breaking API compatibility as detected by APICompat in the Azure SDK for .NET
Impact: Any library using generated operators (e.g., EventGrid Namespaces) that has been previously released will fail API compatibility checks, blocking releases
Fix direction: The emitter should preserve previously established parameter names when generating these operators, or provide a mechanism (e.g., customization hook) to explicitly set them
📝 Suggested next steps
Identify where in the C# emitter these operator parameter names are generated
Determine if this was an intentional rename or a regression
Implement a fix to use stable/consistent parameter names (e.g., always response for Azure.Response conversions, or honor a prior name)
Consider whether existing API suppression files need to be updated as a stopgap
Activity
github-actions commentedon Aug 14, 2026
🎯 Issue Triage
The C# client emitter generates explicit conversion operators on model types (e.g.,
AcknowledgeResult,RejectResult, etc.) using a parameter name (response) that differs from the previously published API (result), causing breaking API compatibility errors in the Azure SDK for .NET.Category: Bug
Area:
emitter:client:csharp🔍 Analysis
@typespec/http-client-csharp— code generation for model explicit operator methodsresulttoresponse, breaking API compatibility as detected byAPICompatin the Azure SDK for .NETAcknowledgeResult,RejectResult,ReleaseResult,RenewLocksResult📝 Suggested next steps
responseforAzure.Responseconversions, or honor a prior name)jorgerangel-msft commentedon Aug 17, 2026
This is a false positive. We can just suppress this in the apicompat baseline as we encounter it.