Skip to content
This repository was archived by the owner on Dec 18, 2017. It is now read-only.

Could not find Windows Runtime type 'Windows.Data.Json.IJsonValue'. #517

Closed
victorhurdugaci opened this issue Aug 8, 2014 · 6 comments
Closed
Assignees
Labels
Milestone

Comments

@victorhurdugaci
Copy link
Contributor

Try to run MusicStore on Win Server 2008 R2 on CoreCLR. Result:

PS D:\temp\MusicStore-release\MusicStore-release\src\MusicStore> k weblistener
Could not find Windows Runtime type 'Windows.Data.Json.IJsonValue'.
Operation is not supported on this platform.

However, the other samples (in the samples repo) work. It must be some dependency that music store has.

@Praburaj Praburaj added the bug label Aug 10, 2014
@davidfowl
Copy link
Member

@victorhurdugaci can you set KRE_TRACE=1 and paste the stack trace in here?

@victorhurdugaci
Copy link
Contributor Author

Here you go:

System.TypeLoadException: Could not find Windows Runtime type 'Windows.Data.Json.IJsonValue'. ---> System.PlatformNotSup
portedException: Operation is not supported on this platform.
   --- End of inner exception stack trace ---
   at Newtonsoft.Json.Converters.JsonValueConverter.CanConvert(Type objectType)
   at Newtonsoft.Json.JsonSerializer.GetMatchingConverter(IList`1 converters, Type objectType)
   at Newtonsoft.Json.Serialization.DefaultContractResolver.InitializeContract(JsonContract contract)
   at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateArrayContract(Type objectType)
   at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateContract(Type objectType)
   at Newtonsoft.Json.Serialization.DefaultContractResolver.ResolveContract(Type type)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean
 checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer)
   at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType)
   at Newtonsoft.Json.Linq.JToken.ToObject[T]()
   at Microsoft.Framework.Runtime.Project.GetProject(String json, String projectName, String projectPath)
   at Microsoft.Framework.Runtime.Project.TryGetProject(String path, Project& project)
   at Microsoft.Framework.Runtime.ApplicationHostContext.get_Project()
   at Microsoft.Framework.Runtime.DefaultHost.Initialize(DefaultHostOptions options, IServiceProvider hostServices)
   at Microsoft.Framework.Runtime.DefaultHost..ctor(DefaultHostOptions options, IServiceProvider hostServices)
   at Microsoft.Framework.ApplicationHost.Program.Main(String[] args)
System.PlatformNotSupportedException: Operation is not supported on this platform.

@victorhurdugaci
Copy link
Contributor Author

kpm restore has the same problem

@Tratcher
Copy link
Member

Tratcher commented Sep 2, 2014

Only the netcore45 (WinRT) target for Newtonsoft.Json has a reference to Windows.winmd. We shouldn't be using that version. I've asked @ChengTian to verify which binary KPM is using.

@davidfowl
Copy link
Member

I'm pretty sure it's using the wrong one

@glennc glennc assigned davidfowl and unassigned ChengTian Sep 3, 2014
@glennc glennc added this to the 1.0.0-alpha4 milestone Sep 3, 2014
@glennc
Copy link
Member

glennc commented Sep 3, 2014

Duplicate: #596

@glennc glennc closed this as completed Sep 9, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants