且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法加载文件或程序集'System.Web.WebPages.Razor,Version = 2.0.0.0,Culture = neutral或其依赖项之一

更新时间:2021-11-15 01:40:28

@ProNotion是正确的,我已经看到越来越多的Umbraco软件包依赖于特定版本的程序集,从而导致程序集冲突,特别是如果两个程序包需要不同版本的程序集时.相同的程序集.

@ProNotion is right, I have seen more and more packages on Umbraco relying on specific versions of assemblies causing assemblies to conflict especially if two packages need different versions of the same assembly.

其他一些提示:

MS提供的该工具可帮助诊断程序集绑定问题(

This tool from MS helps diagnose assembly binding problems (http://msdn.microsoft.com/en-us/library/e74a18c4%28v=vs.71%29.aspx).

在您的web.config中添加运行时/assemblyBinding部分可以解决与冲突的程序集有关的问题(

Adding a runtime / assemblyBinding section to your web.config can work round problems with ***ing assemblies (http://msdn.microsoft.com/en-us/library/0ash1ksb(v=vs.110).aspx)

有时程序集不会被复制(例如,您使用msbuild并且该程序集未包含在项目中)-因此,您还应该检查程序集是否已将其复制到实时服务器中.

Sometime the assembly doesn't get copied (eg you use msbuild and the assembly isn't included in the project) - so you should also check to see if the assembly made it to the live server.