Particular / NServiceBus.Azure

Transports and storage for Windows Azure
https://docs.particular.net/nservicebus/azure/
Other
10 stars 15 forks source link

We couldn't find a IConfigureTransport implementation for your selected transport: AzureServiceBus #61

Closed danielHalan closed 10 years ago

danielHalan commented 10 years ago

Getting this Error for each EndPoint, when starting in Azure Emulator. Verified that these files exists in Bin folder, NServiceBus.Azure.dll NServiceBus.Hosting.Azure.dll

The Init Contains following,

  Configure.With()
    .DefineEndpointName("xxxxx")
    .AutofacBuilder()
    .DefiningEventsAs(t => t.Namespace != null && t.Namespace.Contains(".Events"))
    .DefiningCommandsAs(t => t.Namespace != null && t.Namespace.Contains(".Commands"))
    .DefiningMessagesAs(t => t.Namespace != null && t.Namespace.Contains(".Messages"))
    .AzureSagaPersister()
    .AzureSubscriptionStorage()
    .AzureConfigurationSource()
    .UseTransport<AzureServiceBus>()
    .UnicastBus()
    .LoadMessageHandlers();
OV2012 commented 10 years ago

i had the same problem with the windowsazure.storage 2.1.0.3. downgrade to the version 2.1.0.0 fixed the problem..

yvesgoeleven commented 10 years ago

This is probably related to a mismatch in runtime dependencies, which fails to load the azure assembly for scanning by the assembly scanner.

Can you set a breakpoint when Typeloadexception is thrown and see if it triggers?

yvesgoeleven commented 10 years ago

Windows Azure Storage has to be 2.1.0.0 indeed, we can't support multiple assembly versions of that assembly (I'm looking into solutions, but none found so far)

danielHalan commented 10 years ago

Still haven't resolved the issue, something I noticed is that the DLL version of Azure Storage 2.1.0.0, in folder packages\WindowsAzure.Storage.2.1.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll is actually 2.1.0.1

and verifying what version you get from NuGet I created a new ClassLibrary and did a Install-Package WindowsAzure.Storage -Version 2.1.0.0

and that is what I got.

Anyone can verify its correct or some issue with NuGet right now.

danielHalan commented 10 years ago

i.e. verify what version of the DLL is in 2.1.0.0 folder.

danielHalan commented 10 years ago

Also here is all external DLLs in the bin folder, and their versions. nsb azure

yvesgoeleven commented 10 years ago

You're looking at file version, that's not important... you need to open it with reflector and look what the assembly version is... that should be 2.1.0.0

yvesgoeleven commented 10 years ago

PS: fileversion on my machine is als 2.1.0.1, you have the correct version, it should be something else...

Do you have any typeloadexceptions in your output window?

danielHalan commented 10 years ago

Nop, only exceptions in Output is A first chance exception of type 'Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironmentException' occurred in Microsoft.WindowsAzure.ServiceRuntime.dll.

just after NServiceBus.Hosting.Azure.dll', Symbols loaded.

danielHalan commented 10 years ago

and the Call Stack is, image

yvesgoeleven commented 10 years ago

We got to look for something else, where did you declare your Init method? If it's on the IConfigureEndpoint implementation can you move it in it's own class? (And don't call With() in that case, but use Configure.Instance....)

danielHalan commented 10 years ago

its 'class EndPointConfig : IConfigureThisEndpoint, IWantCustomInitialization, AsA_Worker {

Hmm... Could you provide an example, as I've used this model on all earlier projects, and don't want to fumble with new issues on the way :)

yvesgoeleven commented 10 years ago

Remove IWantCustomInitialization and the init method from the endpointconfig

And add another class like this:

