我開始用VS2015社區版和ASP.NET 5.ASP.NET 5:錯誤的NuGet包類庫包
我添加了一個新的類庫(包)作爲一個新的項目到我的解決辦法玩但我無法在其中安裝NuGet軟件包。恢復後,我有一個「參考(錯誤 - 請參閱錯誤列表)」。
如果我將一個基本的Library Class(.dll)作爲新項目添加到我的解決方案中,並嘗試安裝相同的NuGet軟件包,它可以像以前一樣精美地運行。
也許,我誤解這個新的類庫包是如何工作的,我試圖濫用它......
感謝您的幫助。
---------------------------------------------- ----------------編輯1 -------------------------------- --------------------------- Project.json:該情況下的警告標誌位於EF包裝上:
{
"version": "1.0.0-*",
"description": "testFinal Class Library",
"authors": [ "SylvainC" ],
"tags": [ "" ],
"projectUrl": "",
"licenseUrl": "",
"dependencies": {
"System.Collections": "4.0.10-beta-23019",
"System.Linq": "4.0.0-beta-23019",
"System.Threading": "4.0.10-beta-23019",
"System.Runtime": "4.0.10-beta-23019",
"Microsoft.CSharp": "4.0.0-beta-23019",
"EntityFramework": "6.1.3"
},
"frameworks": {
"dotnet": { }
}
}
----------------------------------------------- -----編輯1之二後更新至beta8 --------------------------
{
"version": "1.0.0-*",
"description": "ClassLibrary5 Class Library",
"authors": [ "SylvainC" ],
"tags": [ "" ],
"projectUrl": "",
"licenseUrl": "",
"frameworks": {
"dnx451": { }
},
"dependencies": {
"EntityFramework": "6.1.3"
}
}
----- -------------------------------------------------- -------編輯2 ----------------------------------------- ------------------
升級dnvm(dvnm升級)後,我能夠運行「dnu restore」命令但出現以下錯誤:
>dnu restore
Microsoft .NET Development Utility Clr-x86-1.0.0-beta8-15858
GET https://www.nuget.org/api/v2/
GET https://www.myget.org/F/aspnetmaster/api/v2/
Restoring packages for D:\testFinal\project.json
GET https://www.nuget.org/api/v2/FindPackagesById()?id='System.Reflection'
GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?id='System.Reflection'
GET https://www.nuget.org/api/v2/FindPackagesById()?id='System.Globalization'
GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?id='System.Globalization'
GET https://www.nuget.org/api/v2/FindPackagesById()?id='EntityFramework'
GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?id='EntityFramework'
Warning: FindPackagesById: System.Globalization
An error occurred while sending the request.
Warning: FindPackagesById: System.Globalization
An error occurred while sending the request.
Warning: FindPackagesById: System.Reflection
An error occurred while sending the request.
GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?id='System.Globalization'
GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?id='System.Reflection'
GET https://www.nuget.org/api/v2/FindPackagesById()?id='System.Globalization'
Warning: FindPackagesById: System.Reflection
An error occurred while sending the request.
GET https://www.nuget.org/api/v2/FindPackagesById()?id='System.Reflection'
Warning: FindPackagesById: EntityFramework
An error occurred while sending the request.
Warning: FindPackagesById: EntityFramework
An error occurred while sending the request.
GET https://www.nuget.org/api/v2/FindPackagesById()?id='EntityFramework'
GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?id='EntityFramework'
Warning: FindPackagesById: System.Reflection
An error occurred while sending the request.
GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?id='System.Reflection'
Warning: FindPackagesById: System.Globalization
An error occurred while sending the request.
Warning: FindPackagesById: System.Globalization
An error occurred while sending the request.
GET https://www.nuget.org/api/v2/FindPackagesById()?id='System.Globalization'
GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?id='System.Globalization'
Warning: FindPackagesById: System.Reflection
An error occurred while sending the request.
GET https://www.nuget.org/api/v2/FindPackagesById()?id='System.Reflection'
Warning: FindPackagesById: EntityFramework
An error occurred while sending the request.
GET https://www.nuget.org/api/v2/FindPackagesById()?id='EntityFramework'
Warning: FindPackagesById: EntityFramework
An error occurred while sending the request.
GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?id='EntityFramework'
Error: FindPackagesById: System.Reflection
An error occurred while sending the request.
----------
Error: FindPackagesById: System.Globalization
An error occurred while sending the request.
Error: FindPackagesById: System.Globalization
An error occurred while sending the request.
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:8888
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- End of inner exception stack trace ---
---------------------------------------------編輯3與最終誤差和飼料------------------------------
Restore failed
An error occurred while sending the request.
NuGet Config files used:
C:\Users\sylvainc\AppData\Roaming\NuGet\nuget.config
Feeds used:
https://www.nuget.org/api/v2/
https://www.myget.org/F/aspnetmaster/api/v2/
西爾
請問您可以分享一下project.json文件嗎? –
右鍵點擊引用並選擇恢復包。輸出窗口中顯示了什麼? – firste
我有同樣的問題,並通過從命令行運行''''dnu restore'''來解決它。 – ahz