本文介绍了无法加载文件或程序集“Microsoft.Web.Infrastructure,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想我的网站上传到服务器。这是工作的罚款与我的本地主机,所以我在本地主机上传的一切的wwwroot
文件夹到服务器,改变了连接字符串。
I tried to upload my web site to a server. It was working fine with my local host, so I uploaded everything in my localhost wwwroot
folder to the server and changed the connection string.
但有此错误:
Exception information:
Exception type: InvalidOperationException
Exception message: The pre-application start initialization method Start on type RouteDebug.PreApplicationStart threw an exception with the following error message: Could not load file or assembly 'Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified..
at System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods)
at System.Web.Compilation.BuildManager.CallPreStartInitMethods()
at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)
Could not load file or assembly 'Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
at RouteDebug.PreApplicationStart.Start()
该项目是 nopcommerce
。
应该做些什么来解决这个问题?
What should be done to resolve this error?
推荐答案
您将需要包括与项目dll和添加到它的引用也是如此。
You will need to include the dll with your project and add a reference to it as well.
下面是对堆栈已经是一个类似的问题的链接:
Here is a link to a similar issue already on Stack:MVC3 Deployment Dependency Problems
这篇关于无法加载文件或程序集“Microsoft.Web.Infrastructure,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!