找不到作为 ServiceHost 指令中的 Service 属性值提供的类型“SomeService" [英] The type 'SomeService', provided as the Service attribute value in the ServiceHost directive could not be found

查看:27
本文介绍了找不到作为 ServiceHost 指令中的 Service 属性值提供的类型“SomeService"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的服务最近开始抛出这个错误.服务构建成功,但是浏览svc文件时弹出这个错误.

My service recently began throwing this error. The service builds successfully, but this error pops up when browsing the svc file.

该服务托管在它一直位于的同一台 IIS 服务器上.所做的唯一更改是通过 NuGet 更新引用.

The service is hosted on the same IIS server it has always been on. The only changes that have been made are updating references via NuGet.

推荐答案

事实证明,服务项目已更改为面向 .Net 4.5,而宿主项目仍面向 .Net 4.0.当我将宿主项目更改为面向 .Net 4.5 时,我得到了预期的 wsdl.

As it turns out, the service project was changed to target .Net 4.5 while the Host project, however, was still targetting .Net 4.0. When I changed the host project to target .Net 4.5, I got the expected wsdl.

这篇关于找不到作为 ServiceHost 指令中的 Service 属性值提供的类型“SomeService"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