Skip to content

Generated ClientSettings Don't Compile if BindCore is Customized #10904

Description

@jorgerangel-msft

If the protected override void BindCore(IConfigurationSection section) of the generated ClientSettings type is moved to custom code, we still generate a partial implementation but the generated xml docs reference a type with a missing import statement:

using System.ClientModel.Primitives;
using System.Diagnostics.CodeAnalysis;

namespace Azure.Storage.Queues
{
    /// <summary> Represents the settings used to configure a <see cref="QueueClient"/> that can be loaded from an <see cref="IConfigurationSection"/>. </summary>
    [Experimental("SCME0002")]
    public partial class QueueClientSettings : ClientSettings
    {
        /// <summary> Gets or sets the Options. </summary>
        public QueueClientOptions Options { get; set; }
    }
}

The using Microsoft.Extensions.Configuration; is not being added despite us referencing IConfigurationSection in the generated xml doc

Metadata

Metadata

Labels

bugSomething isn't workingemitter:client:csharpIssue for the C# client emitter: @typespec/http-client-csharp

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions