Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue with kpm restore when trying to run vNext sample app

So i am following the instructions here for getting started with vNext.

All goes well until i get to the step where i have to run kpm restore and i get the following output in my console window:

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.

Does anyone have a resolution for this?

like image 788
jaywayco Avatar asked May 29 '14 08:05

jaywayco


1 Answers

Taking a look at what was happening with fiddler. I could see that it was trying to restore packages from my private feed. My private feed was returning 404 pages which was causing it to fail.

The solution was to open visual studio and go to Tools > Library Package Manager > Package Manager Settings... > Package Sources. Then i had to deselect all sources except for nuget.org and add https://www.myget.org/F/aspnetvnext/ as a package source.

Once i saved this i tried again and everything worked

like image 134
jaywayco Avatar answered Nov 06 '22 18:11

jaywayco