Could not find file or assembly Microsoft.Web.Depl

2020-04-21 06:26发布

问题:

I have been successfully using Web Deploy (MSDeploy) V2 with the tempagent option for some time. However, when I upgraded to V3 on the source machine, I received the following error:

Microsoft.Web.Deployment.DeploymentException: (12/18/2013 2:18:29 PM) An error occurred when the request was processed on the remote computer. ---> System.IO.IOException: Could not load file or assembly 'Microsoft.Web.Deployment.Tracing, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

at Microsoft.Web.Deployment.Tracer.TraceMessage(TraceLevel level, DeploymentTraceSource source, String message) at Microsoft.Web.Deployment.DeploymentAgent.HandleRequest(DeploymentAgentAsyncData asyncData) at Microsoft.Web.Deployment.DeploymentAgent.BeginProcessRequest(DeploymentAgentWorkerRequest workerRequest, AsyncCallback callback, Object extraData) --- End of inner exception stack trace --- at Microsoft.Web.Deployment.AgentClientProvider.GetHttpResponse(HttpWebRequest request) at Microsoft.Web.Deployment.AgentClientProvider.CreateStatusThread(DeploymentSyncContext syncContext) at Microsoft.Web.Deployment.AgentClientProvider.RemoteDestSync(DeploymentObject sourceObject, DeploymentSyncContext syncContext, Nullable1 syncPass, String syncSessionId) at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable1 syncPassId, String syncSessionId) at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions) at MSDeploy.MSDeploy.ExecuteWorker()

The MS Deploy command looks like this:

msdeploy.exe -verb:sync -source:package='MyPackage.zip' -dest:auto,computerName='MyServerName',tempAgent=true -setParam:name='IIS Web Application Name',value='MyWebAppName'

If verbose and debug are turned on, I can see that the temp agent files are copied to the remote server and a deployment is attempted. However, the Microsoft.Web.Deployment.Tracing dll is not copied.

Please note that I need to continue using temp agent and cannot install the Web Deployment Service on the target machines since I need to continue using IIS Share Config on those servers and I would like to use V3 instead of V2.

回答1:

I contacted Microsoft. This is a bug that was introduced in 3.5. So, you basically cannot use tempAgent as intended at all in 3.5. It does seem to work in 3.0. So, I will be using that instead.



回答2:

Version 3.6 does not have this bug.