2011-12-26 55 views
4

我找不到使用System.Runtime.Remoting.Channels.Tcp;以及无法使用.net Remoting

什么是错的,这里是我的平台不支持它

我使用VS 2010的专业在Windows XP SP3

C:\VISUAL_STUDIO_2010\C#\Remoting_Server\Remoting_Server\Program.cs(13,31): error CS0246: The type or namespace name 'TcpServerChannel' could not be found (are you missing a using directive or an assembly reference?)

+2

Remoting是老的技术,已被取代 - 你应该看看使用WCF的新应用程序。 – Oded 2011-12-26 09:34:02

回答

4

确保你在你的项目中System.Runtime.Remoting参考。确保您的使用包含:

using System.Runtime.Remoting.Channels.Tcp; 
+0

是的我添加了对'System.Runtime.Remoting'的引用,它的工作原理谢谢 – vivek 2011-12-26 11:00:52

1

只是在你的项目中 添加引用System.Runtime.Remoting,然后你可以使用的名称空间

using System.Runtime.Remoting.Channels.Tcp; 

没有任何错误