原的来服务用WCF写的现在转到 .NET5,原来没有问题的代码出问题了
代码
this.pModule = (Aw.Y4.Svc.ApplicationService.ApplicationService)mmmm;
异常
System.InvalidCastException:
[A]Aw.Y4.Svc.ApplicationService.ApplicationService
cannot be cast to
[B]Aw.Y4.Svc.ApplicationService.ApplicationService.
Type A originates from 'Aw.Y4.Svc.Y45Service, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' in the context 'Default' at location '/var/opt/y4service/Aw.Y4.Svc.Y45Service.dll'.
Type B originates from 'Aw.Y4.Svc.Y45Service, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' in the context 'Default' at location '/var/opt/y4service/Aw.Y4.Svc.Y45Service.dll'.
完全一样的东西,不能转换?