WCF extensions without including the assembly version

Posted by Marc Gravell on Stack Overflow See other posts from Stack Overflow or by Marc Gravell
Published on 2009-11-11T16:33:31Z Indexed on 2010/04/23 23:53 UTC
Read the original article Hit count: 306

Filed under:
|
|
|

As discussed here, I'm trying to add a WCF endpoint-extension; I've got it working, but I need to include the full assembly details:

<extensions>
    <behaviorExtensions>
        <add name="protobuf" type="ProtoBuf.ServiceModel.ProtoBehaviorExtension, protobuf-net, Version=1.0.0.275, Culture=neutral, PublicKeyToken=257b51d87d2e4d67"/>
    </behaviorExtensions>
</extensions>

What I would like to do (to avoid issues when updating etc, especially for samples) is to include just the names:

<add name="protobuf" type="ProtoBuf.ServiceModel.ProtoBehaviorExtension, protobuf-net"/>

(which is what you might expect from standard assembly-naming conventions)

However, if I do this, I get a big error:

Parser Error Message: An error occurred creating the configuration section handler for system.serviceModel/behaviors: Extension element 'protobuf' cannot be added to this element. Verify that the extension is registered in the extension collection at system.serviceModel/extensions/behaviorExtensions.

Is it possible (and if so: how) to add an extension without having to specify the assembly-version?

© Stack Overflow or respective owner

Related posts about wcf

Related posts about assemblies