简体   繁体   English

'您必须添加对Microsoft.Practices.EnterpriseLibrary.Common的引用',即使汇编在GAC中

[英]'You must add a reference to Microsoft.Practices.EnterpriseLibrary.Common' even though assembly is in the GAC

I'm trying to compile an application for which I have the solution and can't get past: 我正在尝试编译一个我有解决方案并且无法通过的应用程序:

'Microsoft.Practices.EnterpriseLibrary.Common.Configuration.IConfigurationSource' is defined in an assembly that is not referenced. 'Microsoft.Practices.EnterpriseLibrary.Common.Configuration.IConfigurationSource'在未引用的程序集中定义。 You must add a reference to assembly 'Microsoft.Practices.EnterpriseLibrary.Common, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' 您必须添加对程序集'Microsoft.Practices.EnterpriseLibrary.Common,Version = 3.1.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a'的引用

So I added the assembly to the GAC: 所以我将程序集添加到GAC:

在此输入图像描述

After some research I opened up visual studio with the Fusion Assembly Binding Viewer running, which seemed to create a lot of logs but none that related to this exact version of the assembly (however 4.1.0.0 is in there). 经过一些研究后,我开始使用Fusion Assembly Binding Viewer运行视觉工作室,这似乎创建了很多日志,但没有一个与这个精确版本的程序集相关(但4.1.0.0 在那里)。

I can't simply add -> reference as VS tells me that a reference with the same name already exists. 我不能简单地添加 - >引用,因为VS告诉我已经存在具有相同名称的引用。

What other avenues should I explore? 我应该探索哪些其他途径?

Have you tried to Alias the assembly also if you are using .net 4.0 you would have to have an entry in the .config file for example that shows the old assembly name referencing the new assembly name. 如果您使用.net 4.0,您是否尝试过Alias组件,您必须在.config文件中有一个条目,例如显示引用新程序集名称的旧程序集名称。 Several other things to keep in mind .. if the .DLL is in the GAC and you don't have a copy of that assembly in the bin folder, this could cause an issue.. 还有其他一些要记住的事项..如果.DLL在GAC中并且您在bin文件夹中没有该程序集的副本,这可能会导致问题。

Is this local referencing or is the code on a remote machine ..? 这是本地引用还是远程机器上的代码..? if it's a remote machine.. why not add that specific assembly to the GAC.. notice the versioning difference of the two assembly's in your screen shot as well.. 如果它是一台远程机器..为什么不将该特定组件添加到GAC ..注意屏幕截图中两个组件的版本差异..

暂无
暂无

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

相关问题 无法在WCF中加载文件或程序集'Microsoft.Practices.EnterpriseLibrary.Common - Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Common in WCF 无法解决此参考。 无法找到程序集“ Microsoft.Practices.EnterpriseLibrary.Common” - Could not resolve this reference. Could not locate the assembly “Microsoft.Practices.EnterpriseLibrary.Common” 无法加载文件或程序集“Microsoft.Practices.EnterpriseLibrary.Common”或其依赖项之一 - Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Common' or one of its dependencies Microsoft.Practices.EnterpriseLibrary.Common在IIS 8.5中不起作用,但它在IIS 7.0中工作 - Microsoft.Practices.EnterpriseLibrary.Common is not working in IIS 8.5 but its working in IIS 7.0 无法加载文件或程序集“Microsoft.Practices.EnterpriseLibrary.Common,Version=6.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35”或 - Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Common, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or 类型“ System.Data.Common.DbTransaction”在未引用的程序集中定义。 您必须添加对程序集的引用 - The type 'System.Data.Common.DbTransaction' is defined in an assembly that is not referenced. You must add a reference to assembly 如何避免不引用“ Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.IInstrumentationEventProvider”? - How to avoid `Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.IInstrumentationEventProvider` is not referenced? AppDomain AssemblyResolve事件请求Microsoft.Practices.EnterpriseLibrary.Common.resources - AppDomain AssemblyResolve Event asks for Microsoft.Practices.EnterpriseLibrary.Common.resources 无法加载文件或程序集Microsoft.Practices.EnterpriseLibrary.Configuration - Could not load file or assembly Microsoft.Practices.EnterpriseLibrary.Configuration “无法加载文件或程序集'Microsoft.Practices.EnterpriseLibrary.Validation”异常 - “Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Validation” exception
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM