本文介绍了在服务器中部署后出现组装错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我将应用程序部署到域时收到此错误
Could not load file or assembly ''System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'' or one of its dependencies. The system cannot find the file specified.在Web配置中,引用以下内容:
< 组件 > ; < 添加 程序集 =" System.Web.Extensions.Design,版本= 4.0.0.0, Culture = neutral,PublicKeyToken = 31BF3856AD364E35" / > < 添加 程序集 =" System.Design,版本= 4.0.0.0,文化=中性, PublicKeyToken = B03F5F7F11D50A3A" / > < 添加 程序集 =" System.Windows.Forms,Version = 4.0.0.0,Culture =中性,PublicKeyToken = B77A5C561934E089" / > < 添加 程序集 =" System.Speech,版本= 4.0.0.0,文化=中性, PublicKeyToken = 31BF3856AD364E35" / > < 添加 程序集 =" System.Web.Routing,Version = 4.0.0.0,Culture =中性,PublicKeyToken = 31BF3856AD364E35" / > < /assembly > pre> 我引用了这个线程: stackoverflow/questions/267006/could- not-load-file-or-assembly-system-web-mvc [ ^ ] 我已经添加了程序集,但是我无法在bin文件夹中看到它,就像我在.NET中添加的所有其他程序集一样.我可以看到添加的其他自定义程序集,但无法看到.NET内置程序集.我如何使它们可见以将其本地副本设置为true 谢谢解决方案程序集应添加到GAC中,而不是bin中.
检查此链接 BIN将具有Razor的ASP.NET MVC 3部署到未安装MVC的Windows Server
hi , im getting this error when i deployed application to domain
Could not load file or assembly ''System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'' or one of its dependencies. The system cannot find the file specified.while in the web config , following are refernced :
<assemblies> <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> </assemblies>i referenced this thread : stackoverflow/questions/267006/could-not-load-file-or-assembly-system-web-mvc[^] i have added assembly but im unable to see it in bin folder like all other assemblies which i have added of .NET. I can see other custom assemblies which i add but im unable to see .NET builtin assemblies. How i make them visible to set their local copy to true Thanks
解决方案 The assembly should be added to the GAC not the binCheck this link BIN Deploying ASP.NET MVC 3 with Razor to a Windows Server without MVC installed更多推荐
在服务器中部署后出现组装错误
发布评论