&引用;错误:找不到路径的一部分;Azure web应用程序部署期间

&引用;错误:找不到路径的一部分;Azure web应用程序部署期间,azure,asp.net-core,azure-web-app-service,asp.net-core-1.0,Azure,Asp.net Core,Azure Web App Service,Asp.net Core 1.0,我想将ASP.NET核心web应用部署到Azure 在我的解决方案文件夹中,我有两个项目,都引用了Newtonsoft.Jsonlibrary 当我试图通过本地Git repo进行部署时,它在“运行部署脚本”处显示了一个错误,这将导致下面的活动日志 日志的错误消息提示它试图在Newtonsoft.Json中查找不存在的bin文件夹。你知道怎么解决这个问题吗?有什么问题吗 Command: "D:\home\site\deployments\tools\deploy.cmd" Handling A

我想将ASP.NET核心web应用部署到Azure

在我的解决方案文件夹中,我有两个项目,都引用了
Newtonsoft.Json
library

当我试图通过本地Git repo进行部署时,它在“运行部署脚本”处显示了一个错误,这将导致下面的活动日志

日志的错误消息提示它试图在Newtonsoft.Json中查找不存在的bin文件夹。你知道怎么解决这个问题吗?有什么问题吗

Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling ASP.NET 5 Web Application deployment.
'dnx-clr-win-x86.1.0.0-rc1-update1' is already installed in D:\local\UserProfile\.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-update1.
Adding D:\local\UserProfile\.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-update1\bin to process PATH
Microsoft .NET Development Utility Clr-x86-1.0.0-rc1-16231

  CACHE https://api.nuget.org/v3/index.json
Restoring packages for D:\home\site\repository\src\NyxProjectGenerator\project.json
Writing lock file D:\home\site\repository\src\NyxProjectGenerator\project.lock.json
Restore complete, 2895ms elapsed
Restoring packages for D:\home\site\repository\wrap\Newtonsoft.Json\project.json
Writing lock file D:\home\site\repository\wrap\Newtonsoft.Json\project.lock.json
Restore complete, 18ms elapsed
Restoring packages for D:\home\site\repository\wrap\Xamasoft.JsonClassGenerator\project.json
Writing lock file D:\home\site\repository\wrap\Xamasoft.JsonClassGenerator\project.lock.json
Restore complete, 22ms elapsed
Total time 3330ms

Feeds used:
    https://api.nuget.org/v3-flatcontainer/
Microsoft .NET Development Utility Clr-x86-1.0.0-rc1-16231

Copying to output path D:\local\Temp\8d34698522cd8f8

...
Using Package dependency System.Runtime.Extensions 4.0.0
    Source D:\local\UserProfile\.dnx\packages\System.Runtime.Extensions\4.0.0
Error: Could not find a part of the path 'D:\home\site\repository\wrap\Newtonsoft.Json\bin\Debug\net451'.
    Target D:\local\Temp\8d34698522cd8f8\approot\packages\System.Runtime.Extensions\4.0.0

...
Using Project dependency Newtonsoft.Json 1.0.0 for .NETFramework,Version=v4.5.1
  Packing nupkg from Project dependency Newtonsoft.Json
    Source D:\home\site\repository\wrap\Newtonsoft.Json\project.json
    Target D:\local\Temp\8d34698522cd8f8\approot\packages\Newtonsoft.Json\1.0.0

Building Newtonsoft.Json for .NETFramework,Version=v4.5.1
  Using Project dependency Newtonsoft.Json 1.0.0
    Source: D:\home\site\repository\wrap\Newtonsoft.Json\project.json

  Using Assembly dependency fx/mscorlib 4.0.0
    Source: D:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\mscorlib.dll

  Using Assembly dependency fx/System 4.0.0
    Source: D:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.dll

  Using Assembly dependency fx/System.Core 4.0.0
    Source: D:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Core.dll

  Using Assembly dependency fx/Microsoft.CSharp 4.0.0
    Source: D:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\Microsoft.CSharp.dll

An error has occurred during web site deployment.
Error: Could not find a part of the path 'D:\home\site\repository\wrap\Newtonsoft.Json\bin\Debug\net451'.\r\nc:\Program Files (x86)\SiteExtensions\Kudu\52.50302.2113\bin\scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"

此错误消息(包括“wrap”文件夹)向我建议您已直接向Newtonsoft程序集添加了一个引用

错误:找不到路径“D:\home\site\repository\wrap\Newtonsoft.Json\bin\Debug\net451”的一部分

相反,您应该通过project.json文件中的NuGet package ref引用Newtonsoft

"dependencies": {
    "Newtonsoft.Json": "8.0.2"
},

如何从项目中引用Newtonsoft.Json?您的项目是否都基于相应的project.json文件?请发布
project.json
文件的内容。