从VSO发布到Azure - 无法找到依赖项

时间:2016-03-22 13:46:02

标签: azure azure-devops

当我尝试将我的成功构建项目部署到azure网站时,它说:

完成部署日志

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\packages\EntityFramework.Commands\7.0.0-rc1-final\app\project.json
    GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.hosting.abstractions/index.json
    GET https://api.nuget.org/v3-flatcontainer/microsoft.extensions.commandlineutils.sources/index.json
    GET https://api.nuget.org/v3-flatcontainer/microsoft.extensions.platformabstractions/index.json
    NotFound https://api.nuget.org/v3-flatcontainer/microsoft.extensions.commandlineutils.sources/index.json 565ms
    OK https://api.nuget.org/v3-flatcontainer/microsoft.extensions.platformabstractions/index.json 787ms
    OK https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.hosting.abstractions/index.json 829ms
    GET https://api.nuget.org/v3-flatcontainer/system.console/index.json
OK https://api.nuget.org/v3-flatcontainer/system.console/index.json 129ms
Unable to locate Dependency Microsoft.Extensions.CommandLineUtils.Sources >= 1.0.0-*
Writing lock file D:\home\site\repository\packages\EntityFramework.Commands\7.0.0-rc1-final\app\project.lock.json
Restore complete, 7466ms elapsed
Restoring packages for D:\home\site\repository\packages\Microsoft.AspNet.Tooling.Razor\1.0.0-rc1-final\app\project.json
    GET https://api.nuget.org/v3-flatcontainer/system.runtime/index.json
    OK https://api.nuget.org/v3-flatcontainer/system.runtime/index.json 623ms
Writing lock file D:\home\site\repository\packages\Microsoft.AspNet.Tooling.Razor\1.0.0-rc1-final\app\project.lock.json
Restore complete, 2299ms elapsed
Restoring packages for D:\home\site\repository\packages\Microsoft.Dnx.TestHost\1.0.0-rc1-final\app\project.json
    GET https://api.nuget.org/v3-flatcontainer/system.diagnostics.process/index.json
    GET https://api.nuget.org/v3-flatcontainer/system.diagnostics.textwritertracelistener/index.json
    GET https://api.nuget.org/v3-flatcontainer/system.diagnostics.tracesource/index.json
    GET https://api.nuget.org/v3-flatcontainer/system.net.primitives/index.json
    GET https://api.nuget.org/v3-flatcontainer/system.net.sockets/index.json
    GET https://api.nuget.org/v3-flatcontainer/system.reflection.extensions/index.json
    GET https://api.nuget.org/v3-flatcontainer/system.reflection.typeextensions/index.json
    GET https://api.nuget.org/v3-flatcontainer/system.threading.thread/index.json
    OK https://api.nuget.org/v3-flatcontainer/system.diagnostics.process/index.json 428ms
    OK https://api.nuget.org/v3-flatcontainer/system.diagnostics.tracesource/index.json 428ms
    OK https://api.nuget.org/v3-flatcontainer/system.diagnostics.textwritertracelistener/index.json 499ms
    OK https://api.nuget.org/v3-flatcontainer/system.net.sockets/index.json 688ms
    OK https://api.nuget.org/v3-flatcontainer/system.net.primitives/index.json 712ms
    OK https://api.nuget.org/v3-flatcontainer/system.threading.thread/index.json 709ms
    OK https://api.nuget.org/v3-flatcontainer/system.reflection.extensions/index.json 813ms
    OK https://api.nuget.org/v3-flatcontainer/system.reflection.typeextensions/index.json 812ms
Writing lock file D:\home\site\repository\packages\Microsoft.Dnx.TestHost\1.0.0-rc1-final\app\project.lock.json
Restore complete, 3682ms elapsed
Restoring packages for D:\home\site\repository\src\ShiftScheduler.Api\project.json
Writing lock file D:\home\site\repository\src\ShiftScheduler.Api\project.lock.json
Restore complete, 14786ms elapsed
Restoring packages for D:\home\site\repository\src\ShiftScheduler.Data\project.json
Writing lock file D:\home\site\repository\src\ShiftScheduler.Data\project.lock.json
Restore complete, 7904ms elapsed
Restoring packages for D:\home\site\repository\src\ShiftScheduler.Models\project.json
Writing lock file D:\home\site\repository\src\ShiftScheduler.Models\project.lock.json
Restore complete, 1068ms elapsed
Restoring packages for D:\home\site\repository\src\ShiftScheduler.Web\project.json
Writing lock file D:\home\site\repository\src\ShiftScheduler.Web\project.lock.json
Restore complete, 22986ms elapsed
Restoring packages for D:\home\site\repository\test\ShiftScheduler.Tests\project.json
    GET https://api.nuget.org/v3-flatcontainer/xunit/index.json
    GET https://api.nuget.org/v3-flatcontainer/xunit.runner.dnx/index.json
    GET https://api.nuget.org/v3-flatcontainer/xunit.runner.visualstudio/index.json
    OK https://api.nuget.org/v3-flatcontainer/xunit.runner.visualstudio/index.json 1452ms
    OK https://api.nuget.org/v3-flatcontainer/xunit.runner.dnx/index.json 2098ms
    OK https://api.nuget.org/v3-flatcontainer/xunit/index.json 2371ms
