I have a 3 projects in a solution like such:
我在这样的解决方案中有3个项目:
- WCF Service: Hosts a couple of methods
- Class Library: Acts as a gateway to the WCF service by returning an instance of its Soap client
- WPF Application: Consumes the service methods via the referenced class library
WCF服务:主持几种方法
类库:通过返回其Soap客户端的实例,充当WCF服务的网关
WPF应用程序:通过引用的类库消耗服务方法
Everything was working perfectly...the application was accessing an instance of the soap client through the library and consuming the methods accordingly.
一切都工作得很好......应用程序通过库访问soap客户端的实例并相应地使用方法。
Now I signed my assemblies and everything still compiles and when I add new methods and update the service reference in the library, the new methods come up in the application...but when running the application and try to use a method, a MissingMethodException
is thrown:
现在我签署了我的程序集,所有内容仍然编译,当我添加新方法并更新库中的服务引用时,新方法出现在应用程序中......但是当运行应用程序并尝试使用方法时,MissingMethodException是抛出:
Method not found: 'MusicData.Entities.User DBAccess_Gateway.DBInteraction_Service.DBInteractionGatewayClient.User_Login(System.String, System.String)'.
找不到方法:'MusicData.Entities.User DBAccess_Gateway.DBInteraction_Service.DBInteractionGatewayClient.User_Login(System.String,System.String)'。
This is the line its failing at:
这是它失败的路线:
var user = WSGateway.MR_WebService.User_Login(username.Text, crypto.Encrypt(passphrase.Password));
I think it has something to do with the assemblies (now in the gac because they are signed?) being signed...but why arent the methods are not being found? Are the signed assemblies not being updated correctly now?
我认为它与程序集(现在在gac中,因为它们已签名?)有关,但是为什么这些方法没有找到?签名的程序集现在没有正确更新吗?
1 个解决方案
#1
When you update the service references in your class library, make sure you are creating a new version of the assembly and registering this new version in the GAC, then make sure your WPF app is referencing this new version.
更新类库中的服务引用时,请确保创建新版本的程序集并在GAC中注册此新版本,然后确保您的WPF应用程序引用此新版本。
#1
When you update the service references in your class library, make sure you are creating a new version of the assembly and registering this new version in the GAC, then make sure your WPF app is referencing this new version.
更新类库中的服务引用时,请确保创建新版本的程序集并在GAC中注册此新版本,然后确保您的WPF应用程序引用此新版本。