如何为nuget指定包源

如何为nuget指定包源,nuget,syncfusion,nuget-package-restore,Nuget,Syncfusion,Nuget Package Restore,我们目前正在使用SyncFusion作为我们的解决方案之一。在本地,每个包都在恢复,但在VST中,似乎很难将syncfusion包和官方nuget包混合使用 我在这里发布了nuget还原的整个日志: 我认为,对于packages.config中的每个包,它都在尝试所有源代码(是否有可能为一个包指定源代码?) 不太清楚除了在源代码管理中提交syncfusion DLL之外,还有什么解决方案 以下是解决方案的nuget.config文件: <configuration> <

我们目前正在使用SyncFusion作为我们的解决方案之一。在本地,每个包都在恢复,但在VST中,似乎很难将syncfusion包和官方nuget包混合使用

我在这里发布了nuget还原的整个日志:

我认为,对于
packages.config
中的每个包,它都在尝试所有源代码(是否有可能为一个包指定源代码?)

不太清楚除了在源代码管理中提交syncfusion DLL之外,还有什么解决方案

以下是解决方案的nuget.config文件:

<configuration>
    <solution>
        <add key="disableSourceControlIntegration" value="true" />
    </solution>
    <packageSources>
        <add key="sync fusion nuget feed" value="http://nuget.syncfusion.com/aspnetmvc" />
    </packageSources>
    <packageRestore>
        <add key="enabled" value="True" />
    </packageRestore>
</configuration>

以下是日志摘录:

