azure web应用部署失败:拒绝访问nuget包

9avjhtql  于 2021-06-24  发布在  Kudu
关注(0)|答案(1)|浏览(429)

我正在尝试使用kudu从github在linux上的azure中部署一个.net核心web应用程序。我在部署期间遇到以下错误:

Command: "/home/site/deployments/tools/deploy.sh"
Handling ASP.NET Core Web Application deployment.
  Restoring packages for /home/site/repository/myproject.csproj...
  Installing NuGet.Frameworks 4.7.0.
/opt/dotnet/2.2.104/sdk/2.2.104/NuGet.targets(114,5): error : Access to the path '/var/nuget/nuget.frameworks/4.7.0' is denied. [/home/site/repository/myproject.csproj]
/opt/dotnet/2.2.104/sdk/2.2.104/NuGet.targets(114,5): error :   Permission denied [/home/site/repository/myproject.csproj]
An error has occurred during web site deployment.
dotnet restore failed
\n/opt/Kudu/Scripts/starter.sh "/home/site/deployments/tools/deploy.sh"
``` `NuGet.Frameworks` 不是我在项目中使用的库。如何使项目成功部署?
fd3cxomn

fd3cxomn1#

取出 Package Microsoft.VisualStudio.Web.CodeGeneration.Design 来自项目。它有许多依赖项,包括 NuGet.Frameworks ,而且似乎对azure不太好(至少在linux上是这样)。

相关问题