【发布时间】:2017-01-06 15:45:55
【问题描述】:
我尝试在 project.json 中为 Azure Function 安装 NuGet 包,如下所示:
{
"frameworks": {
"net46":{
"dependencies": {
"PDFNet": "6.7.1",
"PDFNetNoLoader": "6.5.4"
}
}
}
}
但是,对于我尝试安装的每个软件包,我都会收到此错误消息“拒绝访问路径 '________'”。每次恢复包时路径_______不同。
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.
这可能是什么问题?
编辑 我在函数应用上搞砸了很多,所以我创建了一个新的函数应用来再次尝试整个过程。这次包安装成功,我可以通过 Kudu 看到包文件夹中的程序集。
在运行有关未找到的程序集的代码时,我仍然遇到异常,但我认为这是此包特有的问题。
【问题讨论】:
-
我想知道故障是否仅发生在 PDF 包中。您可以尝试向其他包(例如 AutoMapper)添加依赖项吗?
-
@DonLockhart 我尝试了 NewtonSoft.Json 并遇到了同样的问题
-
这确实很奇怪。同一个 Function App 中的所有功能是否都存在相同的问题?
-
能否打开 Kudu (https//
.scm.azurewebsites.net),打开诊断控制台,导航到包缓存文件夹(D:\home\data\Functions\packages\ nuget)删除这些包的文件夹并重试?如果这是您应用中的唯一功能,您可以删除整个 nuget 文件夹并重试。 -
@Mind 它在什么运行时版本上?我想知道在“最新(~1)”之前发布的预览是否存在问题??...它适用于我在最新运行时版本上的 Azure 函数。
标签: azure nuget nuget-package-restore azure-functions pdfnet