c# - 缺少 System.ServiceModel

标签 c# namespaces

我在 Win7(64 位)上使用 VS2010 express,我正在尝试使用 System.ServiceModel 但我收到一个错误,指出没有 ServiceModel System 命名空间:

The type or namespace name 'ServiceModel' does not exist in the namespace 'System' (are you missing an assembly reference?)

我查看了 \Windows\Microsoft.NET\Framework\v4.0.30319 并且有一些 ServiceModel___.dll 文件,但我不知道我是否缺少某些东西或它们是否已损坏。

有什么建议吗?

谢谢, 与那滩

最佳答案

添加对程序集 System.ServiceModel 的引用。选择项目->添加引用,然后选择程序集名称。

关于c# - 缺少 System.ServiceModel,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5647291/

相关文章:

python - 带有模块导入的命名空间

matlab - 如何将文档添加到 matlab 包中?

php - 我可以在 child 的命名空间中执行父方法吗?

c++ - 跨多个文件的命名空间 "undefined reference"错误

c# - 如何确定服务是否已经添加到 IServiceCollection

c# - 如何在 C# 中从网络上的 IP 访问打印机名称?

c# - c# 类的属性在 visual basic 6.0 中不可见

c# - 使用 String.split() 来提取数字?

c++ - 从 namespace 中提取单个名称

c# - 检查窗口是否在另一个线程上打开的辅助方法