'System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\home\site\wwwroot\runtimes\unix\'.
See original GitHub issueBug Description First of all, Thanks for the great application. Unfortunately I am unable to deploy successfully. The ARM template deployment step gives the following error.
.\Deploy.ps1 -WebAppNamePrefix “XXXXXXXX” -TenantID “XXXXXX” -ADApplicationID “XXXXX” -ADApplicationSecret “XXXXX” -SQLServerName “XXXXX” -SQLAdminLogin “XXXXXX” -SQLAdminLoginPassword “XXXXX” -PublisherAdminUsers “XXXXXXX” -BacpacUrl “someurl” -ResourceGroupForDeployment “XXXXX” -Location “East US” -AzureSubscriptionID “XXXXX” -PathToARMTemplate “\path\to\deploy.json”
(actual values masked for security)
Package deployment failed AppGallery Deploy Failed: 'System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\home\site\wwwroot\runtimes\unix\'. at Microsoft.Web.Deployment.NativeMethods.RaiseIOExceptionFromErrorCode(Win32ErrorCode errorCode, String maybeFullPath) at Microsoft.Web.Deployment.FileStreamEx.CreateInstance(String path, FileMode fileMode, FileAccess fileAccess, FileShare fileShare, Nullable 1 fileLength) at Microsoft.Web.Deployment.FilePathProviderBase.Add(DeploymentObject source, Boolean whatIf) at Microsoft.Web.Deployment.DeploymentObject.AddChild(DeploymentObject source, Int32 position, DeploymentSyncContext syncContext) at Microsoft.Web.Deployment.DeploymentSyncContext.HandleAddChild(DeploymentObject destParent, DeploymentObject sourceObject, Int32 position) at Microsoft.Web.Deployment.DeploymentSyncContext.SyncDirPathChildren(DeploymentObject destRoot, DeploymentObject sourceRoot) at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest, DeploymentObject source) at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenNoOrder(DeploymentObject dest, DeploymentObject source) at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest, DeploymentObject source) at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest, DeploymentObject source) at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(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, ContentRootTable contentRootTable, Nullable1 syncPassId, String syncSessionId) at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions) at Microsoft.Web.Deployment.DeploymentObject.SyncTo(String provider, String path, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions) at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentWellKnownProvider provider, String path, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions) at Microsoft.Web.Deployment.WebApi.AppGalleryPackage.Deploy(String deploymentSite, String siteSlotId, Boolean doNotDelete) at Microsoft.Web.Deployment.WebApi.DeploymentController.<DownloadAndDeployPackage>d__24.MoveNext()' Package deployment failed
To Reproduce Follow step by step the instructions provided. In the end, the deploy step always fails with the error above. I have tried removing the entire resource group and rerunning the whole script. The script fails at the point where it says “Deploying the ARM template to set up resources”
Expected behavior All resources should be deployed successfully without any errors.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Windows 10 Pro
- Browser - Chrome
- Version 83.0.4103.116 (Official Build) (64-bit)
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top GitHub Comments
Hi all,
Sorry for the delay in getting to this.
I had faced this issue myself when I created the ARM template and the powershell script.
Please note the Note in the installation instructions:
You need to have the right Powershell installed and make sure that you are opening the Powershell command window that corresponds to the latest version. This is a step that is commonly missed and this is the cause for the behavior that you have.
The issue is due to the difference in the path separator between Windows and Unix / Linux.
Please give it a try and keep me posted.
Regards, Kiran Banda
It turns out
New-AzureServiceRollout
is not an issue. Ev2 CLI and Ev2 SDK have the same problem in powershell 5.x becauseCompress-Archive
in poweshell 5.x works differently than in poweshell 7.x. If I create a zip archive in powershell 7.x and then useNew-AzureServiceRollout
in powershell 5.x or simply use Ev2 SDK console app to start a rollout, the rollout succeeds.P.S. Just noticed that
Compress-Archive
issue was already mentioned in an earlier comment