Writing lock file D:\home\site\repository\test\ShiftScheduler.Tests\project.lock.json
Restore complete, 21737ms elapsed

Total time 107990ms
Errors in D:\home\site\repository\packages\EntityFramework.Commands\7.0.0-rc1-final\app\project.json

    Unable to locate Dependency Microsoft.Extensions.CommandLineUtils.Sources >= 1.0.0-*
Feeds used:
    https://api.nuget.org/v3-flatcontainer/
An error has occurred during web site deployment.
Unable to locate Dependency Microsoft.Extensions.CommandLineUtils.Sources >= 1.0.0-*\r\n\r\nErrors in D:\home\site\repository\packages\EntityFramework.Commands\7.0.0-rc1-final\app\project.json\r\n    Unable to locate Dependency Microsoft.Extensions.CommandLineUtils.Sources >= 1.0.0-*\r\nC:\Program Files (x86)\SiteExtensions\Kudu\53.50321.2147\bin\scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"

这是一个临时问题吗?

还有其他人有解决方案吗?

1 个答案:

答案 0 :(得分:1)

根据日志,您正在使用Kudu服务从Git repo部署项目。并根据以下条目:

Restoring packages for D:\home\site\repository\packages\EntityFramework.Commands\7.0.0-rc1-final\app\project.json
Restoring packages for D:\home\site\repository\packages\Microsoft.AspNet.Tooling.Razor\1.0.0-rc1-final\app\project.json

“packages”文件夹已被推送到Kudu远程存储库。部署正在尝试恢复“packages”文件夹中的“project.json”文件,这会导致问题。通常,部署应该只恢复项目的“project.json”文件。根据日志,它没有任何问题:

Restoring packages for D:\home\site\repository\src\ShiftScheduler.Api\project.json
Writing lock file D:\home\site\repository\src\ShiftScheduler.Api\project.lock.json
Restore complete, 14786ms elapsed
Restoring packages for D:\home\site\repository\src\ShiftScheduler.Data\project.json
Writing lock file D:\home\site\repository\src\ShiftScheduler.Data\project.lock.json
Restore complete, 7904ms elapsed
Restoring packages for D:\home\site\repository\src\ShiftScheduler.Models\project.json
Writing lock file D:\home\site\repository\src\ShiftScheduler.Models\project.lock.json
Restore complete, 1068ms elapsed
Restoring packages for D:\home\site\repository\src\ShiftScheduler.Web\project.json
Writing lock file D:\home\site\repository\src\ShiftScheduler.Web\project.lock.json
Restore complete, 22986ms elapsed
Restoring packages for D:\home\site\repository\test\ShiftScheduler.Tests\project.json
    GET https://api.nuget.org/v3-flatcontainer/xunit/index.json
    GET https://api.nuget.org/v3-flatcontainer/xunit.runner.dnx/index.json
    GET https://api.nuget.org/v3-flatcontainer/xunit.runner.visualstudio/index.json
    OK https://api.nuget.org/v3-flatcontainer/xunit.runner.visualstudio/index.json 1452ms
    OK https://api.nuget.org/v3-flatcontainer/xunit.runner.dnx/index.json 2098ms
    OK https://api.nuget.org/v3-flatcontainer/xunit/index.json 2371ms
Writing lock file D:\home\site\repository\test\ShiftScheduler.Tests\project.lock.json
Restore complete, 21737ms elapsed

默认情况下,dnx软件包将还原到%userprofile%.dnx \ packages%或%$ HOME / .dnx / packages%文件夹。我不确定你是否有任何改变这个但你需要检查它。或者,您还可以更新存储库的.gitignore文件以排除“packages”文件夹。完成此操作后,转到Kudu webportal“https://webappname.scm.azurewebsites.net/DebugConsole”,然后选择“Debug Console”,删除“D:\ home \ site \ repository \”中的“packages”文件夹,然后再次尝试部署。

相关问题