I have created a basic wcf service nothing more complicated than helloworld. I have tested it with both WCF Test Client and my own client app and it works fine.
我已经创建了一个基本的wcf服务,而不是helloworld。我已经使用WCF测试客户端和我自己的客户端应用程序测试了它,它工作正常。
So with that I wanted to add a method to it to see if I might try something a bit more complicated. However now when I try to debug using the WCF Test Client my new method doesn't show up the only method that is there is the original one. So I tried removing the original method completely and test again and it is still there and my new method is still missing.
所以,我想为它添加一个方法,看看我是否可以尝试一些更复杂的东西。但是现在当我尝试使用WCF测试客户端进行调试时,我的新方法没有显示唯一的原始方法。所以我尝试完全删除原始方法并再次测试,它仍然存在,我的新方法仍然缺失。
So it is apparent that my modified service isn't updating whatever the WCF Test Client is using to test against.
因此很明显,我修改的服务不会更新WCF测试客户端用于测试的任何内容。
Where are the temporary files that VS 2008 generates to allow the WCF Test Client to work. Or could someone explain to me how to refresh the service when I modify it.
VS 2008生成的临时文件在哪里以允许WCF测试客户端工作。或者有人可以向我解释当我修改它时如何刷新服务。
Thanks, Josh
3 个解决方案
#1
Did you build your modified service? If you don't build it, then there's nothing to update.
您是否构建了修改后的服务?如果你不构建它,那么没有什么可以更新。
#2
Check to make sure you new service and you service interface are properly decorated with the OperationContract
attribute.
检查以确保您使用OperationContract属性正确修饰了新服务和服务界面。
Update: Take a look at the WCF Test Client, and see if you can get the operation to show up using this?
更新:看看WCF测试客户端,看看是否可以使用此操作显示该操作?
#3
I tried both of the solution above without success though I appreciate both answers as they are very good things to check.
我尝试了上述两种解决方案都没有成功,但我很欣赏这两个答案,因为它们是非常好的检查方法。
The answer I found that ended up fixing the problem was to simply update the version number on the project. I don't know why this fixed it, but after I did my new methods showed up and have continued to show up for each build since.
我发现最终修复问题的答案是简单地更新项目的版本号。我不知道为什么会修复它,但是在我完成之后我的新方法出现并且继续出现在每个构建之后。
It would appear that this might be a bug in VS 2008.
看起来这可能是VS 2008中的一个错误。
#1
Did you build your modified service? If you don't build it, then there's nothing to update.
您是否构建了修改后的服务?如果你不构建它,那么没有什么可以更新。
#2
Check to make sure you new service and you service interface are properly decorated with the OperationContract
attribute.
检查以确保您使用OperationContract属性正确修饰了新服务和服务界面。
Update: Take a look at the WCF Test Client, and see if you can get the operation to show up using this?
更新:看看WCF测试客户端,看看是否可以使用此操作显示该操作?
#3
I tried both of the solution above without success though I appreciate both answers as they are very good things to check.
我尝试了上述两种解决方案都没有成功,但我很欣赏这两个答案,因为它们是非常好的检查方法。
The answer I found that ended up fixing the problem was to simply update the version number on the project. I don't know why this fixed it, but after I did my new methods showed up and have continued to show up for each build since.
我发现最终修复问题的答案是简单地更新项目的版本号。我不知道为什么会修复它,但是在我完成之后我的新方法出现并且继续出现在每个构建之后。
It would appear that this might be a bug in VS 2008.
看起来这可能是VS 2008中的一个错误。