Missing assembly error that I can't figure out

J

Jeff Green

Hello all,

Can anyone explain why I keep getting the following error?

C:\Project\CalcServer\CalcServer.cs(4): The type or namespace name
'Http' does not exist in the class or namespace
'System.Runtime.Remoting.Channels' (are you missing an assembly
reference?)

I have the following using statements at the begining of the file.

using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Http;

It's copied directly from an example Programming C# (O'Reilly).

I've also noticed that 'System.Runtime.Remoting.Channels.Tcp' doesn't
exist either.

Thanks...Jeff
 
G

Gary

The "using" statements are merely a convenience to eliminate typing long
namespace strings, they do not pull in the requisite assemblies. You must
add the assembly references by going to the Project menu and choosing Add
Reference.
Hope this helps,
Gary
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top