Click to See Complete Forum and Search --> : MSMQ - 'using System.Messaging' dont exist?


Chriss688Sub
September 3rd, 2002, 04:22 PM
I started a simple C# console to test MSMQ stuff, following MSDN example I start by includding

using System;
using System.Messaging;

I get the error 'Messaging does not exist in System namespace'

But it is documented and everything. What am I missing?

thanks,

GG

Arild Fines
September 4th, 2002, 08:35 AM
You have to reference the System.Messaging.dll. From VS.NET, right click on References, and find System.Messaging.dll in the list. On the commandline:

csc /r:System.Messaging.dll MyFile.cs

Chriss688Sub
September 4th, 2002, 01:47 PM
Thank you for your clear answer. I figured it out searching around.

I have another MSMQ question do,

I use "BeginReceive" for Asynch messages, but how can I stop the process between messages.

The "EndReceive" member takes a parameter for completion of a received message, but what if I wish to "pause" for a few minutes the message reception; do I have to wait for a message to come in?

It does not make sense, and "EndReceive" will throw an exception if I pass a bad (empty) argument.

Thanks,

CS