[...]
2017-10-16T16:10:33.6063822Z Acquiring lock for the installation of Swashbuckle.Core 5.5.3
2017-10-16T16:10:33.6123760Z Acquired lock for the installation of Swashbuckle.Core 5.5.3
2017-10-16T16:10:33.6123760Z Installing Swashbuckle.Core 5.5.3.
2017-10-16T16:10:33.6173723Z   NotFound http://nuget.syncfusion.com/nuget_aspnetmvc/nuget/getsyncfusionpackages/aspnetmvc/Packages(Id='System.IdentityModel.Tokens.Jwt',Version='5.1.4') 97ms
2017-10-16T16:10:33.6173723Z   GET http://nuget.syncfusion.com/nuget_aspnetmvc/nuget/getsyncfusionpackages/aspnetmvc/FindPackagesById()?id='System.IdentityModel.Tokens.Jwt'
2017-10-16T16:10:33.6453473Z   NotFound http://nuget.syncfusion.com/nuget_aspnetmvc/nuget/getsyncfusionpackages/aspnetmvc/Packages(Id='Microsoft.Net.Compilers',Version='2.2.0') 562ms
2017-10-16T16:10:33.6453473Z   GET http://nuget.syncfusion.com/nuget_aspnetmvc/nuget/getsyncfusionpackages/aspnetmvc/FindPackagesById()?id='Microsoft.Net.Compilers'
2017-10-16T16:10:33.6913056Z   OK https://api.nuget.org/v3-flatcontainer/system.identitymodel.tokens.jwt/5.1.4/system.identitymodel.tokens.jwt.5.1.4.nupkg 143ms
2017-10-16T16:10:33.6913056Z Acquiring lock for the installation of System.IdentityModel.Tokens.Jwt 5.1.4
2017-10-16T16:10:33.6923050Z Acquired lock for the installation of System.IdentityModel.Tokens.Jwt 5.1.4
2017-10-16T16:10:33.6923050Z Installing System.IdentityModel.Tokens.Jwt 5.1.4.
2017-10-16T16:10:33.6923050Z   NotFound http://nuget.syncfusion.com/nuget_aspnetmvc/nuget/getsyncfusionpackages/aspnetmvc/Packages(Id='Unity.AspNet.WebApi',Version='4.0.1') 103ms
2017-10-16T16:10:33.6923050Z   GET http://nuget.syncfusion.com/nuget_aspnetmvc/nuget/getsyncfusionpackages/aspnetmvc/FindPackagesById()?id='Unity.AspNet.WebApi'
2017-10-16T16:10:33.6943020Z   OK http://nuget.syncfusion.com/nuget_aspnetmvc/nuget/getsyncfusionpackages/aspnetmvc/FindPackagesById()?id='Microsoft.Net.Compilers' 49ms
2017-10-16T16:10:33.7092888Z   OK http://nuget.syncfusion.com/nuget_aspnetmvc/nuget/getsyncfusionpackages/aspnetmvc/FindPackagesById()?id='Unity.AspNet.WebApi' 44ms
2017-10-16T16:10:33.7312690Z   OK https://api.nuget.org/v3-flatcontainer/unity.aspnet.webapi/4.0.1/unity.aspnet.webapi.4.0.1.nupkg 170ms
[...]
2017-10-16T16:10:41.1345069Z Completed installation of System.IdentityModel.Tokens.Jwt 5.1.4
2017-10-16T16:10:41.1395038Z Adding package 'System.IdentityModel.Tokens.Jwt.5.1.4' to folder 'd:\a\3\s\Projets\packages'
2017-10-16T16:10:41.1425014Z Added package 'System.IdentityModel.Tokens.Jwt.5.1.4' to folder 'd:\a\3\s\Projets\packages'
2017-10-16T16:10:41.1455002Z Added package 'System.IdentityModel.Tokens.Jwt.5.1.4' to folder 'd:\a\3\s\Projets\packages' from source 'https://api.nuget.org/v3/index.json'
2017-10-16T16:10:41.3558804Z Completed installation of Swashbuckle.Core 5.5.3
2017-10-16T16:10:41.3578871Z Completed installation of Microsoft.TeamFoundationServer.Client 15.115.0-preview
2017-10-16T16:10:41.3578871Z Adding package 'Microsoft.TeamFoundationServer.Client.15.115.0-preview' to folder 'd:\a\3\s\Projets\packages'
2017-10-16T16:10:41.3588793Z Adding package 'Swashbuckle.Core.5.5.3' to folder 'd:\a\3\s\Projets\packages'
2017-10-16T16:10:41.4116910Z Added package 'Swashbuckle.Core.5.5.3' to folder 'd:\a\3\s\Projets\packages'
2017-10-16T16:10:41.4116910Z Added package 'Swashbuckle.Core.5.5.3' to folder 'd:\a\3\s\Projets\packages' from source 'https://api.nuget.org/v3/index.json'
2017-10-16T16:10:41.4116910Z Added package 'Swashbuckle.Core.5.5.3' to folder 'd:\a\3\s\Projets\packages'
2017-10-16T16:10:41.4116910Z Added package 'Swashbuckle.Core.5.5.3' to folder 'd:\a\3\s\Projets\packages' from source 'https://api.nuget.org/v3/index.json'
[...]
2017-10-16T16:10:56.8833741Z Running restore with 2 concurrent jobs.
2017-10-16T16:10:56.8853733Z Reading project file d:\a\3\s\Projets\DobermanHub.GFI.Functions\DobermanHub.GFI.Functions.csproj.
2017-10-16T16:10:56.9003673Z Restoring packages for d:\a\3\s\Projets\DobermanHub.GFI.Functions\DobermanHub.GFI.Functions.csproj...
2017-10-16T16:10:56.9153620Z Restoring packages for .NETFramework,Version=v4.6.1...
2017-10-16T16:10:57.0043336Z   GET http://nuget.syncfusion.com/aspnetmvc/FindPackagesById()?id='Microsoft.NET.Sdk.Functions'
2017-10-16T16:10:57.0203252Z   GET https://api.nuget.org/v3-flatcontainer/microsoft.net.sdk.functions/index.json
2017-10-16T16:10:57.0992975Z   OK https://api.nuget.org/v3-flatcontainer/microsoft.net.sdk.functions/index.json 85ms
2017-10-16T16:10:57.1122942Z   InternalServerError http://nuget.syncfusion.com/aspnetmvc/FindPackagesById()?id='Microsoft.NET.Sdk.Functions' 111ms
2017-10-16T16:10:57.1162923Z Retrying 'FindPackagesByIdAsyncCore' for source 'http://nuget.syncfusion.com/aspnetmvc/FindPackagesById()?id='Microsoft.NET.Sdk.Functions''.
2017-10-16T16:10:57.1162923Z Response status code does not indicate success: 500 (Internal Server Error).
2017-10-16T16:10:57.1162923Z   GET http://nuget.syncfusion.com/aspnetmvc/FindPackagesById()?id='Microsoft.NET.Sdk.Functions'
2017-10-16T16:10:57.1332855Z   GET https://api.nuget.org/v3-flatcontainer/microsoft.net.sdk.functions/1.0.2/microsoft.net.sdk.functions.1.0.2.nupkg
2017-10-16T16:10:57.1442827Z   OK https://api.nuget.org/v3-flatcontainer/microsoft.net.sdk.functions/1.0.2/microsoft.net.sdk.functions.1.0.2.nupkg 10ms
2017-10-16T16:10:57.1762708Z   InternalServerError http://nuget.syncfusion.com/aspnetmvc/FindPackagesById()?id='Microsoft.NET.Sdk.Functions' 59ms
2017-10-16T16:10:57.1762708Z Retrying 'FindPackagesByIdAsyncCore' for source 'http://nuget.syncfusion.com/aspnetmvc/FindPackagesById()?id='Microsoft.NET.Sdk.Functions''.
2017-10-16T16:10:57.1762708Z Response status code does not indicate success: 500 (Internal Server Error).
2017-10-16T16:10:57.1762708Z   GET http://nuget.syncfusion.com/aspnetmvc/FindPackagesById()?id='Microsoft.NET.Sdk.Functions'
2017-10-16T16:10:57.3411621Z   InternalServerError http://nuget.syncfusion.com/aspnetmvc/FindPackagesById()?id='Microsoft.NET.Sdk.Functions' 165ms
2017-10-16T16:10:59.6996347Z System.AggregateException: One or more errors occurred. ---> NuGet.Protocol.Core.Types.FatalProtocolException: Failed to retrieve information about 'Microsoft.NET.Sdk.Functions' from remote source 'http://nuget.syncfusion.com/aspnetmvc/FindPackagesById()?id='Microsoft.NET.Sdk.Functions''. ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 500 (Internal Server Error).
2017-10-16T16:10:59.6996347Z    at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
2017-10-16T16:10:59.6996347Z    at NuGet.Protocol.HttpSource.<>c__DisplayClass12_0`1.<<GetAsync>b__0>d.MoveNext()
2017-10-16T16:10:59.6996347Z --- End of stack trace from previous location where exception was thrown ---
2017-10-16T16:10:59.7006128Z    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2017-10-16T16:10:59.7006128Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2017-10-16T16:10:59.7006128Z    at NuGet.Common.ConcurrencyUtilities.<ExecuteWithFileLockedAsync>d__2`1.MoveNext()
[…]
2017-10-16T16:10:33.6063822Z斜扣安装用获取锁芯5.5.3
2017-10-16T16:10:33.6123760Z已获得用于安装斜扣的锁。核心5.5.3
2017-10-16T16:10:33.6123760Z安装斜楔。核心5.5.3。
2017-10-16T16:10:33.6173723Z未找到http://nuget.syncfusion.com/nuget_aspnetmvc/nuget/getsyncfusionpackages/aspnetmvc/Packages(Id='System.IdentityModel.Tokens.Jwt',Version='5.1.4')97ms
2017-10-16T16:10:33.6173723Z获取http://nuget.syncfusion.com/nuget_aspnetmvc/nuget/getsyncfusionpackages/aspnetmvc/FindPackagesById()?id='System.IdentityModel.Tokens.Jwt'
2017-10-16T16:10:33.6453473Z未找到http://nuget.syncfusion.com/nuget_aspnetmvc/nuget/getsyncfusionpackages/aspnetmvc/Packages(Id='Microsoft.Net.Compilers',Version='2.2.0')562ms
2017-10-16T16:10:33.6453473Z获取http://nuget.syncfusion.com/nuget_aspnetmvc/nuget/getsyncfusionpackages/aspnetmvc/FindPackagesById()?id='Microsoft.Net.Compilers'
2017-10-16T16:10:33.6913056Z正常https://api.nuget.org/v3-flatcontainer/system.identitymodel.tokens.jwt/5.1.4/system.identitymodel.tokens.jwt.5.1.4.nupkg 143ms
2017-10-16T16:10:33.6913056Z用于安装System.IdentityModel.Tokens.Jwt 5.1.4的获取锁
2017-10-16T16:10:33.6923050Z已获得用于安装System.IdentityModel.Tokens.Jwt 5.1.4的锁
2017-10-16T16:10:33.6923050Z安装System.IdentityModel.Tokens.Jwt 5.1.4。
2017-10-16T16:10:33.6923050Z未找到http://nuget.syncfusion.com/nuget_aspnetmvc/nuget/getsyncfusionpackages/aspnetmvc/Packages(Id='Unity.AspNet.WebApi',Version='4.0.1')103ms
2017-10-16T16:10:33.6923050Z获取http://nuget.syncfusion.com/nuget_aspnetmvc/nuget/getsyncfusionpackages/aspnetmvc/FindPackagesById()?id='Unity.AspNet.WebApi'
2017-10-16T16:10:33.6943020Z正常http://nuget.syncfusion.com/nuget_aspnetmvc/nuget/getsyncfusionpackages/aspnetmvc/FindPackagesById()?id='Microsoft.Net.Compilers'49ms
2017-10-16T16:10:33.7092888Z正常http://nuget.syncfusion.com/nuget_aspnetmvc/nuget/getsyncfusionpackages/aspnetmvc/FindPackagesById()?id='Unity.AspNet.WebApi'44ms
2017-10-16T16:10:33.7312690Z正常https://api.nuget.org/v3-flatcontainer/unity.aspnet.webapi/4.0.1/unity.aspnet.webapi.4.0.1.nupkg 170ms
[...]
2017-10-16T16:10:41.1345069Z已完成System.IdentityModel.Tokens.Jwt 5.1.4的安装
2017-10-16T16:10:41.1395038Z将包“System.IdentityModel.Tokens.Jwt.5.1.4”添加到文件夹“d:\a\3\s\Projets\packages”
2017-10-16T16:10:41.1425014Z将包“System.IdentityModel.Tokens.Jwt.5.1.4”添加到文件夹“d:\a\3\s\Projets\packages”
2017-10-16T16:10:41.1455002Z将包“System.IdentityModel.Tokens.Jwt.5.1.4”添加到文件夹“d:\a\3\s\Projets\packages from source”https://api.nuget.org/v3/index.json'
2017-10-16T16:10:41.3558804Z已完成斜扣的安装。核心5.5.3
2017-10-16T16:10:41.3578871Z已完成Microsoft.TeamFoundationServer.Client 15.115.0-preview的安装
2017-10-16T16:10:41.3578871Z将包“Microsoft.TeamFoundationServer.Client.15.115.0-preview”添加到文件夹“d:\a\3\s\Projets\packages”
2017-10-16T16:10:41.3588793Z将文件包“Swashback.Core.5.5.3”添加到文件夹“d:\a\3\s\Projets\packages”
2017-10-16T16:10:41.4116910Z将文件包“Swashback.Core.5.5.3”添加到文件夹“d:\a\3\s\Projets\packages”
2017-10-16T16:10:41.4116910Z将文件包“Swashback.Core.5.5.3”添加到文件夹“d:\a\3\s\Projets\packages from source”https://api.nuget.org/v3/index.json'
2017-10-16T16:10:41.4116910Z将文件包“Swashback.Core.5.5.3”添加到文件夹“d:\a\3\s\Projets\packages”
2017-10-16T16:10:41.4116910Z将文件包“Swashback.Core.5.5.3”添加到文件夹“d:\a\3\s\Projets\packages from source”https://api.nuget.org/v3/index.json'
[...]
2017-10-16T16:10:56.8833741Z正在使用2个并发作业运行恢复。
2017-10-16T16:10:56.8853733Z正在读取项目文件d:\a\3\s\Projets\DobermanHub.GFI.Functions\DobermanHub.GFI.Functions.csproj。
2017-10-16T16:10:56.9003673Z恢复d:\a\3\s\Projets\DobermanHub.GFI.Functions\DobermanHub.GFI.Functions.csproj的包。。。
2017-10-16T16:10:56.9153620Z正在还原.NETFramework的包,版本=v4.6.1。。。
2017-10-16T16:10:57.0043336Z获取http://nuget.syncfusion.com/aspnetmvc/FindPackagesById()?id='Microsoft.NET.Sdk.Functions'
2017-10-16T16:10:57.0203252Z获得https://api.nuget.org/v3-flatcontainer/microsoft.net.sdk.functions/index.json
2017-10-16T16:10:57.0992975Z正常https://api.nuget.org/v3-flatcontainer/microsoft.net.sdk.functions/index.json 85毫秒
2017-10-16T16:10:57.1122942Z内部服务器错误http://nuget.syncfusion.com/aspnetmvc/FindPackagesById()?id='Microsoft.NET.Sdk.Functions'111ms
2017-10-16T16:10:57.1162923Z为源重试“FindPackagesByIdAsyncCore”http://nuget.syncfusion.com/aspnetmvc/FindPackagesById()?id='Microsoft.NET.Sdk.Functions'。
2017-10-16T16:10:57.1162923Z响应状态代码不表示成功:500(内部服务器错误)。
2017-10-16T16:10:57.1162923Z获得http://nuget.syncfusion.com/aspnetmvc/FindPackagesById()?id='Microsoft.NET.Sdk.Functions'
2017-10-16T16:10:57.1332855Z获取https://api.nuget.org/v3-flatcontainer/microsoft.net.sdk.functions/1.0.2/microsoft.net.sdk.functions.1.0.2.nupkg
2017-10-16T16:10:57.1442827Z