2017-10-16 124 views
1

我們正在使用SyncFusion作爲我們解決方案的解決方案。在當地,每個軟件包都在恢復,但是在VSTS中,似乎在將兩個syncfusion軟件包與官方nuget軟件包混合時遇到一些困難。如何指定nuget的包源代碼

我貼的NuGet的整個日誌上的要點在這裏恢復:https://gist.github.com/erickgirard/844f57d0f98f0cbea13d6ad4ddbde7e0

我認爲是,每包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() 

回答

2

在我們的NuGet服務器,我們正維護着多收取基於平臺並在NuGet網站上顯示友好的供稿網址。如果您在任何瀏覽器中複製並粘貼這些友好的URL,它將重定向到實際的Feed鏈接。

型飼料網址:
http://nuget.syncfusion.com/aspnetmvc/

實際的送出網址:
http://nuget.syncfusion.com/nuget_aspnetmvc/nuget/getsyncfusionpackages/aspnetmvc/

你下面的網址給出不正確,因此它的返回500錯誤而訴諸的ASPNET MVC包。

http://nuget.syncfusion.com/aspnetmvc/FindPackagesById()?id=%27Microsoft.NET.Sdk.Functions%27

在你的情況,你必須使用的,而不是友好的URL實際進給的網址。

http://nuget.syncfusion.com/nuget_aspnetmvc/nuget/getsyncfusionpackages/aspnetmvc/FindPackagesById()?id=%27Microsoft.NET.Sdk.Functions%27

請按照下面的鏈接中給出的步驟。
https://www.syncfusion.com/kb/7609/how-to-install-syncfusion-nuget-packages-in-visual-studio-2017

感謝, 馬堂庫馬爾

+0

哦,這是很好的瞭解!有趣的是,友好的url可以作爲Visual Studio nuget設置的一部分工作。 – Erick

相關問題