添加服务参考未出现 [英] Add Service Reference not appearing

查看:27
本文介绍了添加服务参考未出现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Windows Phone 7 Silverlight 项目中,我有一个对 WCF 服务的服务引用.今天早上当我打开项目时,突然发现我的 WCF 服务的命名空间是未知的.解决方案资源管理器中的更新服务参考"选项不存在,因此我删除了服务参考,打算重新添加它.但是添加服务引用"选项也不存在.走了.消失了.

In a Windows Phone 7 Silverlight project, I had a service reference to a WCF service. This morning when I opened up the project, suddenly the namespaces for my WCF service were unknown. The option for "Update Service Reference" in Solution Explorer was not there, so I deleted the Service Reference with the intent of re-adding it. But the option for "Add Service Reference" is also not there. Gone. Disappeared.

关闭并重新打开解决方案.重新启动 VS2010 Ultimate.没有骰子.有人遇到过这个吗?

Closed and re-opened the solution. Restarted VS2010 Ultimate. No dice. Anyone run across this?

推荐答案

我一开始不知道这是怎么发生的,所以我们还不知道原因,但我找到了解决问题的方法.

I don't know how this happends in the first place, so we don't know the cause yet, but I found a solution to the problem.

在记事本或文本板或类似的东西中打开您的 *.csproj 文件.找到它有标签的地方.用这个替换该标签:

Open your *.csproj file in Notepad or Textpad or something like that. Find where it has the tag. Replace that tag with this:

<ProjectTypeGuids>{14822709-B5A1-4724-98CA-57A101D1B079};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

关闭并重新打开项目,添加服务引用的选项将可用.

Close and re-open the project and the option to add service references will be usable.

这篇关于添加服务参考未出现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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