我在 Azure 上建立了一个网站以通过 TFS 存储库进行部署。该过程在尝试安装存储在 myGet nuget 服务器而不是 nuget.org 上的 nuget 包时失败。根据此链接,我已在与我的解决方案文件相同的文件夹中添加(并签入 TFS)一个 nuget.config 文件。
我缺少什么以便 Azure 可以还原这些包?
nuget.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<activePackageSource>
<add key="All" value="(Aggregate source)" />
</activePackageSource>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="Syncfusion ASP.NET Core NuGet Package feed URL" value="http://nuget.syncfusion.com/nuget_aspnetcore/nuget/getsyncfusionpackages/aspnetcore" />
<add key="MyGet" value="https://www.myget.org/F/aspnet-contrib/api/v3/index.json" />
</packageSources>
<disabledPackageSources />
<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>
</configuration>
TFS 构建中的错误:
NuGet Config files used:
D:\a\3\Nuget\tempNuGet_59.config
Feeds used:
https://api.nuget.org/v3/index.json
Installed:
100 package(s) to D:\a\3\s\Scrubber\Scrubber.csproj
132 package(s) to D:\a\3\s\Scrubber.UnitTest\Scrubber.UnitTest.csproj
9 package(s) to D:\a\3\s\SimplerProducts.MicrosoftEntityFrameworkCoreStorage\SimplerProducts.MicrosoftEntityFrameworkCoreStorage.csproj
Done executing task "RestoreTask" -- FAILED.
1>Done building target "Restore" in project "Scrubber.UnitTest.csproj" -- FAILED.
1>Done Building Project "D:\a\3\s\Scrubber.UnitTest\Scrubber.UnitTest.csproj" (Restore target(s)) -- FAILED.
Build FAILED.
"D:\a\3\s\Scrubber.UnitTest\Scrubber.UnitTest.csproj" (Restore target) (1) ->
(Restore target) ->
D:\a\3\s\Scrubber\Scrubber.csproj : error NU1102: Unable to find package AspNet.Security.OAuth.Instagram with version (>= 2.1.0) [D:\a\3\s\Scrubber.UnitTest\Scrubber.UnitTest.csproj]
D:\a\3\s\Scrubber\Scrubber.csproj : error NU1102: - Found 11 version(s) in nuget.org [ Nearest version: 2.0.1 ] [D:\a\3\s\Scrubber.UnitTest\Scrubber.UnitTest.csproj]
D:\a\3\s\Scrubber\Scrubber.csproj : error NU1102: Unable to find package AspNet.Security.OAuth.Reddit with version (>= 2.1.0) [D:\a\3\s\Scrubber.UnitTest\Scrubber.UnitTest.csproj]
D:\a\3\s\Scrubber\Scrubber.csproj : error NU1102: - Found 13 version(s) in nuget.org [ Nearest version: 2.0.1 ] [D:\a\3\s\Scrubber.UnitTest\Scrubber.UnitTest.csproj]
D:\a\3\s\Scrubber\Scrubber.csproj : error NU1102: Unable to find package AspNet.Security.OAuth.GitHub with version (>= 2.1.0) [D:\a\3\s\Scrubber.UnitTest\Scrubber.UnitTest.csproj]
D:\a\3\s\Scrubber\Scrubber.csproj : error NU1102: - Found 14 version(s) in nuget.org [ Nearest version: 2.0.1 ] [D:\a\3\s\Scrubber.UnitTest\Scrubber.UnitTest.csproj]
D:\a\3\s\Scrubber\Scrubber.csproj : error NU1102: Unable to find package AspNet.Security.OAuth.LinkedIn with version (>= 2.1.0) [D:\a\3\s\Scrubber.UnitTest\Scrubber.UnitTest.csproj]
D:\a\3\s\Scrubber\Scrubber.csproj : error NU1102: - Found 14 version(s) in nuget.org [ Nearest version: 2.0.1 ] [D:\a\3\s\Scrubber.UnitTest\Scrubber.UnitTest.csproj]
D:\a\3\s\Scrubber.UnitTest\Scrubber.UnitTest.csproj : error NU1102: Unable to find package AspNet.Security.OAuth.Instagram with version (>= 2.1.0)
D:\a\3\s\Scrubber.UnitTest\Scrubber.UnitTest.csproj : error NU1102: - Found 11 version(s) in nuget.org [ Nearest version: 2.0.1 ]
D:\a\3\s\Scrubber.UnitTest\Scrubber.UnitTest.csproj : error NU1102: Unable to find package AspNet.Security.OAuth.Reddit with version (>= 2.1.0)
D:\a\3\s\Scrubber.UnitTest\Scrubber.UnitTest.csproj : error NU1102: - Found 13 version(s) in nuget.org [ Nearest version: 2.0.1 ]
D:\a\3\s\Scrubber.UnitTest\Scrubber.UnitTest.csproj : error NU1102: Unable to find package AspNet.Security.OAuth.GitHub with version (>= 2.1.0)
D:\a\3\s\Scrubber.UnitTest\Scrubber.UnitTest.csproj : error NU1102: - Found 14 version(s) in nuget.org [ Nearest version: 2.0.1 ]
D:\a\3\s\Scrubber.UnitTest\Scrubber.UnitTest.csproj : error NU1102: Unable to find package AspNet.Security.OAuth.LinkedIn with version (>= 2.1.0)
D:\a\3\s\Scrubber.UnitTest\Scrubber.UnitTest.csproj : error NU1102: - Found 14 version(s) in nuget.org [ Nearest version: 2.0.1 ]
0 Warning(s)
8 Error(s)