1

I'm upgrading a project from NServiceBus 2.6 to 3.0.

We have code similar to the example posted at http://docs.particular.net/samples/hosting/nservicebus-host/#nservicebus-host-v3_x

NServiceBus.Configure.With()
  .Log4Net()
  .DefaultBuilder()
  .XmlSerializer()
  .MsmqTransport()
     .IsTransactional(false)
     .PurgeOnStartup(false)
  .UnicastBus()
     .ImpersonateSender(false)
  .RunCustomAction(() => 
     Configure.Instance.Configurer.ConfigureProperty<MsmqTransport>(mt => mt.Address, "someQueue")
   )
  .CreateBus()
  .Start();

When I try to compile code similar to this with 3.0, it complains that MsmqTransport can't be found. Is there a new way to achieve the same result in 3.0?

Peter
  • 7,792
  • 9
  • 63
  • 94
David Gardiner
  • 16,892
  • 20
  • 80
  • 117

1 Answers1

1

yup you now need to tell it you want to create queues on start if they arent there, take a look here Not creating queues automatically in NServiceBus

or basically use

.Start(() =>Configure.Instance.ForInstallationOn<NServiceBus.Installation.Environments.Windows>().Install());
Community
  • 1
  • 1
undefined
  • 33,537
  • 22
  • 129
  • 198