找不到 TcpChannel
TcpChannel could not be found
我正在学习有关 .NET 远程处理的实验室教程,为此我需要创建 TcpChannel 对象。为此,我添加了 using System.Runtime.Remoting 命名空间,但它仍然给我一个错误 The type or namespace name 'TcpChannel' could not be found(是否缺少 using 指令或程序集引用? )
我正在使用 Visual Studio 2015 社区版。我不知道是什么导致了这个问题。我什至用谷歌搜索了它。这是我的代码
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.Remoting;
namespace RemotingServer
{
class Program
{
static void Main(string[] args)
{
TcpChannel channel = new TcpChannel(8001);
}
}
}
TcpChannelclass位于System.Runtime.Remoting.Channels.Tcp,所以你必须得到using
那个。还要检查您是否在项目中引用了 System.Runtime.Remoting.dll。
我正在学习有关 .NET 远程处理的实验室教程,为此我需要创建 TcpChannel 对象。为此,我添加了 using System.Runtime.Remoting 命名空间,但它仍然给我一个错误 The type or namespace name 'TcpChannel' could not be found(是否缺少 using 指令或程序集引用? )
我正在使用 Visual Studio 2015 社区版。我不知道是什么导致了这个问题。我什至用谷歌搜索了它。这是我的代码
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.Remoting;
namespace RemotingServer
{
class Program
{
static void Main(string[] args)
{
TcpChannel channel = new TcpChannel(8001);
}
}
}
TcpChannelclass位于System.Runtime.Remoting.Channels.Tcp,所以你必须得到using
那个。还要检查您是否在项目中引用了 System.Runtime.Remoting.dll。