Я пытаюсь решить проблему с восстановлением пакетов nuget для веб-сайта .net core 2.0, который имеет собственный источник пакетов.
В основном при включении nuget.config любые пакеты Microsoft не устанавливаются, потому что, похоже, игнорируется моя ссылка на nuget.
Я нашел обходной путь, то есть удалить свой пользовательский nuget.config, позволить сборке завершиться неудачно, после сбоя он загрузит нужные вещи с nuget.org, а затем, добавив пользовательский файл обратно, восстановит эти Microsoft пакеты с диска, а затем связаться, чтобы получить мой собственный пакет nuget.
Моя конфигурация пакета nuget выглядит так:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="ASPNET Team" value="https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json" />
<add key="OTL" value="https://www.myget.org/F/{redacted}/api/v3/index.json" />
</packageSources>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
<bindingRedirects>
<add key="skip" value="False" />
</bindingRedirects>
<packageManagement>
<add key="format" value="0" />
<add key="disabled" value="False" />
</packageManagement>
<disabledPackageSources />
</configuration>
Ошибки от Куду:
An error occurred while sending the request.
A connection with the server could not be established
Retrying 'FindPackagesByIdAsync' for source 'https://www.myget.org/F/{redacted}/api/v3/flatcontainer/microsoft.extensions.caching.sqlserver/index.json'.
An error occurred while sending the request.
A connection with the server could not be established
Retrying 'FindPackagesByIdAsync' for source 'https://dotnetmyget.blob.core.windows.net/artifacts/aspnetcore-ci-dev/nuget/v3/flatcontainer/microsoft.extensions.hosting.abstractions/index.json'.
An error occurred while sending the request.
A connection with the server could not be established
Retrying 'FindPackagesByIdAsync' for source 'https://dotnetmyget.blob.core.windows.net/artifacts/aspnetcore-ci-dev/nuget/v3/flatcontainer/microsoft.extensions.caching.sqlserver/index.json'.
An error occurred while sending the request.
A connection with the server could not be established
Retrying 'FindPackagesByIdAsync' for source 'https://dotnetmyget.blob.core.windows.net/artifacts/aspnetcore-ci-dev/nuget/v3/flatcontainer/microsoft.entityframeworkcore.tools/index.json'.
An error occurred while sending the request.
A connection with the server could not be established
Retrying 'FindPackagesByIdAsync' for source 'https://www.myget.org/F/{redacted}/api/v3/flatcontainer/microsoft.extensions.dependencyinjection.abstractions/index.json'.
An error occurred while sending the request.
A connection with the server could not be established
Retrying 'FindPackagesByIdAsync' for source 'https://dotnetmyget.blob.core.windows.net/artifacts/aspnetcore-ci-dev/nuget/v3/flatcontainer/microsoft.extensions.dependencyinjection.abstractions/index.json'.
An error occurred while sending the request.
A connection with the server could not be established
Retrying 'FindPackagesByIdAsync' for source 'https://www.myget.org/F/{redacted}/api/v3/flatcontainer/microsoft.extensions.caching.sqlserver/index.json'.
Выполнение восстановления dotnet непосредственно из консоли Kudu дает те же результаты. Я вытащил NuGet.config со своего компьютера для разработки, который, как я знаю, успешно восстанавливает как пакеты Microsoft, так и пользовательские пакеты, и попытался использовать его, но все равно не удалось.
Я начинаю думать, что исходящий порт блокирует брандмауэр в Azure, но некоторые поиски исходящего брандмауэра или прокси-сервера в веб-приложении не принесли результатов.