尝试将程序包部署到IIS时,MSDeploy在EventWriteVerbose上抛出MissingMethodException [英] MSDeploy throwing MissingMethodException on EventWriteVerbose when trying to deploy package to IIS
问题描述
我正在使用Jenkins构建和打包ASP.NET项目.一切正常,直到我尝试运行打包过程中输出的< ProjectName> .deploy.cmd
文件
I am using Jenkins to build and package an ASP.NET project. Everything works well up until I attempt to run the <ProjectName>.deploy.cmd
file that is output with the packaging process
无论我运行 deploy.cmd
还是直接运行 msdeploy.exe
,都会输出此错误
This error is output whether I run the deploy.cmd
or run msdeploy.exe
directly
显然,缺少的方法是 Microsoft.Web.Deployment.Tracing.WebDeployEventWriter.EventWriteVerbose(System.String,System.String,System.String)
完整的输出是:
未处理的异常:System.MissingMethodException:找不到方法:'空白Microsoft.Web.Deployment.Tracing.WebDeployEventWriter.EventWriteVerbose(System.String,System.String,System.String)".
Unhandled Exception: System.MissingMethodException: Method not found: 'Void Microsoft.Web.Deployment.Tracing.WebDeployEventWriter.EventWriteVerbose(System.String, System.String, System.String)'.
在Microsoft.Web.Deployment.TraceWrapper.EventWriteVerboseHelper(String消息,字符串用户,字符串siteName)
在Microsoft.Web.Deployment.TraceWrapper.EventWriteVerbose(String消息,字符串用户,字符串siteName)
在MSDeploy.MSDeploy.Main(String []未使用的Args)
at
Microsoft.Web.Deployment.TraceWrapper.EventWriteVerboseHelper(String
message, String user, String siteName)
at
Microsoft.Web.Deployment.TraceWrapper.EventWriteVerbose(String
message, String user, String siteName)
at
MSDeploy.MSDeploy.Main(String[] unusedArgs)
传递给 msdeploy.exe
的参数:
-source:package ='C:\ PROGRA〜2 \ Jenkins \ workspace \ ProjectDirectory \ Project.zip'-dest:auto,computerName ="localhost",userName ="Administrator",password ="apassword",includeAcls ="False",tempAgent ="UseTempAgent"-verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -setParamFile:"C:\ PROGRA〜2 \ Jenkins \ workspace \ ProjectDirectory \ Project.SetParameters.xml"-whatif
-source:package='C:\PROGRA~2\Jenkins\workspace\ProjectDirectory\Project.zip' -dest:auto,computerName="localhost",userName="Administrator",password="apassword",includeAcls="False",tempAgent="UseTempAgent" -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -setParamFile:"C:\PROGRA~2\Jenkins\workspace\ProjectDirectory\Project.SetParameters.xml" -whatif
但是,更改任何参数将导致相同的输出
However, changing any of the arguments will result in the same output
推荐答案
虽然不是完全修复,但我降级为 Web Deploy 3.0
,并且不再看到此错误并且项目已成功部署
Although not exactly a fix, I downgraded to Web Deploy 3.0
and I do not see this error anymore and the project deploys successfully
这篇关于尝试将程序包部署到IIS时,MSDeploy在EventWriteVerbose上抛出MissingMethodException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!