{"action":"created","issue":{"url":"https://api.github.com/repos/projectkudu/kudu/issues/1697","labels_url":"https://api.github.com/repos/projectkudu/kudu/issues/1697/labels{/name}","comments_url":"https://api.github.com/repos/projectkudu/kudu/issues/1697/comments","events_url":"https://api.github.com/repos/projectkudu/kudu/issues/1697/events","html_url":"https://github.com/projectkudu/kudu/issues/1697","id":107067856,"number":1697,"title":"Access Denied Deleting File","user":{"login":"robfarmergt","id":4447784,"avatar_url":"https://avatars.githubusercontent.com/u/4447784?v=3","gravatar_id":"","url":"https://api.github.com/users/robfarmergt","html_url":"https://github.com/robfarmergt","followers_url":"https://api.github.com/users/robfarmergt/followers","following_url":"https://api.github.com/users/robfarmergt/following{/other_user}","gists_url":"https://api.github.com/users/robfarmergt/gists{/gist_id}","starred_url":"https://api.github.com/users/robfarmergt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robfarmergt/subscriptions","organizations_url":"https://api.github.com/users/robfarmergt/orgs","repos_url":"https://api.github.com/users/robfarmergt/repos","events_url":"https://api.github.com/users/robfarmergt/events{/privacy}","received_events_url":"https://api.github.com/users/robfarmergt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-17T20:28:53Z","updated_at":"2015-09-17T21:04:00Z","closed_at":null,"body":"I'm having an issue when using Github deployments after a nuget package was removed from my project.json. It seems when the file is attempted to be deleted, it fails:\r\n\r\n```\r\nKuduSync.NET from: 'D:\\local\\Temp\\8d2bf9cda2495cf' to: 'D:\\home\\site'\r\nError: Access to the path 'Serilog.Sinks.Logentries.dll' is denied.\r\nCopying file: 'ef'\r\nCopying file: 'ef.cmd'\r\nCopying file: 'gen'\r\nCopying file: 'gen.cmd'\r\nCopying file: 'web'\r\nCopying file: 'web.cmd'\r\nCopying file: 'approot\\global.json'\r\nDeleting file: 'approot\\packages\\Serilog.Sinks.Logentries\\1.5.8\\Serilog.Sinks.Logentries.nuspec'\r\nDeleting file: 'approot\\packages\\Serilog.Sinks.Logentries\\1.5.8\\lib\\net45\\Serilog.Sinks.Logentries.dll'\r\nAn error has occurred during web site deployment.\r\n```"},"comment":{"url":"https://api.github.com/repos/projectkudu/kudu/issues/comments/141227904","html_url":"https://github.com/projectkudu/kudu/issues/1697#issuecomment-141227904","issue_url":"https://api.github.com/repos/projectkudu/kudu/issues/1697","id":141227904,"user":{"login":"robfarmergt","id":4447784,"avatar_url":"https://avatars.githubusercontent.com/u/4447784?v=3","gravatar_id":"","url":"https://api.github.com/users/robfarmergt","html_url":"https://github.com/robfarmergt","followers_url":"https://api.github.com/users/robfarmergt/followers","following_url":"https://api.github.com/users/robfarmergt/following{/other_user}","gists_url":"https://api.github.com/users/robfarmergt/gists{/gist_id}","starred_url":"https://api.github.com/users/robfarmergt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robfarmergt/subscriptions","organizations_url":"https://api.github.com/users/robfarmergt/orgs","repos_url":"https://api.github.com/users/robfarmergt/repos","events_url":"https://api.github.com/users/robfarmergt/events{/privacy}","received_events_url":"https://api.github.com/users/robfarmergt/received_events","type":"User","site_admin":false},"created_at":"2015-09-17T21:03:59Z","updated_at":"2015-09-17T21:03:59Z","body":"Here is the output from the file handles:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/4447784/9945643/6dae6b50-5d5c-11e5-872b-9016110d57c0.png)\r\n\r\nHere is the log this time, looks like it had trouble with the directory now:\r\n\r\n```\r\nCannot removed the 'to be deleted' directory, ignoring\r\nError: The process cannot access the file 'D:\\home\\site\\approot\\packages\\Serilog.Sinks.Logentries\\1.5.8\\lib\\net45' because it is being used by another process.\r\nKuduSync.NET from: 'D:\\local\\Temp\\8d2bfa06d57e935' to: 'D:\\home\\site'\r\nCopying file: 'ef'\r\nCopying file: 'ef.cmd'\r\nCopying file: 'gen'\r\nCopying file: 'gen.cmd'\r\nCopying file: 'web'\r\nCopying file: 'web.cmd'\r\nCopying file: 'approot\\global.json'\r\nDeleting file: 'approot\\packages\\Serilog.Sinks.Logentries\\1.5.8\\Serilog.Sinks.Logentries.nuspec'\r\nDeleting file: 'approot\\packages\\Serilog.Sinks.Logentries\\1.5.8\\lib\\net45\\Serilog.Sinks.Logentries.dll'\r\nDeleting directory: 'approot\\packages\\Serilog.Sinks.Logentries\\1.5.8\\lib\\net45'\r\nAn error has occurred during web site deployment.\r\n```\r\n\r\nI was able to DEL the directory manually, then I clicked the \"Redeploy\" button in azure and got this error:\r\n\r\n```\r\nAdding NuGet package D:\\home\\site\\repository\\wrap\\DevExpress.PivotGrid.v15.1.Core\\bin\\Debug\\DevExpress.PivotGrid.v15.1.Core.1.0.0.nupkg to D:\\local\\Temp\\8d2bfa274c14c71\\approot\\packages\r\nInstalling DevExpress.PivotGrid.v15.1.Core.1.0.0\r\nAdd complete, 928ms elapsed\r\nRemoving D:\\home\\site\\repository\\wrap\\DevExpress.PivotGrid.v15.1.Core\\bin\\Debug\\DevExpress.PivotGrid.v15.1.Core.1.0.0.nupkg\r\nSystem.IO.IOException: The process cannot access the file 'D:\\home\\site\\repository\\wrap\\DevExpress.PivotGrid.v15.1.Core\\bin\\Debug\\DevExpress.PivotGrid.v15.1.Core.1.0.0.nupkg' because it is being used by another process.\r\n   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)\r\n   at System.IO.File.InternalDelete(String path, Boolean checkHost)\r\n   at System.IO.File.Delete(String path)\r\n   at Microsoft.Framework.PackageManager.Publish.PublishProject.EmitNupkg(PublishRoot root)\r\n   at Microsoft.Framework.PackageManager.Publish.PublishProject.Emit(PublishRoot root)\r\n   at Microsoft.Framework.PackageManager.Publish.PublishRoot.Emit()\r\n   at Microsoft.Framework.PackageManager.Publish.PublishManager.Publish()\r\n   at Microsoft.Framework.PackageManager.PublishConsoleCommand.<>c__DisplayClass0_0.<Register>b__1()\r\n   at Microsoft.Framework.Runtime.Common.CommandLine.CommandLineApplication.Execute(String[] args)\r\n   at Microsoft.Framework.PackageManager.Program.Main(String[] args)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at Microsoft.Framework.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly, String[] args, IServiceProvider serviceProvider)\r\n   at dnx.host.Bootstrapper.RunAsync(List`1 args, IRuntimeEnvironment env)\r\n   at dnx.host.RuntimeBootstrapper.ExecuteAsync(String[] args)\r\n   at dnx.host.RuntimeBootstrapper.Execute(String[] args)\r\nAn error has occurred during web site deployment.\r\n```\r\n"}}