aspnet / MusicStore

[Archived] MusicStore test application that uses ASP.NET/EF Core. Project moved to https://github.com/aspnet/AspNetCore
1.3k stars 878 forks source link

Restore failed Illegal character '/' (Unicode hexadecimal 002F). #497

Closed cheers00 closed 9 years ago

cheers00 commented 9 years ago

I got the latest MusicStrore and I am having tough time to build the solution with VS 2015 RC. Nuget packages are not restored and I get the following error message when I tried to restore packages for MusicStore project (dnu restore).

Wondering if I am missing something.

C:\temp\MusicStore\src\MusicStore\project.json(10,73): Error: Microsoft.Framework.Runtime.FileFormatException: Illegal character '/' (Unicode hexadecimal 002F). ---> Microsoft.Framework.Runtime.Json.JsonDeserializerException: Illegal character '/' (Unicode hexadecimal 002F).
   at Microsoft.Framework.Runtime.Json.JsonBuffer.Read()
   at Microsoft.Framework.Runtime.Json.JsonDeserializer.DeserializeArray(JsonToken head, JsonBuffer buffer)
   at Microsoft.Framework.Runtime.Json.JsonDeserializer.DeserializeInternal(JsonToken next, JsonBuffer buffer)
   at Microsoft.Framework.Runtime.Json.JsonDeserializer.DeserializeObject(JsonToken head, JsonBuffer buffer)
   at Microsoft.Framework.Runtime.Json.JsonDeserializer.DeserializeInternal(JsonToken next, JsonBuffer buffer)
   at Microsoft.Framework.Runtime.Json.JsonDeserializer.Deserialize(TextReader reader)
   at Microsoft.Framework.Runtime.Project.GetProjectFromStream(Stream stream, String projectName, String projectPath, ICollection`1 diagnostics)
   at Microsoft.Framework.Runtime.Project.TryGetProject(String path, Project& project, ICollection`1 diagnostics)
   --- End of inner exception stack trace ---
   at Microsoft.Framework.Runtime.Project.TryGetProject(String path, Project& project, ICollection`1 diagnostics)
   at Microsoft.Framework.PackageManager.RestoreCommand.<RestoreForProject>d__77.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.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Framework.PackageManager.RestoreCommand.<>c__DisplayClass76_0.<<Execute>b__1>d.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.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Framework.PackageManager.RestoreCommand.<Execute>d__76.MoveNext()
----------
Restore failed
Illegal character '/' (Unicode hexadecimal 002F).

I also tried build.cmd and it's timing out.

my dnvm list is below

Active Version           Runtime Architecture Location                        Alias
------ -------           ------- ------------ --------                        -----
       1.0.0-beta4       clr     x64          C:\Users\svyalach\.dnx\runtimes
       1.0.0-beta4       clr     x86          C:\Users\svyalach\.dnx\runtimes
       1.0.0-beta4       coreclr x64          C:\Users\svyalach\.dnx\runtimes
       1.0.0-beta4       coreclr x86          C:\Users\svyalach\.dnx\runtimes
       1.0.0-beta4-11566 clr     x86          C:\Users\svyalach\.dnx\runtimes
       1.0.0-beta4-11566 coreclr x64          C:\Users\svyalach\.dnx\runtimes
       1.0.0-beta4-11566 coreclr x86          C:\Users\svyalach\.dnx\runtimes x64
       1.0.0-beta5-11781 clr     x86          C:\Users\svyalach\.dnx\runtimes
       1.0.0-beta5-11911 clr     x86          C:\Users\svyalach\.dnx\runtimes
       1.0.0-beta5-11911 coreclr x64          C:\Users\svyalach\.dnx\runtimes
       1.0.0-beta5-11911 coreclr x86          C:\Users\svyalach\.dnx\runtimes
  *    1.0.0-beta6-11944 clr     x86          C:\Users\svyalach\.dnx\runtimes
       1.0.0-beta6-11944 coreclr x64          C:\Users\svyalach\.dnx\runtimes default
       1.0.0-beta6-11944 coreclr x86          C:\Users\svyalach\.dnx\runtimes
       1.0.0-dev         clr     x86          C:\Users\svyalach\.dnx\runtimes clr-win-x86-dev
       1.0.0-dev         coreclr x86          C:\Users\svyalach\.dnx\runtimes coreclr-win-x86-dev
       1.0.0-dev         mono                 C:\Users\svyalach\.dnx\runtimes mono-dev
bjjzqd commented 9 years ago

I am seeing the same issue.

cheers00 commented 9 years ago

Didn't do anything but today, I can build the solution.

But I get the same error when I deploy and run the command.

cheers00 commented 9 years ago

I get the above mentioned error when ran the command (.cmd) But when I run dnx . run, I get the following error. I am publishing this as file system.

C:\Projects\MusicStore-master\artifacts\bin\MusicStore\Release\Publish>dnx . run

System.InvalidOperationException: Unable to resolve project 'Publish' from C:\Pr
ojects\MusicStore-master\artifacts\bin\MusicStore\Release\Publish
   at Microsoft.Framework.Runtime.ApplicationHostContext..ctor(IServiceProvider
serviceProvider, String projectDirectory, String packagesDirectory, String confi
guration, FrameworkName targetFramework, ICache cache, ICacheContextAccessor cac
heContextAccessor, INamedCacheDependencyProvider namedCacheDependencyProvider, I
AssemblyLoadContextFactory loadContextFactory, Boolean skipLockFileValidation)
   at Microsoft.Framework.Runtime.DefaultHost.Initialize(DefaultHostOptions opti
ons, IServiceProvider hostServices)
   at Microsoft.Framework.Runtime.DefaultHost..ctor(DefaultHostOptions options,
IServiceProvider hostServices)
   at Microsoft.Framework.ApplicationHost.Program.Main(String[] args)
jalaz commented 9 years ago

Today I've had the error project.json(37,5): Error: Microsoft.Framework.Runtime.FileFormatException: Illegal character '/' when I updated to dnx beta5 and had the following comments in my project.json:

//,
//"dnxcore50": {
//  "dependencies": {
//    "System.Reflection.TypeExtensions": "4.0.0-beta-23015"
//  }
//}

it worked fine after I removed comments from the file. Hope it helps to somebody.

MiKom commented 9 years ago

It seems that somewhere between beta4 and beta5 the json parser got more strict and it doesn't allow comments in JSON files (which are not in the JSON standard)

davidfowl commented 9 years ago

Try switching to the dev branch of music store

Eilon commented 9 years ago

Indeed, comments are no longer supported in project.json files. See https://github.com/aspnet/Announcements/issues/24 for more info.

This was most likely an issue if the master branch (which is always the most recent stable build) was used with a dev build of DNX (which is always newer).