I'm having this problem using msdeploy to sync GAC assembly to many Application Servers.
When I run this command
msdeploy -verb:sync -source:gacAssembly="'MyAssembly'" -dest:gacAssembly,computername=DESTINATIONSERVER
I obtain this error:
*Microsoft.Web.Deployment.DeploymentException:
(28/09/2010 16.46.37) An error occurred when the request was processed on the remote computer.
---> Microsoft.Web.Deployment.DeploymentClientServerException: An error was encountered when processing 'INPS.DNA.dll'.
---> Microsoft.Web.Deployment.DeploymentException: The error code was 0x80070020.
---> System.IO.IOException: The process cannot access 'C:\Windows\assembly\GAC_MSIL\MYASSEMBLY\1.0.0.0__a31fe99d2f98435c\MYASSEMBLY.dll' because it is being used by another process.
at Microsoft.Web.Deployment.Win32Native.RaiseIOExceptionFromErrorCode(Win32ErrorCode errorCode, String maybeFullPath)
at Microsoft.Web.Deployment.FileStreamEx.CreateInstance(String path, FileMode fileMode, FileAccess fileAccess)
at Microsoft.Web.Deployment.FilePathProvider.Add(DeploymentObject source, Boolean whatIf)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at Microsoft.Web.Deployment.DeploymentObject.Update(DeploymentObject source,DeploymentSyncContext syncContext)
at Microsoft.Web.Deployment.DeploymentSyncContext.HandleUpdate(DeploymentObject destObject, DeploymentObject sourceObject)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncDirPathChildren(DeploymentObject destRoot, DeploymentObject sourceRoot)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenNoOrder(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.ProcessSync(DeploymentObject destinationObject, DeploymentObject sourceObject)
at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject
destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, Conten
tRootTable contentRootTable)
at Microsoft.Web.Deployment.DeploymentAgent.HandleSync(DeploymentAgentWorkerR
equest workerRequest)
--- End of inner exception stack trace ---
at Microsoft.Web.Deployment.StatusThreadHandler.CheckForException()
at Microsoft.Web.Deployment.AgentClientProvider.RemoteDestSync(DeploymentObje
ct sourceObject, DeploymentSyncContext syncContext)
at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject
destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, Conten
tRootTable contentRootTable)
at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions
providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncO
ptions)
at MSDeploy.MSDeploy.ExecuteWorker()
Error count: 1.*
If I execute IISRESET on DESTINATIONSERVER the error doesn't occur!
My question is:
It's possible to unlock DLL without perform an IISRESET command?
I think I can avoid to restart entire Web Server.
Can you help me'
Thanks a lot!
Best regards.
What about using the recyleApp provider to stop and start the app pool?
msdeploy.exe -verb:sync -source:recycleApp -dest:recycleApp="Default Web Site",recycleMode="StopAppPool",computerName=remote-computer
... do your real deployment ...
msdeploy.exe -verb:sync -source:recycleApp -dest:recycleApp="Default Web Site",recycleMode="StartAppPool",computerName=remote-computer
User contributions licensed under CC BY-SA 3.0