0

I have a ASP.NET MVC project and I need to use Message Queues (MSMQ as I understand it) to send messages from the client to my server, but I can't seem to add System.Messages to a c# class. I get an error when trying to add the namespace:

enter image description here

I searched around and found that I don't have the system.messaging.dll (or system.messages.dll) in my project. This has to be possible, as its even in the documentation.

EDIT: I found another guy online who is having the exact same problem. I followed the answer in that link, but the Refrence Manager dosen't seem to have a system.messaging or messages dll.

not found

How do I download the necessary dlls?

MARS
  • 499
  • 1
  • 9
  • 25
  • Did you try looking in the Browse node instead of COM within the Reference Manager? – mason May 13 '20 at 14:09
  • @mason I just tried, but it says `No items found` – MARS May 13 '20 at 14:11
  • Do you *have* to use MSMQ? I haven't worked with it much, but my understanding is that it's very old and difficult to work with. Have you considered using the [MassTransit](https://masstransit-project.com/) library, perhaps combined with RabbitMQ or Azure Service Bus? By building on top of MassTransit, you can easily swap out transports and it has a lot more of the plumbing built into it to have a production ready app - and good documentation. – mason May 13 '20 at 14:13
  • @mason I think I can use Azure Service Bus. Does it work well with message queues? How do I use it? – MARS May 13 '20 at 14:15
  • You'd have to create the bus connections in Azure (you can do so via the [web portal](https://portal.azure.com/)), then retrieve the shared key. From there you plop it into the MassTransit configuration. Like I said, it's [well documented](https://masstransit-project.com/usage/transports/azure-sb.html). I suggest you give that a shot, follow the documentation. If you get stuck then perhaps a separate question explaining what you've tried and what's not working would be appropriate. – mason May 13 '20 at 14:18
  • Thanks, @mason, I'll get to work setting it up – MARS May 13 '20 at 14:21

1 Answers1

0

So @mason regrettably, I was trying to do something that isn't really done anymore. This question was outdated before I even asked it.

MARS
  • 499
  • 1
  • 9
  • 25