2011-12-26 56 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; 

沒有任何錯誤