[英]How do I target a specific Application Pool when using Visual Studio 2012's Web Deploy?
My application can not deploy because of the following error: 由于以下错误,我的应用程序无法部署:
Web deployment task failed. (The application pool that you are trying to use has the 'managedRuntimeVersion' property set to 'v2.0'. This application requires 'v4.0'.)
Right now, I'm attempting to deploy my .NET application to IIS. 现在,我正在尝试将.NET应用程序部署到IIS。 VS is attempting to target the "DefaultAppPool" application pool.
VS试图以“ DefaultAppPool”应用程序池为目标。 I want it to instead target the "ASP .NET v4.0" application pool.
我希望它改为针对“ ASP .NET v4.0”应用程序池。 How do I do that in Visual Studio?
如何在Visual Studio中做到这一点?
I am trying to not change any settings within IIS if possible. 我试图尽可能不更改IIS中的任何设置。
I don't know if this would be considered a hack, but it got the job done without any issues. 我不知道这是否会被认为是骇客,但它完成了工作,没有任何问题。
What I did was I first created a folder in IIS and then converted it to an application. 我要做的是首先在IIS中创建一个文件夹,然后将其转换为应用程序。 After which, I had it target the .NET 4.0 application pool and voila, Visual Studio was able to deploy the application without the error.
之后,我以.NET 4.0应用程序池为目标,瞧,Visual Studio能够部署应用程序而不会出现错误。
I hope this helps people in the future that Google their issue and come upon my question. 希望这对以后帮助人们解决Google问题并提出我的问题有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.