Skip to content

Failing to Map Message Types From Configuration #3

Open
@chrisbewz

Description

@chrisbewz

Hey, I was triying to setup a rebus bus in my project but after following the guidelines in readme and even the available tests, I failed to obtain success with the following exception

--> RebusConfigurationException("Could not find the message type " + key + ". If you choose to map a specific message type, please ensure that the type is available for Rebus to load. This requires that the assembly can be found in Rebus' current runtime directory, that the type is available, and that any (of the optional) version and key requirements are matched");

After a debug session I noticed that when the code enters the Type.GetType method we have the following on debug view:

image

Here we can see that the requesting assembly passed to type parser is Rebus.Microsoft.Extensions.Configuration, meaning that the search for the type i specified will fail since it does not exists inside your assembly.

If I'm correct this inconvenient happens since Type.GetType calls Assembly.GetExecutingAssembly under your package, leading it to return your assembly and then search for my type name into it, which will always give me a null return.

Any thoughts about this?

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