简体   繁体   English

C#项目没有实现WCF的更新

[英]C# project doesnt realize the updates from WCF

I have a WCF webservice and another c# project. 我有一个WCF Web服务和另一个c#项目。 I added the WCF webservice to my project to do some processes. 我将WCF Web服务添加到我的项目中以执行某些过程。 But I changed a function's return type in webservice, then tried to update the webservice from the project, it still sees the old return type. 但我在webservice中更改了函数的返回类型,然后尝试从项目更新web服务,它仍然看到旧的返回类型。

I deleted the webservice reference from my project and re-added back into the project, it still sees the old return type. 我从项目中删除了webservice引用并重新添加回项目,它仍然看到旧的返回类型。 Where does it cache these information? 它在哪里缓存这些信息?

If you are running through IIS, sometimes this can hold onto the dll. 如果您正在通过IIS运行,有时这可以保持在DLL上。

Here is everything i can think of that I'd try 以下是我能想到的一切,我会尝试

  1. Backup 备用
  2. Delete bin/obj folders in both projects 删除两个项目中的bin / obj文件夹
  3. Restart IIS 重启IIS
  4. Rebuild WCF project 重建WCF项目
  5. Client project - Right click on the reference -> "Update References" and rebuild client project (possibly do the delete and re-add as you have done). 客户端项目 - 右键单击​​引用 - >“更新引用”并重建客户端项目(可能会执行删除并重新添加)。
  6. On a couple of occasions (in older versions), I've even had to close and re-open VS. 有几次(在旧版本中),我甚至不得不关闭并重新打开VS.

That can be a really frustrating issue on the odd occasion you hit it. 在你遇到它的奇怪场合,这可能是一个非常令人沮丧的问题。 HTH. HTH。

检查Web服务URL的Web.Config条目。

When you remove the service and add it again those downloaded classes to your system should be deleted however if for some reason you recon they are there then do the following check: Now go to the service reference folder and expand it. 当您删除该服务并再次添加时,应删除那些下载的类到您的系统,但是如果由于某种原因您进行了重新调查,那么请执行以下检查:现在转到服务参考文件夹并展开它。 All the necessary classes and definition for constructing the proxy reside in the following folder: ...\\Service References... 构建代理的所有必要类和定义都位于以下文件夹中:... \\ Service References ...

显示所有文件按钮

You can check whether this folder gets emptied. 您可以检查此文件夹是否已清空。 When you re-add them you can check the reference file yourself to see whether new definitions are available. 重新添加它们时,您可以自己检查参考文件,以查看是否有新的定义。

服务参考

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM