MSDeploy throwing MissingMethodException on EventWriteVerbose when trying to deploy package to IIS

半世苍凉 提交于 2021-01-27 19:42:28

问题


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

This error is output whether I run the deploy.cmd or run msdeploy.exe directly

The missing method, apparently, is Microsoft.Web.Deployment.Tracing.WebDeployEventWriter.EventWriteVerbose(System.String, System.String, System.String)

The full output is:

Unhandled Exception: System.MissingMethodException: Method not found: 'Void Microsoft.Web.Deployment.Tracing.WebDeployEventWriter.EventWriteVerbose(System.String, System.String, System.String)'.

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)

The arguments being passed to 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

However, changing any of the arguments will result in the same output


回答1:


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




回答2:


similar to @justin answer

downgrading to Webdeploy 3.5 instead of webdeploy 4.0 worked for me when i was using azuredevops




回答3:


Like those above, for Windows 10 Enterprise, I had to downgrade to Web Deploy 3.5 to resolve this. I had to keep a copy of the Web Deploy 3.5 msi so that I can install it again, because some other apps (could be VS Code or some other VS products?) keep re-installing Web Deploy 4.0 when they do some upgrade.

Web Deploy 4.0 obviously doesn't work on my Windows 10 Enterprise. Even when I run msdeploy.exe without any parameter, the same error message above happens, so it's hopeless trying to resolve it.



来源:https://stackoverflow.com/questions/59199036/msdeploy-throwing-missingmethodexception-on-eventwriteverbose-when-trying-to-dep

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!