3

I tried to install NuGet package for Azure Function in project.json as follow:

{
  "frameworks": {
    "net46":{
      "dependencies": {
        "PDFNet": "6.7.1",
        "PDFNetNoLoader": "6.5.4"
      }
    }
  }
}

However, I get this error message "Access to the path '________' is denied" for every package I tried to install. The path _______ is different each time packages are restored.

2017-01-06T15:38:53.804 Restoring packages for D:\home\site\wwwroot\PDFT\project.json...
2017-01-06T15:38:54.153 CACHE https://api.nuget.org/v3-flatcontainer/pdfnet/index.json
2017-01-06T15:38:54.184 CACHE https://api.nuget.org/v3-flatcontainer/pdfnet/6.7.1.52203/pdfnet.6.7.1.52203.nupkg
2017-01-06T15:38:54.262 CACHE https://api.nuget.org/v3-flatcontainer/pdfnetnoloader/index.json
2017-01-06T15:38:54.262 CACHE https://api.nuget.org/v3-flatcontainer/pdfnetnoloader/6.5.4/pdfnetnoloader.6.5.4.nupkg
2017-01-06T15:38:54.387 Installing PDFNetNoLoader 6.5.4.
2017-01-06T15:38:54.496 Access to the path 'ofvjs2t3.tlt' is denied.
2017-01-06T15:38:54.496 
2017-01-06T15:38:54.496 
2017-01-06T15:38:53.032 Restoring packages for D:\home\site\wwwroot\PDFT\project.json...
2017-01-06T15:38:54.261 CACHE https://api.nuget.org/v3-flatcontainer/pdfnet/index.json
2017-01-06T15:38:54.291 CACHE https://api.nuget.org/v3-flatcontainer/pdfnet/6.7.1.52203/pdfnet.6.7.1.52203.nupkg
2017-01-06T15:38:56.391 Access to the path 'ofvjs2t3.tlt' is denied.
2017-01-06T15:38:56.406 
2017-01-06T15:38:56.406 
2017-01-06T15:38:56.736 Access to the path 'ofvjs2t3.tlt' is denied.
2017-01-06T15:38:56.812 
2017-01-06T15:38:56.812 
2017-01-06T15:38:56.255 
2017-01-06T15:38:56.255 
2017-01-06T15:38:55.678 
2017-01-06T15:38:55.678 
2017-01-06T15:38:56.563 
2017-01-06T15:39:30.355 Could not find file 'D:\home\data\Functions\packages\nuget\pdfnetnoloader\6.5.4\ofvjs2t3.tlt'.
2017-01-06T15:39:30.389 
2017-01-06T15:39:30.389 
2017-01-06T15:39:30.636 Installing PDFNetNoLoader 6.5.4.

What could be the problem here?

EDIT I messed up a lot with the function app so I created a new function app to try the whole thing again. This time the packages are installed successfully and I can see assemblies in packages folders via Kudu.

I still get an exception when running the code about assemblies not found, but I think this is the problem specific to this package.

msrc
  • 663
  • 1
  • 9
  • 19
  • I wonder if the failures occur only for the PDF packages. Can you try adding a dependency to some other package, like AutoMapper, for instance? – Don Lockhart Jan 06 '17 at 16:12
  • @DonLockhart I tried NewtonSoft.Json and got the same problem – msrc Jan 06 '17 at 16:28
  • This is indeed strange. Are you having the same issue with all functions in the same Function App? – Fabio Cavalcante Jan 06 '17 at 18:15
  • Can you open Kudu (https//.scm.azurewebsites.net), open the diagnostic console, navigate to the package cache folder (D:\home\data\Functions\packages\nuget\) delete the folders for those packages and try again? If that is the only function in your app, you can delete the entire nuget folder and retry. – Fabio Cavalcante Jan 06 '17 at 18:25
  • @Mind What runtime version is it on? I wonder if there's an issue with preview released previous to "latest (~1)"??... It works for me just fine with an Azure Function on latest runtime version. – Chris Pietschmann Jan 06 '17 at 23:50
  • I tried creating new function app and it worked. Could be that I tried a lot of things with this function previously and somehow messed something up. – msrc Jan 09 '17 at 09:41
  • Mind, I'm assuming this is no longer an issue, is that correct? I wasn't able to repro this, but curious to know if you've tried the steps above. Thanks! – Fabio Cavalcante Jan 11 '17 at 19:39
  • @FabioCavalcante Yes I have, but the result was still the same unfortunately – msrc Jan 12 '17 at 08:29
  • Indeed unfortunate. Sounds like something is up with that Function App. If you wouldn't mind sharing the app name, we could take a look to see what is going on there. – Fabio Cavalcante Jan 12 '17 at 22:34
  • @FabioCavalcante yes of course! Luckily I haven't deleted the app, the name is test-functions6659b55c. It would be great if you could let me know what went wrong. – msrc Jan 16 '17 at 10:15

1 Answers1

0

Check if Read Only flag is set on those D: folders which it is trying to access. If yes, remove it and try again.

Ransher Singh
  • 116
  • 1
  • 3
  • I tried changing access for the folder, but it blew up the whole function app. Either I did it wrong, or it shouldn't be messed with. – msrc Jan 09 '17 at 09:30