public class MyConfiguration : INeedCustomInitialization{ Configure.Instance .DefineEndpointName("xxxxx") .AutofacBuilder() .DefiningEventsAs(... etc }

Adding IWantCustomInitialization to the endpointconfig should only be used for setting the assemblies to take into account using With(), but nothing else should be done there as it is to early in the pipeline... (I think it has always been like that, correct me if I'm wrong @andreasohlund )

OV2012 commented 10 years ago

following is my endpointconfig (v.4.1.0). works with no probs now (but of course just with the windowsazure.storage 2.1.0.0 )


  public class EndpointConfiguration : IConfigureThisEndpoint, 
                            AsA_Worker, 
                            UsingTransport, 
                            IWantCustomInitialization
    {
        public void Init()
        {
            Trace.TraceInformation("STARTING............");
            Configure.Transactions.Enable();
            Configure.Serialization.Json();
            Configure.ScaleOut(x => x.UseSingleBrokerQueue());
            Feature.Disable();
            Feature.Enable();
            Feature.Enable();
            Feature.Enable();
            Configure.With()
                     .StructureMapBuilder(ObjectFactory.Container)
                        .AzureDiagnosticsLogger()
                        .AzureSagaPersister()
                        .UseAzureTimeoutPersister()
                     .UnicastBus()
                        .LoadMessageHandlers();
        }
    }   

yvesgoeleven commented 10 years ago

I guess the usingtransport is making the difference here... because you only declare it another part of nsb will pick it up later, but daniel is invoking it directly in the init at which time the assembly scanner may not yet have been fully initialized.

PS: you should also move stuff out of the endpoint config, that's not what it's intended for

OV2012 commented 10 years ago

sorry. do you mean, instead of one config it should be split into two (or more). something like this?


public class EndpointConfiguration : IConfigureThisEndpoint, 
                            AsA_Worker, 
                            UsingTransport, 
                            IWantCustomInitialization
    {
        public void Init()
        {
            Configure.With()
                     .StructureMapBuilder(ObjectFactory.Container)
                        .AzureDiagnosticsLogger()
                        .AzureSagaPersister()
                        .UseAzureTimeoutPersister()
                     .UnicastBus()
                        .LoadMessageHandlers();
        }
    }
    public class ConfigureFeatures : INeedInitialization
    {
        public void Init()
        {
            Configure.Transactions.Enable();
            Configure.Serialization.Json();
            Configure.ScaleOut(x => x.UseSingleBrokerQueue());
            Feature.Disable();
            Feature.Enable();
            Feature.Enable();
            Feature.Enable();
        }
    }

yvesgoeleven commented 10 years ago

Like this:

public class EndpointConfiguration : IConfigureThisEndpoint, 
                        AsA_Worker, 
                        UsingTransport, 
                        IWantCustomInitialization
{
    public void Init()
    {
        Configure.With()
                 .StructureMapBuilder(ObjectFactory.Container);
    }
}

public class ConfigureFeatures : INeedInitialization
{
    public void Init()
    {
        Configure.Transactions.Enable();
        Configure.Serialization.Json();
        Configure.ScaleOut(x => x.UseSingleBrokerQueue());

        Feature.Disable();
        Feature.Enable();
        Feature.Enable();
        Feature.Enable();

        Configure.Instance
                    .AzureDiagnosticsLogger()
                    .AzureSagaPersister()
                    .UseAzureTimeoutPersister()
                 .UnicastBus()
                    .LoadMessageHandlers()
    }
}
OV2012 commented 10 years ago

ok! i got it now:) thank you!

danielHalan commented 10 years ago

Didn't help.

Same error but in, NServiceBus.Hosting.Roles.Handlers.TransportRoleHandler.ConfigureRole(NServiceBus.IConfigureThisEndpoint specifier) Line 23

where it calls Configure.Instance.UseTransport(transportDefinitionType);

transportDefinitionType being 'NServiceBus.AzureServiceBus'

yvesgoeleven commented 10 years ago

Any chance you could send me a repro, so that I can have a look at it?

danielHalan commented 10 years ago

Will extract one NSB Worker to a smaller solution, and can share that one...

danielHalan commented 10 years ago

Looks like I've isolated that issue to MongoDBs registration of Event classes BsonClassMap.RegisterClassMap();

which is executed in the Init() in EndPointConfig, before Building the Container, as its needed for the EventStore.

danielHalan commented 10 years ago

Actually seems as it was not that, creating a new solution that "works" and moving part by part to see when it breaks.

btw, what value should be in "AzureServiceBusQueueConfig.ConnectionString" when running Local Emulator? as "UseDevelopmentStorage=true" doesn't cut it. and can't find any use of it in the VideoStore Samples.

yvesgoeleven commented 10 years ago

There is no local equivalent for the azure servicebus, so you need to create a dev namespace in the cloud

danielHalan commented 10 years ago

Ok.

Still havent been able to resolve the Error, next step is to dig into the NSB Source. been trying to compile the NSB to get the PDB files, but seems as NuGet doesnt update all external packages, would u possibly have a DEBUG version of NSB4.1.1 laying around?

yvesgoeleven commented 10 years ago

The pdb's are in the nuget package

danielHalan commented 10 years ago

Doesnt seem to match, image

yvesgoeleven commented 10 years ago

It doesn't have to, you can change that requirement in VS tools > options > debugging

danielHalan commented 10 years ago

Jepp, those are Disabled, and the Path above is the same as the reference in CSproj.

Also added Source Paths to the "Solution Properties -> Debug Source Files" (C:\dev\NServiceBus-4.1.1\src)

yvesgoeleven commented 10 years ago

Interesting, and I don't have an explanation for it, can you raise this as a separate issue on the nservicebus repo? Maybe the other guys have an idea on what the cause may be

yvesgoeleven commented 10 years ago

PS: send me the repro so that I can have a look at it as well

danielHalan commented 10 years ago

Might be something that its hosted in the Emulator? ie WindowsAzure.ServiceRuntime

danielHalan commented 10 years ago

as Ive stepped thru the NSB code before.. (had the Source Paths, there since then)

yvesgoeleven commented 10 years ago

No, something is off here... I have the same issue now locally, I can load the nservicebus.azure symbols just fine and debug in there... the NSB.Core also says that symbols are loaded in the VS modules windows, but when I open a file from NSB it says that no symbols are loaded for the document

danielHalan commented 10 years ago

Ok, so maybe something wrong with the NSB.Core PDB after all.

Vänligen, Daniel Halan

On Thu, Oct 31, 2013 at 5:08 PM, Yves Goeleven notifications@github.comwrote:

No, something is off here... I have the same issue now locally, I can load the nservicebus.azure symbols just fine and debug in there... the NSB.Core also says that symbols are loaded in the VS modules windows, but when I open a file from NSB it says that no symbols are loaded for the document

— Reply to this email directly or view it on GitHubhttps://github.com/Particular/NServiceBus.Azure/issues/61#issuecomment-27474209 .

danielHalan commented 10 years ago

About that Error, have one (A) Command Handler [Host] working, and then the one that is still not working (B). Gone thru both csproj files making sure they have exactly the same "references" and are pretty much identical a part from their content files.

Also the EndPointConifg and ConfigureFeatures classes are exactly the same in A and B.

also the worth mentioning is that B is a smaller project with less Commands and Handlers.... so at this point would be interesting to see the scanning process and why NSB can't find the 'AzureServiceBus' type... not sure how else to proceed.

yvesgoeleven commented 10 years ago

Can you send me the debug output that you get in visual studio when you start that endpoint?

danielHalan commented 10 years ago

Ok, here it comes, just starting the faulty one,

'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0b77a5c561934e089\mscorlib.dll' 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Halan\ITQ\02.Projects\Xxxxx\02.Projects\System\Xxxxxx_Backend_Cloud\csx\Azure\roles\Itq.Xxxxxx.CommandHandlers.System\base\x64\WaWorkerHost.exe' 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\msshrtmi\v4.0_2.1.0.031bf3856ad364e35\msshrtmi.dll' 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.WindowsAzure.ServiceRuntime\v4.0_2.1.0.031bf3856ad364e35\Microsoft.WindowsAzure.ServiceRuntime.dll' 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0b77a5c561934e089\System.dll' 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.ServiceHosting.Tools.DevelopmentFabric.Runtime\1.0.0.031bf3856ad364e35\Microsoft.ServiceHosting.Tools.DevelopmentFabric.Runtime.dll' 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0b77a5c561934e089\System.Core.dll' 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0b77a5c561934e089\System.Xml.Linq.dll' 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0b77a5c561934e089\System.Xml.dll' 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0b03f5f7f11d50a3a\System.Configuration.dll' 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\System.Web\v4.0_4.0.0.0b03f5f7f11d50a3a\System.Web.dll' Microsoft.WindowsAzure.ServiceRuntime Information: 100 : Role environment . INITIALIZING Microsoft.WindowsAzure.ServiceRuntime Information: 100 : Role environment . INITIALED RETURNED. HResult=0 Microsoft.WindowsAzure.ServiceRuntime Information: 101 : Role environment . INITIALIZED 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\WindowsAzureTelemetryEvents\v4.0_2.1.0.031bf3856ad364e35\WindowsAzureTelemetryEvents.dll' 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\WindowsAzureEventSource\v4.0_2.1.0.031bf3856ad364e35\WindowsAzureEventSource.dll' 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Halan\ITQ\02.Projects\Xxxxx\02.Projects\System\Xxxxxx_Backend_Cloud\csx\Azure\roles\Itq.Xxxxxx.CommandHandlers.System\approot\Itq.Xxxxxx.CommandHandlers.System.dll', Symbols loaded. 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Halan\ITQ\02.Projects\Xxxxx\02.Projects\System\Xxxxxx_Backend_Cloud\csx\Azure\roles\Itq.Xxxxxx.CommandHandlers.System\approot\NServiceBus.dll', Symbols loaded. 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Halan\ITQ\02.Projects\Xxxxx\02.Projects\System\Xxxxxx_Backend_Cloud\csx\Azure\roles\Itq.Xxxxxx.CommandHandlers.System\approot\NServiceBus.Core.dll' 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Halan\ITQ\02.Projects\Xxxxx\02.Projects\System\Xxxxxx_Backend_Cloud\csx\Azure\roles\Itq.Xxxxxx.CommandHandlers.System\approot\NServiceBus.Hosting.Azure.dll', Symbols loaded. 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Halan\ITQ\02.Projects\Xxxxx\02.Projects\System\Xxxxxx_Backend_Cloud\csx\Azure\roles\Itq.Xxxxxx.CommandHandlers.System\approot\NServiceBus.Azure.dll', Symbols loaded. 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Halan\ITQ\02.Projects\Xxxxx\02.Projects\System\Xxxxxx_Backend_Cloud\csx\Azure\roles\Itq.Xxxxxx.CommandHandlers.System\approot\Itq.Xxxxxx.ServiceBus.dll', Symbols loaded. 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Halan\ITQ\02.Projects\Xxxxx\02.Projects\System\Xxxxxx_Backend_Cloud\csx\Azure\roles\Itq.Xxxxxx.CommandHandlers.System\approot\Itq.Xxxxxx.Commands.System.dll', Symbols loaded. 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Halan\ITQ\02.Projects\Xxxxx\02.Projects\System\Xxxxxx_Backend_Cloud\csx\Azure\roles\Itq.Xxxxxx.CommandHandlers.System\approot\Itq.Xxxxxx.dll', Symbols loaded. 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Halan\ITQ\02.Projects\Xxxxx\02.Projects\System\Xxxxxx_Backend_Cloud\csx\Azure\roles\Itq.Xxxxxx.CommandHandlers.System\approot\CommonDomain.dll', Symbols loaded. Microsoft.WindowsAzure.ServiceRuntime Information: 200 : Role entrypoint . CALLING OnStart() A first chance exception of type 'Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironmentException' occurred in Microsoft.WindowsAzure.ServiceRuntime.dll 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Halan\ITQ\02.Projects\Xxxxx\02.Projects\System\Xxxxxx_Backend_Cloud\csx\Azure\roles\Itq.Xxxxxx.CommandHandlers.System\approot\AutoMapper.dll' 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Halan\ITQ\02.Projects\Xxxxx\02.Projects\System\Xxxxxx_Backend_Cloud\csx\Azure\roles\Itq.Xxxxxx.CommandHandlers.System\approot\CommonDomain.Core.dll', Symbols loaded. 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Halan\ITQ\02.Projects\Xxxxx\02.Projects\System\Xxxxxx_Backend_Cloud\csx\Azure\roles\Itq.Xxxxxx.CommandHandlers.System\approot\CommonDomain.Persistence.dll', Symbols loaded. 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Halan\ITQ\02.Projects\Xxxxx\02.Projects\System\Xxxxxx_Backend_Cloud\csx\Azure\roles\Itq.Xxxxxx.CommandHandlers.System\approot\CommonDomain.Persistence.EventStore.dll', Symbols loaded. 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Halan\ITQ\02.Projects\Xxxxx\02.Projects\System\Xxxxxx_Backend_Cloud\csx\Azure\roles\Itq.Xxxxxx.CommandHandlers.System\approot\EventStore.dll', Symbols loaded. 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0b77a5c561934e089\System.Data.dll' 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\System.Transactions\v4.0_4.0.0.0b77a5c561934e089\System.Transactions.dll' 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Halan\ITQ\02.Projects\Xxxxx\02.Projects\System\Xxxxxx_Backend_Cloud\csx\Azure\roles\Itq.Xxxxxx.CommandHandlers.System\approot\EventStore.Persistence.MongoPersistence.dll', Symbols loaded. 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Halan\ITQ\02.Projects\Xxxxx\02.Projects\System\Xxxxxx_Backend_Cloud\csx\Azure\roles\Itq.Xxxxxx.CommandHandlers.System\approot\EventStore.Serialization.Json.dll', Symbols loaded. 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Halan\ITQ\02.Projects\Xxxxx\02.Projects\System\Xxxxxx_Backend_Cloud\csx\Azure\roles\Itq.Xxxxxx.CommandHandlers.System\approot\Ionic.Zip.dll' 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Halan\ITQ\02.Projects\Xxxxx\02.Projects\System\Xxxxxx_Backend_Cloud\csx\Azure\roles\Itq.Xxxxxx.CommandHandlers.System\approot\Itq.Xxxxxx.Messages.dll', Symbols loaded. 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Halan\ITQ\02.Projects\Xxxxx\02.Projects\System\Xxxxxx_Backend_Cloud\csx\Azure\roles\Itq.Xxxxxx.CommandHandlers.System\approot\Itq.Xxxxxx.Commands.Tenant.dll', Symbols loaded. 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Halan\ITQ\02.Projects\Xxxxx\02.Projects\System\Xxxxxx_Backend_Cloud\csx\Azure\roles\Itq.Xxxxxx.CommandHandlers.System\approot\Itq.Xxxxxx.Commands.Tenant.Integration.Exchange.dll', Symbols loaded. 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Halan\ITQ\02.Projects\Xxxxx\02.Projects\System\Xxxxxx_Backend_Cloud\csx\Azure\roles\Itq.Xxxxxx.CommandHandlers.System\approot\Itq.Xxxxxx.Core.dll', Symbols loaded. 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Halan\ITQ\02.Projects\Xxxxx\02.Projects\System\Xxxxxx_Backend_Cloud\csx\Azure\roles\Itq.Xxxxxx.CommandHandlers.System\approot\Itq.Xxxxxx.Domain.dll', Symbols loaded. 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Halan\ITQ\02.Projects\Xxxxx\02.Projects\System\Xxxxxx_Backend_Cloud\csx\Azure\roles\Itq.Xxxxxx.CommandHandlers.System\approot\MongoDB.Bson.dll' 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Halan\ITQ\02.Projects\Xxxxx\02.Projects\System\Xxxxxx_Backend_Cloud\csx\Azure\roles\Itq.Xxxxxx.CommandHandlers.System\approot\MongoDB.Driver.dll' 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Halan\ITQ\02.Projects\Xxxxx\02.Projects\System\Xxxxxx_Backend_Cloud\csx\Azure\roles\Itq.Xxxxxx.CommandHandlers.System\approot\Microsoft.WindowsAzure.Diagnostics.dll' A first chance exception of type 'System.Reflection.ReflectionTypeLoadException' occurred in mscorlib.dll 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0b77a5c561934e089\System.ServiceModel.dll' 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0b77a5c561934e089\System.Windows.Forms.dll' 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0b03f5f7f11d50a3a\System.Drawing.dll' 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'Raven.Abstractions' 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Halan\ITQ\02.Projects\Xxxxx\02.Projects\System\Xxxxxx_Backend_Cloud\csx\Azure\roles\Itq.Xxxxxx.CommandHandlers.System\approot\NServiceBus.ObjectBuilder.Autofac.dll', Symbols loaded. A first chance exception of type 'System.Reflection.ReflectionTypeLoadException' occurred in mscorlib.dll Microsoft.WindowsAzure.ServiceRuntime Information: 202 : Role entrypoint . COMPLETED OnStart() The thread 'Role Initialization Thread' (0x311c) has exited with code 0 (0x0). A first chance exception of type 'System.Threading.WaitHandleCannotBeOpenedException' occurred in mscorlib.dll Microsoft.WindowsAzure.ServiceRuntime Information: 203 : Role entrypoint . CALLING Run() A first chance exception of type 'System.Reflection.ReflectionTypeLoadException' occurred in mscorlib.dll 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0b77a5c561934e089\System.Runtime.Serialization.dll' Microsoft.WindowsAzure.ServiceRuntime Verbose: 500 : Role instance status check starting Microsoft.WindowsAzure.ServiceRuntime Verbose: 502 : Role instance status check succeeded: Ready 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'Raven.Client.Lightweight' Microsoft.WindowsAzure.ServiceRuntime Verbose: 500 : Role instance status check starting Microsoft.WindowsAzure.ServiceRuntime Verbose: 502 : Role instance status check succeeded: Ready A first chance exception of type 'System.InvalidOperationException' occurred in NServiceBus.Core.dll Microsoft.WindowsAzure.ServiceRuntime Critical: 1 : Unhandled Exception: System.InvalidOperationException: We couldn't find a IConfigureTransport implementation for your selected transport: AzureServiceBus at NServiceBus.TransportReceiverConfig.CreateTransportConfigurer(Type transportDefinitionType) in :line 0 at NServiceBus.TransportReceiverConfig.UseTransport(Configure config, Type transportDefinitionType, String connectionStringName) in :line 0 at NServiceBus.Hosting.Roles.Handlers.TransportRoleHandler.ConfigureRole(IConfigureThisEndpoint specifier) in c:\BuildAgent\work\ba77a0c29cee2af1\src\NServiceBus.Hosting.Azure\Roles\Handlers\TransportRoleHandler.cs:line 23 at NServiceBus.Hosting.Roles.RoleManager.ConfigureBusForEndpoint(IConfigureThisEndpoint specifier) in :line 0 at NServiceBus.Hosting.GenericHost.PerformConfiguration() in :line 0 at NServiceBus.Hosting.GenericHost.Start() in :line 0 at NServiceBus.Hosting.Azure.RoleEntryPoint.Run() in c:\BuildAgent\work\ba77a0c29cee2af1\src\NServiceBus.Hosting.Azure\RoleHost\Entrypoint.cs:line 73 at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRoleInternal() at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRole() at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.b2() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() Unhandled exception occured: System.InvalidOperationException: We couldn't find a IConfigureTransport implementation for your selected transport: AzureServiceBus at NServiceBus.TransportReceiverConfig.CreateTransportConfigurer(Type transportDefinitionType) in :line 0 at NServiceBus.TransportReceiverConfig.UseTransport(Configure config, Type transportDefinitionType, String connectionStringName) in :line 0 at NServiceBus.Hosting.Roles.Handlers.TransportRoleHandler.ConfigureRole(IConfigureThisEndpoint specifier) in c:\BuildAgent\work\ba77a0c29cee2af1\src\NServiceBus.Hosting.Azure\Roles\Handlers\TransportRoleHandler.cs:line 23 at NServiceBus.Hosting.Roles.RoleManager.ConfigureBusForEndpoint(IConfigureThisEndpoint specifier) in :line 0 at NServiceBus.Hosting.GenericHost.PerformConfiguration() in :line 0 at NServiceBus.Hosting.GenericHost.Start() in :line 0 at NServiceBus.Hosting.Azure.RoleEntryPoint.Run() in c:\BuildAgent\work\ba77a0c29cee2af1\src\NServiceBus.Hosting.Azure\RoleHost\Entrypoint.cs:line 73 at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRoleInternal() at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRole() at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.b2() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() System.Transactions Critical: 0 : http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/UnhandledUnhandled exceptionRdRuntimeSystem.InvalidOperationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089We couldn't find a IConfigureTransport implementation for your selected transport: AzureServiceBus at NServiceBus.TransportReceiverConfig.CreateTransportConfigurer(Type transportDefinitionType) in :line 0 at NServiceBus.TransportReceiverConfig.UseTransport(Configure config, Type transportDefinitionType, String connectionStringName) in :line 0 at NServiceBus.Hosting.Roles.Handlers.TransportRoleHandler.ConfigureRole(IConfigureThisEndpoint specifier) in c:\BuildAgent\work\ba77a0c29cee2af1\src\NServiceBus.Hosting.Azure\Roles\Handlers\TransportRoleHandler.cs:line 23 at NServiceBus.Hosting.Roles.RoleManager.ConfigureBusForEndpoint(IConfigureThisEndpoint specifier) in :line 0 at NServiceBus.Hosting.GenericHost.PerformConfiguration() in :line 0 at NServiceBus.Hosting.GenericHost.Start() in :line 0 at NServiceBus.Hosting.Azure.RoleEntryPoint.Run() in c:\BuildAgent\work\ba77a0c29cee2af1\src\NServiceBus.Hosting.Azure\RoleHost\Entrypoint.cs:line 73 at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRoleInternal() at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRole() at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.&lt;StartRole&gt;b2() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()System.InvalidOperationException: We couldn't find a IConfigureTransport implementation for your selected transport: AzureServiceBus at NServiceBus.TransportReceiverConfig.CreateTransportConfigurer(Type transportDefinitionType) in :line 0 at NServiceBus.TransportReceiverConfig.UseTransport(Configure config, Type transportDefinitionType, String connectionStringName) in :line 0 at NServiceBus.Hosting.Roles.Handlers.TransportRoleHandler.ConfigureRole(IConfigureThisEndpoint specifier) in c:\BuildAgent\work\ba77a0c29cee2af1\src\NServiceBus.Hosting.Azure\Roles\Handlers\TransportRoleHandler.cs:line 23 at NServiceBus.Hosting.Roles.RoleManager.ConfigureBusForEndpoint(IConfigureThisEndpoint specifier) in :line 0 at NServiceBus.Hosting.GenericHost.PerformConfiguration() in :line 0 at NServiceBus.Hosting.GenericHost.Start() in :line 0 at NServiceBus.Hosting.Azure.RoleEntryPoint.Run() in c:\BuildAgent\work\ba77a0c29cee2af1\src\NServiceBus.Hosting.Azure\RoleHost\Entrypoint.cs:line 73 at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRoleInternal() at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRole() at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.&lt;StartRole&gt;b2() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() 'WaWorkerHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\11.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll'

yvesgoeleven commented 10 years ago

Remember I said 2 days ago, https://github.com/Particular/NServiceBus.Azure/issues/61#issuecomment-27290892, it's probably a typeloadexception

And look, you have a few occurences of:

A first chance exception of type 'System.Reflection.ReflectionTypeLoadException' occurred in mscorlib.dll

Enable a visual studio breakpoint when that is thrown, look at the LoaderExceptions property and you know which assembly reference is wrong or missing at runtime.

danielHalan commented 10 years ago

Yeah, and I actually did a Search for it in Output window, must have misspelled, and ofcourse it was the Windows Azure Storage 2.1.0.3 it was complaining about, after a search I found in the app.config redirecting to 2.1.0.3, even that the reference was to 2.1.0.1 .. so OV2012 was right from the begining.

yvesgoeleven commented 10 years ago

I told a few days on twitter that I really don't like bindingredirects for 2 reasons

Sadly enough they seem to become very common in the nuget age.. dll hell is not solved yet, but I'm glad you sorted your part out :)

danielHalan commented 10 years ago

Could not agree more... and thanks for all the support to find the solution.

mdenny-visaglobal commented 10 years ago

We had the same issue migrating from MSMQ to AzureServiceBus, which was due to us not scanning the AzureServiceBus Assembly during configuration.

ie. Configure.With(new [] { Assembly.GetExecutingAssembly(), typeof(MyCommand).Assembly, typeof(AzureServiceBus).Assembly })...

That fixed this error message for us. HTH.