wcf icon indicating copy to clipboard operation
wcf copied to clipboard

Why I pull the lastet version for System.ServiceModel.Primitives, but it missed some codes in the dll?

Open Theoshen opened this issue 2 years ago • 5 comments

Hello, I just added package like <PackageVersion Include="System.ServiceModel.Primitives" Version="6.0.0" /> in Directory.Packages.props and add reference like <PackageReference Include="System.ServiceModel.Primitives" /> in my .csproj but for the Message class in the dll:

#region Assembly System.ServiceModel.Primitives, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// /home/theo/.nuget/packages/system.servicemodel.primitives/6.0.0/ref/net6.0/System.ServiceModel.Primitives.dll
#endregion

using System.Runtime.Serialization;
using System.Xml;

namespace System.ServiceModel.Channels
{
    public abstract class Message : IDisposable
    {
        protected Message();

        public abstract MessageProperties Properties { get; }
        public virtual bool IsFault { get; }
        public virtual bool IsEmpty { get; }
        public abstract MessageHeaders Headers { get; }
        public MessageState State { get; }
        public abstract MessageVersion Version { get; }
        protected bool IsDisposed { get; }

        public static Message CreateMessage(MessageVersion version, string action, XmlDictionaryReader body);
        public static Message CreateMessage(MessageVersion version, string action, BodyWriter body);
        public static Message CreateMessage(MessageVersion version, string action);
        public static Message CreateMessage(MessageVersion version, string action, object body, XmlObjectSerializer serializer);
        public static Message CreateMessage(MessageVersion version, string action, object body);
        public static Message CreateMessage(XmlDictionaryReader envelopeReader, int maxSizeOfHeaders, MessageVersion version);
        public static Message CreateMessage(MessageVersion version, string action, XmlReader body);
        public static Message CreateMessage(XmlReader envelopeReader, int maxSizeOfHeaders, MessageVersion version);
        public void Close();
        public MessageBuffer CreateBufferedCopy(int maxBufferSize);
        public T GetBody<T>(XmlObjectSerializer serializer);
        public T GetBody<T>();
        public string GetBodyAttribute(string localName, string ns);
        public XmlDictionaryReader GetReaderAtBodyContents();
        public override string ToString();
        public void WriteBody(XmlDictionaryWriter writer);
        public void WriteBody(XmlWriter writer);
        public void WriteBodyContents(XmlDictionaryWriter writer);
        public void WriteMessage(XmlDictionaryWriter writer);
        public void WriteMessage(XmlWriter writer);
        public void WriteStartBody(XmlDictionaryWriter writer);
        public void WriteStartBody(XmlWriter writer);
        public void WriteStartEnvelope(XmlDictionaryWriter writer);
        protected virtual void OnBodyToString(XmlDictionaryWriter writer);
        protected virtual void OnClose();
        protected virtual MessageBuffer OnCreateBufferedCopy(int maxBufferSize);
        protected virtual T OnGetBody<T>(XmlDictionaryReader reader);
        protected virtual string OnGetBodyAttribute(string localName, string ns);
        protected virtual XmlDictionaryReader OnGetReaderAtBodyContents();
        protected abstract void OnWriteBodyContents(XmlDictionaryWriter writer);
        protected virtual void OnWriteMessage(XmlDictionaryWriter writer);
        protected virtual void OnWriteStartBody(XmlDictionaryWriter writer);
        protected virtual void OnWriteStartEnvelope(XmlDictionaryWriter writer);
        protected virtual void OnWriteStartHeaders(XmlDictionaryWriter writer);
    }
}

I missed those two methods:

        public static System.ServiceModel.Channels.Message CreateMessage(System.ServiceModel.Channels.MessageVersion version, System.ServiceModel.FaultCode faultCode, string reason, string action) { return default; }
        public static System.ServiceModel.Channels.Message CreateMessage(System.ServiceModel.Channels.MessageVersion version, System.ServiceModel.FaultCode faultCode, string reason, object detail, string action) { return default; }

I have deleted my local nuget packages and then re-downloaded.

Theoshen avatar Aug 16 '23 07:08 Theoshen

@imcarolwang can you please add the contract to reference assembly, and add unit test from .NET framework? (we probably already have some tests).

HongGit avatar Aug 16 '23 21:08 HongGit

Same problem is reported by #5166, the fix is merged but not released yet.

imcarolwang avatar Aug 18 '23 08:08 imcarolwang

@imcarolwang So when is the next most recent release?

Theoshen avatar Aug 23 '23 06:08 Theoshen

Hello @imcarolwang Are there any updates?

Theoshen avatar Sep 05 '23 08:09 Theoshen

Hello @HongGit , @mconnew, do you have updates about the upcoming release date?

imcarolwang avatar Sep 05 '23 08:09 imcarolwang