无法加载文件或程序集“系统,版本= 4.0.0.0,文化=中性公钥= b77a5c561934e089'或一个依赖加载、版本、文件、公钥

由网友(我是帅比我骄傲i)分享简介:我对一些用户机器(1〜20)生成此异常:I have this exception generated on some user machines (~1 of 20):无法加载文件或程序集系统,版本= 4.0.0.0,文化=中性公钥= b77a5c561934e089或它的一个依赖性。该系统找不到指定的文件。Co...

我对一些用户机器(1〜20)生成此异常:

I have this exception generated on some user machines (~1 of 20):

无法加载文件或程序集系统,版本= 4.0.0.0,   文化=中性公钥= b77a5c561934e089或它的一个   依赖性。该系统找不到指定的文件。

Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.

我发现几次提到这个错误在网上和本网站但没有任何帮助。

I found several references to this error over the web and this site but nothing helped.

我有一个附加的应用程序,它使用WCF连接到服务器。加载项建有.NET框架3.5,VS 2008。

I have an add-in application which uses WCF to connect to the server. The add-in built with .NET Framework 3.5 with VS 2008.

的错误是可再现的测试机器中的一个只在一个用户帐户。我安装我的应用程序,并且只能从一个账户重现此本机在其他地方,它正在罚款。此外,它是唯一可重复的只有一个我创建的加载项(我假设,因为它使用了目前存在的.NET框架)。

The error is reproducible on one of the test machines in only one user account. I install my application and can only reproduce this from one account on this machine everywhere else it is working fine. Furthermore it is only reproducible with only one version of host application which I created add-in for (I assume because it uses differnet .NET Frameworks).

我已经检查保险丝日志,我看到以下内容:

I have checked the fuse logs and I see the following:

Assembly manager loaded from:  C:WindowsMicrosoft.NETFramework64v2.0.50727mscorwks.dll
Running under executable  C:Program FilesSolidWorks CorpSolidWorkssldworks.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: User = HomeUser
LOG: DisplayName = System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
 (Fully-specified)
LOG: Appbase = file:///C:/Program Files/SolidWorks Corp/SolidWorks/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = NULL
Calling assembly : System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.

因此​​,通过某种原因它试图用V2.0.50727 的Mscorwks.dll加载器加载System.dll中的版本= 4.0.0.0。在构建机器,我指2.0.0.0版本System.dll中的

So by some reasons it is trying to use v2.0.50727mscorwks.dll loader to load the Version=4.0.0.0 of System.dll. On build machine I'm referring 2.0.0.0 version of System.dll

任何帮助是非常AP preciated。

Any help is much appreciated.

谢谢, 阿尔乔姆

推荐答案

您可以启用的NuGet包和​​更新你的DLL。使其工作。 或者您也可以手动在经历了包管理器更新包VS如果你知道哪个版本,你需要为你的解决方案。

You can enable NuGet packages and update you dlls. so that it work. or you can update the package manually by going through the package manager in your vs if u know which version you require for your solution.

阅读全文

相关推荐

最新文章