I have following error in assembly verification process:
[MD] Error: Type:.class [Arl.Terminal.DataServer.DataGates.SparcsAPIDataGate]Arl.Terminal.DataServer.DataGates.SparcsAPIDataGate.Messages.SocketTransport, token:0x02000033, implemented interface:.class [Arl.Terminal.DataServer.DataGates.SparcsAPIDataGate]Arl.Terminal.DataServer.DataGates.SparcsAPIDataGate.Messages.IMessageTransport`2, token:0x0200000b but has no implemented method: Send(Arl.Terminal.DataServer.DataGates.SparcsAPIDataGate.Messages.Objects.EntityMessage) : void, token:0x06000012
- If turn off VerifyAfterObfuscation option on project, above error will not displayed.
- Above error appears even if obfuscation option for Members set to 'None'. So above error with option 'None' to let understand the issue.
Code of IMessageTransport
namespace Arl.Terminal.DataServer.DataGates.SparcsAPIDataGate.Messages
{
internal interface IMessageTransport<TEventArgs, in TMessage>
where TEventArgs : EventArgs
{
void Send(TMessage message);
event EventHandler<TEventArgs> MessageReceived;
}
}
Code for SocketTransport class:
internal class SocketTransport : IDisposable, IMessageTransport<SealedEnvelopeMessageReceivedEventArgs, byte[]>
{
....
public void Send(byte[] message)
{
Send(message, 0, message.Length, TimeOut);
}
....
}
As you can see SocketTransport has byte[] for TMessage, and implements Send(byte[] message) as well. Nothing wrong from coding point of view, and this was successfully compiled.
So I do not know why verification process shows me the error. Could you please clarify this for me.
Moreover it looks that after obfuscation resulted assembly is valid (as I can see in .Net Reflector)
P.S. There are 3 more classes which also implement the interface (see below), but I think they should not affect validation.
internal class MessageTransporter : IMessageTransport <OpenedEnvelopeMessageReceivedEventArgs, OpenedEnvelopeMessage>
internal class MessageMapper : IMessageTransport<EntityMessageReceivedEventArgs, EntityMessage>
internal class MessageSynchronizer : IDisposable, IMessageTransport<EntityMessageReceivedEventArgs, EntityMessage>
I have latest version of console obfuscator 5.8.4.1 (evaluation version). We are going to upgrade from 5.3.0.0, and I'm doing verification with new version.
I can provide by email one assembly and test obfuscation project, if required.