Skip to content

Primitives nuget library reports missing properties #5808

@BryanAldrich

Description

@BryanAldrich

The ServiceModel.Primitives library (8.1.2 at last check) has a lib and ref copy of the DLLs. I have noted that these are missing some properties (in my case, OperationContext.InstanceContext).

The MS docs https://learn.microsoft.com/en-us/dotnet/api/system.servicemodel.instancecontext?view=net-9.0-pp for InstanceContext says that it includes an OperationContext property for .net8/9, however, that property cannot be found by the compiler (msbuild or dotnet).
To make things more confusing, the ILSpy plugin for visual studio decompiles the lib/ copy of the DLL, yet VS uses the ref/ copy to compile.

To Reproduce

  1. This small project targets net472 and net9. It does not compile despite the docs saying it should.

test.zip

Expected behavior
Compilation.

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