Skip to content

BasicHttpSecurity.Message missing in NuGet package #4694

Closed
@NKnusperer

Description

@NKnusperer

Describe the bug
The BasicHttpSecurity.Message property is not accessible when consuming System.ServiceModel.Http via NuGet but the implementation exist in the code base:

To Reproduce
Given this .csproj:

<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <OutputType>Exe</OutputType>
        <TargetFramework>net5.0</TargetFramework>
    </PropertyGroup>
    <ItemGroup>
        <PackageReference Include="System.ServiceModel.Http" Version="4.9.0-preview1.21220.1" />
    </ItemGroup>
</Project>

and this code:

using System.ServiceModel;

namespace TestApp
{
    class Program
    {
        static void Main(string[] args)
        {
            var basicHttpsBinding = new BasicHttpsBinding(BasicHttpsSecurityMode.TransportWithMessageCredential);
            basicHttpsBinding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName;
        }
    }
}

when trying to compile (Windows 10):
Program.cs(10,40): error CS1061: 'BasicHttpsSecurity' does not contain a definition for 'Message' and no accessible extension method 'Message' accepting a first argument of type 'BasicHttpsSecurity' could be found (are you missing a using directive or an assembly reference?)

Additional context
The reference assembly (system.servicemodel.http\4.9.0-preview1.21220.1\ref\netcore50\System.ServiceModel.Http.dll) is missing the stub for this property and the type itself (BasicHttpMessageSecurity).

When digging into system.private.servicemodel\4.9.0-preview1.21220.1\lib\netstandard2.0\System.Private.ServiceModel.dll they exist.

No idea whats going on here. Maybe an issue with the build system when generating the reference assembly ?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions