组合件Z中类型Y的方法X没有实现 [英] Method X from Type Y in Assembly Z does not have an Implementation

查看:101
本文介绍了组合件Z中类型Y的方法X没有实现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很困惑!

我有一个解决方案,在发布和部署时会给我以下错误:

I have a solution that, when published and deployed gives the me the following error:

Exception information: 
Exception type: HttpException 
Exception message: Method 'GetDemosSubsidiaryById' in type 'DG.Crm.DataAccess.Crm2011WS.Repositories.ReferenceEntitiesRepository' from assembly 'DG.Crm.DataAccess.Crm2011WS, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
<stack trace>

显然,它可以很好地运行并且该方法已经实现并且肯定存在于库中。我已经使用反射器检查了已部署的DLL,但也看不到任何异常-存在类,存在类型,实现了方法。

Obviously it builds fine and the method is implemented and definitely exists in the library. I have used reflector to check the deployed DLLs and I can't see anything out of the ordinary there either - classes exist, types are there, method is implemented. The particular method it is complaining about isn't even called, either.

我删除了所有引用并将其读入解决方案中。

I have removed all references and readded them in the solution.

我已经使用Visual Studio中的实现接口快捷方式重新创建了 DG.Crm.DataAccess.Crm2011WS.Repositories.ReferenceEntitiesRepository

I have recreated DG.Crm.DataAccess.Crm2011WS.Repositories.ReferenceEntitiesRepository by using the the 'Implement Interface' shortcut in Visual Studio.

该解决方案可以在Visual Studio中加载并正常工作。

The solution loads and works fine from within Visual Studio.

我在这里缺少什么,或者在哪里可以找到?更多信息?

What am I missing here or where else can I look for more information?

编辑以添加解决方案结构:

edit to add on solution structure:

2011WS 该库实现了 Common 库中的接口。然后,WebApps MVC Web应用程序会同时引用这两个库。

The 2011WS library implements interfaces that live in the Common library. Both are then referenced by the WebApps MVC web application.

推荐答案

原来,该库中存在其中一个库的较旧版本。 GAC。我遇到的问题是发生冲突的库是DTO,而不是错误中引用的库。

Turns out there was an older version of one of the libraries in the GAC. The issue I had was the library in conflicting was the DTO one, and not those referenced in the error.

因此,在我的实例中,请更加小心存储在其中的内容。 GAC!

So in my instance, be more careful about what lives in the GAC!

这篇关于组合件Z中类型Y的方法X没有实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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