所以我按照here的说明开始使用vNext。
一切顺利,直到我进入必须运行kpm restore
的步骤,并在控制台窗口中获得以下输出:
C:\GitRepo\vNext\samples\ConsoleApp>CALL "C:\Users\jconway\.kre\packages\KRE-svr
50-x86.0.1-alpha-build-0421\bin\KLR.cmd" --lib "C:\Users\jconway\.kre\packages\K
RE-svr50-x86.0.1-alpha-build-0421\bin\;C:\Users\jconway\.kre\packages\KRE-svr50-
x86.0.1-alpha-build-0421\bin\lib\Microsoft.Framework.PackageManager" "Microsoft.
Framework.PackageManager" restore
Restoring packages for C:\GitRepo\vNext\samples\ConsoleApp\project.json
Attempting to resolve dependency ConsoleApp >= 1.0.0
Attempting to resolve dependency System.Console >= 4.0.0.0
GET http://nuget-components.bedegaming.com:8081/FindPackagesById()?Id='System.
Console'
GET http://devgallery.bedegaming.net/api/v2/FindPackagesById()?Id='System.Cons
ole'
GET http://www.myget.org/F/aspnetwebstacknightly/FindPackagesById()?Id='System
.Console'
GET http://www.myget.org/F/nuget-mirror/FindPackagesById()?Id='System.Console'
GET https://resharper-plugins.jetbrains.com/packages/FindPackagesById()?Id='Sy
stem.Console'
GET https://www.myget.org/F/aspnetvnext/FindPackagesById()?Id='System.Console'
GET https://nuget.org/api/v2/FindPackagesById()?Id='System.Console'
Attempting to resolve dependency mscorlib >=
Attempting to resolve dependency System >=
Attempting to resolve dependency System.Core >=
Attempting to resolve dependency Microsoft.CSharp >=
Attempting to resolve dependency ConsoleApp >= 1.0.0
Attempting to resolve dependency System.Console >= 4.0.0.0
NotFound http://nuget-components.bedegaming.com:8081/FindPackagesById()?Id='Sy
stem.Console' 92ms
OK http://devgallery.bedegaming.net/api/v2/FindPackagesById()?Id='System.Conso
le' 72ms
Warning: FindPackagesById: System.Console
'=' is an unexpected token. The expected token is ';'. Line 1, position 252.
GET http://devgallery.bedegaming.net/api/v2/FindPackagesById()?Id='System.Cons
ole'
OK http://devgallery.bedegaming.net/api/v2/FindPackagesById()?Id='System.Conso
le' 45ms
Warning: FindPackagesById: System.Console
'=' is an unexpected token. The expected token is ';'. Line 1, position 252.
GET http://devgallery.bedegaming.net/api/v2/FindPackagesById()?Id='System.Cons
ole'
OK http://devgallery.bedegaming.net/api/v2/FindPackagesById()?Id='System.Conso
le' 42ms
Error: FindPackagesById: System.Console
'=' is an unexpected token. The expected token is ';'. Line 1, position 252.
NotFound https://resharper-plugins.jetbrains.com/packages/FindPackagesById()?I
d='System.Console' 205ms
Warning: FindPackagesById: System.Console
Reference to undeclared entity 'copy'. Line 128, position 13.
GET https://resharper-plugins.jetbrains.com/packages/FindPackagesById()?Id='Sy
stem.Console'
NotFound https://resharper-plugins.jetbrains.com/packages/FindPackagesById()?I
d='System.Console' 331ms
Warning: FindPackagesById: System.Console
Reference to undeclared entity 'copy'. Line 128, position 13.
GET https://resharper-plugins.jetbrains.com/packages/FindPackagesById()?Id='Sy
stem.Console'
OK https://nuget.org/api/v2/FindPackagesById()?Id='System.Console' 714ms
NotFound https://resharper-plugins.jetbrains.com/packages/FindPackagesById()?I
d='System.Console' 285ms
Error: FindPackagesById: System.Console
Reference to undeclared entity 'copy'. Line 128, position 13.
OK http://www.myget.org/F/nuget-mirror/FindPackagesById()?Id='System.Console'
983ms
OK http://www.myget.org/F/aspnetwebstacknightly/FindPackagesById()?Id='System.
Console' 1424ms
OK https://www.myget.org/F/aspnetvnext/FindPackagesById()?Id='System.Console'
2498ms
----------
System.AggregateException: One or more errors occurred. ---> System.Xml.XmlExcep
tion: '=' is an unexpected token. The expected token is ';'. Line 1, position 25
2.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at System.Xml.XmlTextReaderImpl.ThrowUnexpectedToken(String expectedToken1, S
tring expectedToken2)
at System.Xml.XmlTextReaderImpl.ThrowUnexpectedToken(Int32 pos, String expect
edToken1, String expectedToken2)
at System.Xml.XmlTextReaderImpl.HandleEntityReference(Boolean isInAttributeVa
lue, EntityExpandType expandType, Int32& charRefEndPos)
at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char qu
oteChar, NodeData attr)
at System.Xml.XmlTextReaderImpl.ParseAttributes()
at System.Xml.XmlTextReaderImpl.ParseElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XDocument.Load(Stream stream, LoadOptions options)
at System.Xml.Linq.XDocument.Load(Stream stream)
at Microsoft.Framework.PackageManager.Restore.NuGet.PackageFeed.<_FindPackage
sByIdAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Framework.PackageManager.RemoteWalkProvider.<FindLibraryBySnapsh
ot>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Framework.PackageManager.RemoteWalkProvider.<FindLibraryByVersio
n>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Framework.PackageManager.RestoreOperations.<FindLibraryByVersion
>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Framework.PackageManager.RestoreOperations.<FindLibraryMatch>d__
1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Framework.PackageManager.RestoreOperations.<FindLibraryEntry>d__
1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Framework.PackageManager.RestoreOperations.<CreateGraphNode>d__1
.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Framework.PackageManager.RestoreOperations.<CreateGraphNode>d__1
.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Framework.PackageManager.RestoreCommand.<RestoreForProject>d__1.
MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceled
Exceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotifica
tion)
at System.Threading.Tasks.Task`1.get_Result()
at Microsoft.Framework.PackageManager.RestoreCommand.ExecuteCommand()
at Microsoft.Framework.PackageManager.Program.<>c__DisplayClass1.<Main>b__8()
---> (Inner Exception #0) System.Xml.XmlException: '=' is an unexpected token. T
he expected token is ';'. Line 1, position 252.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at System.Xml.XmlTextReaderImpl.ThrowUnexpectedToken(String expectedToken1, S
tring expectedToken2)
at System.Xml.XmlTextReaderImpl.ThrowUnexpectedToken(Int32 pos, String expect
edToken1, String expectedToken2)
at System.Xml.XmlTextReaderImpl.HandleEntityReference(Boolean isInAttributeVa
lue, EntityExpandType expandType, Int32& charRefEndPos)
at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char qu
oteChar, NodeData attr)
at System.Xml.XmlTextReaderImpl.ParseAttributes()
at System.Xml.XmlTextReaderImpl.ParseElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XDocument.Load(Stream stream, LoadOptions options)
at System.Xml.Linq.XDocument.Load(Stream stream)
at Microsoft.Framework.PackageManager.Restore.NuGet.PackageFeed.<_FindPackage
sByIdAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Framework.PackageManager.RemoteWalkProvider.<FindLibraryBySnapsh
ot>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Framework.PackageManager.RemoteWalkProvider.<FindLibraryByVersio
n>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Framework.PackageManager.RestoreOperations.<FindLibraryByVersion
>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Framework.PackageManager.RestoreOperations.<FindLibraryMatch>d__
1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Framework.PackageManager.RestoreOperations.<FindLibraryEntry>d__
1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Framework.PackageManager.RestoreOperations.<CreateGraphNode>d__1
.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Framework.PackageManager.RestoreOperations.<CreateGraphNode>d__1
.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Framework.PackageManager.RestoreCommand.<RestoreForProject>d__1.
MoveNext()<---
----------
Restore failed
One or more errors occurred.
有没有人对此有解决方案?
答案 0 :(得分:9)
看看小提琴手发生了什么。我可以看到它试图从我的私人订阅源恢复包。我的私人订阅源返回了404页,导致它失败。
解决方案是打开visual studio并转到Tools&gt;库包管理器&gt;包管理器设置...&gt;包装来源。然后我必须取消选择除nuget.org之外的所有来源,并添加https://www.myget.org/F/aspnetvnext/作为包源。
一旦我保存了这个,我再次尝试,一切正常