我应该在部署机器上安装asp.net mvc 2吗?

时间:2022-09-11 10:27:24

I'm deploying an asp.net mvc 2 app on windows 2008 R2 and I get error that there is no system.web.mvc.dll, Should I install mvc2 on the deploy machine ?

我正在Windows 2008 R2上部署一个asp.net mvc 2应用程序,我收到错误,没有system.web.mvc.dll,我应该在部署机器上安装mvc2吗?

1 个解决方案

#1


9  

You can actually deploy without MVC being installed on the server by deploying the MVC DLLs with your project. Put the following DLLs into your bin directory and it will run fine

通过在项目中部署MVC DLL,实际上可以在服务器上安装MVC的情况下进行部署。将以下DLL放入bin目录,它将运行正常

System.Web.Mvc
System.Web.Routing
System.Web.Abstractions

If your server is on .Net 3.5 SP1 then you only need to deploy the Web.Mvc DLL, if its not running SP1 then you will need to deploy all 3.

如果您的服务器在.Net 3.5 SP1上,那么您只需要部署Web.Mvc DLL,如果它没有运行SP1,那么您将需要部署所有3。

There is an article by Phil Haack here detailing this more http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx

Phil Haack在这里发表了一篇文章,详细介绍了http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx

#1


9  

You can actually deploy without MVC being installed on the server by deploying the MVC DLLs with your project. Put the following DLLs into your bin directory and it will run fine

通过在项目中部署MVC DLL,实际上可以在服务器上安装MVC的情况下进行部署。将以下DLL放入bin目录,它将运行正常

System.Web.Mvc
System.Web.Routing
System.Web.Abstractions

If your server is on .Net 3.5 SP1 then you only need to deploy the Web.Mvc DLL, if its not running SP1 then you will need to deploy all 3.

如果您的服务器在.Net 3.5 SP1上,那么您只需要部署Web.Mvc DLL,如果它没有运行SP1,那么您将需要部署所有3。

There is an article by Phil Haack here detailing this more http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx

Phil Haack在这里发表了一篇文章,详细介绍了http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx