richardbiely / Voxelmetric

An efficient voxel framework for Unity3d

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with clean import

jaspercayne opened this issue · comments

When importing the repo to a brand new Unity project, there is an error with Json.Net and Linq.

Unhandled Exception: System.TypeLoadException: Could not load type 'Newtonsoft.Json.Linq.JContainer' from assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'.

  at (wrapper managed-to-native) System.Reflection.MonoMethodInfo:get_method_info (intptr,System.Reflection.MonoMethodInfo&)

  at System.Reflection.MonoMethodInfo.GetMethodInfo (IntPtr handle) [0x00000] in <filename unknown>:0 

  at System.Reflection.MonoMethodInfo.GetAttributes (IntPtr handle) [0x00000] in <filename unknown>:0 

  at System.Reflection.MonoMethod.get_Attributes () [0x00000] in <filename unknown>:0 

  at System.Reflection.MethodBase.get_IsVirtual () [0x00000] in <filename unknown>:0 

  at Mono.CSharp.MemberCache.AddMethods (BindingFlags bf, System.Type type) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.MemberCache.AddMethods (System.Type type) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.MemberCache..ctor (IMemberContainer container) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.TypeHandle..ctor (System.Type type) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.TypeHandle.GetTypeHandle (System.Type t) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.TypeHandle.GetMemberCache (System.Type t) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.TypeManager.LookupMemberCache (System.Type t) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.TypeHandle..ctor (System.Type type) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.TypeHandle.GetTypeHandle (System.Type t) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.TypeHandle.GetMemberCache (System.Type t) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.TypeManager.LookupMemberCache (System.Type t) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.TypeHandle..ctor (System.Type type) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.TypeHandle.GetTypeHandle (System.Type t) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.TypeHandle.GetMemberCache (System.Type t) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.TypeManager.MemberLookup_FindMembers (System.Type t, MemberTypes mt, BindingFlags bf, System.String name, System.Boolean& used_cache) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.TypeManager.RealMemberLookup (System.Type invocation_type, System.Type qualifier_type, System.Type queried_type, MemberTypes mt, BindingFlags original_bf, System.String name, IList almost_match) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.TypeManager.MemberLookup (System.Type invocation_type, System.Type qualifier_type, System.Type queried_type, MemberTypes mt, BindingFlags original_bf, System.String name, IList almost_match) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.IndexerAccess+Indexers.GetIndexersForTypeOrInterface (System.Type caller_type, System.Type lookup_type) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.IndexerAccess+Indexers.GetIndexersForType (System.Type caller_type, System.Type lookup_type) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.IndexerAccess.ResolveAccessor (Mono.CSharp.ResolveContext ec, Mono.CSharp.Expression right_side) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.IndexerAccess.DoResolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec, ResolveFlags flags) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.ElementAccess.DoResolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec, ResolveFlags flags) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.MemberAccess.DoResolve (Mono.CSharp.ResolveContext ec, Mono.CSharp.Expression right_side) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.MemberAccess.DoResolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec, ResolveFlags flags) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.Invocation.DoResolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec, ResolveFlags flags) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.Argument.Resolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.Arguments.Resolve (Mono.CSharp.ResolveContext ec, System.Boolean& dynamic) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.Invocation.DoResolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec, ResolveFlags flags) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.Assign.DoResolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.SimpleAssign.DoResolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec, ResolveFlags flags) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.ExpressionStatement.ResolveStatement (Mono.CSharp.BlockContext ec) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.StatementExpression.Resolve (Mono.CSharp.BlockContext ec) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.For.Resolve (Mono.CSharp.BlockContext ec) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.Block.Resolve (Mono.CSharp.BlockContext ec) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.Block.Resolve (Mono.CSharp.BlockContext ec) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.Block.Resolve (Mono.CSharp.BlockContext ec) [0x00000] in <filename unknown>:0 

  at Mono.CSharp.ToplevelBlock.Resolve (Mono.CSharp.FlowBranching parent, Mono.CSharp.BlockContext rc, Mono.CSharp.ParametersCompiled ip, IMethodData md) [0x00000] in <filename unknown>:0 

Internal compiler error at Assets/Voxelmetric/Code/Configurable/Blocks/Configs/CubeBlockConfig.cs(10,26):: exception caught while emitting MethodBuilder [CubeBlockConfig::SetUp]
The class System.ComponentModel.AddingNewEventHandler could not be loaded, used in System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
The class Newtonsoft.Json.Linq.JContainer could not be loaded, used in Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed

No changes have been made to anything, this is the result of just dropping the contents of the Assets folder and to my project's Assets folder, as well as copying the Editor folder. I cannot seem to find the Newtonsoft dll anywhere however. Is this just a matter of downloading it and placing it in the assets folder, or have I missed something?

Well, given you're the only one so far having these issue, I think you must be doing something wrong :)
The only thing that needs to be done on your part is downloading a clean repo and opening the project in Unity3D.

You can find the dll in: VoxeUnity\Assets\Voxelmetric\Code\Utilities\json.net\Net20

I haven't had a chance to check it out yet on my end, but would you be able
to tell me which version of JSON.net you used? Visual studio is picking up
on v7 and v9. The error looks like it wants v7, but I wasn't sure if maybe
it should be v9 and I somehow got v7 mixed in. Like I said previously
though, this was a clean project that I started with, and a fresh download
of the repo, so I've got no idea why it would have a compile error right
away.

On Sun, Jul 31, 2016, 3:10 AM Richard Biely notifications@github.com
wrote:

Well, given you're the only one so far having these issue, I think you
must be doing something wrong :)
The only thing that needs to be done on your part is downloading a clean
repo and opening the project in Unity3D.

You can find the dll in: VoxeUnity\Assets\Voxelmetric\Code\Utilities
json.net\Net20


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#28 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGHiBYRUFU28TeGDSG3SdK-DwtxsOhW7ks5qbEpJgaJpZM4JY-RH
.

It's the very same dll the old Voxelmetric uses. It's never been touched. Version 7.

I never got anything beyond alpha 1 from Voxelmetric to run on my machine.
If I recall I had the same DLL problem on alpha 2/3 and never got it
running properly. Since nobody else seems to have reported the original
issue I guess I'm on my own trying to get this working

On Sun, Jul 31, 2016, 10:24 AM Richard Biely notifications@github.com
wrote:

It's the very same dll old Voxelmetric uses. It's never been touched.
Version 7.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#28 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGHiBVw5429ElzlYLTmneB8GzaBo7sVPks5qbLA6gaJpZM4JY-RH
.

To anyone that has this same issue, I solved it by going to Edit>Project Settings>Player, then going to other settings and under Optimization change API compatibility level to .NET 2.0 instead of the subset option.