在.NET 4中无法加载文件或程序集系统,版本= 2.0.5.0 MVC 4应用程序 [英] Could not load file or assembly System, Version=2.0.5.0 in .NET 4 MVC 4 application

查看:208
本文介绍了在.NET 4中无法加载文件或程序集系统,版本= 2.0.5.0 MVC 4应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一直在寻找年龄,找不到任何帮助。下面是我发现了异常:

Been searching for ages, can't find anything helpful. Here is the exception I'm getting:

Could not load file or assembly 'System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) 

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

Stack Trace: 

[FileLoadException: Could not load file or assembly 'System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)]
StructureMap.Graph.PluginGraph..ctor() in c:\BuildAgent\work\996e173a8ceccdca\src\StructureMap\Graph\PluginGraph.cs:41
StructureMap.PluginGraphBuilder..ctor() in c:\BuildAgent\work\996e173a8ceccdca\src\StructureMap\PluginGraphBuilder.cs:22
StructureMap.InitializationExpression..ctor() in c:\BuildAgent\work\996e173a8ceccdca\src\StructureMap\InitializationExpression.cs:22
StructureMap.ObjectFactory.Initialize(Action`1 action) in c:\BuildAgent\work\996e173a8ceccdca\src\StructureMap\ObjectFactory.cs:47
...

此应用程序的工作原理在测试服务器上正常,但抛出的生产服务器上此异常。正如你所看到的,StructureMap code是什么原因造成的除外。

This applications works fine on the test server but is throwing this exception on the production server. As you can see, the StructureMap code is what is causing the exception.

我有,因为4.5没有在生产服务器上安装这个应用程序从4.5转换为.NET 4。转换后,该应用程序仍然是我的本地机器,并在测试服务器上正常工作。

I had to convert this app to .NET 4 from 4.5 because 4.5 wasn't installed on the production server. After the conversion, the app still works fine on my local machine and the test server.

我已经设置了复制本地为True系统组装,但由于所引用的版本是4.0.0.0,而不是2.0.5.0,我这没有什么区别。

I have already set the Copy Local to True for the System assembly, but since the referenced version is 4.0.0.0 and not 2.0.5.0, I this made no difference.

让我知道是否需要任何更多的信息。任何帮助您可以提供的AP preciated。

Let me know if any more info is needed. Any help you may be able to provide is appreciated.

推荐答案

确保您的.NET框架修补。微软发布补丁,.NET允许便携式类库正确地找到相应的运行时( KB2468871 )。如果您看到上述异常(或类似的东西),这意味着你错过了最新的.NET Framework的补丁。

Make sure your .NET framework is patched. Microsoft released patches to .NET to allow Portable Class Libraries to properly find the appropriate runtime (KB2468871). If you are seeing the above exception (or something like it), it means you're missing the latest .NET framework patches.

这篇关于在.NET 4中无法加载文件或程序集系统,版本= 2.0.5.0 MVC 4应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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