Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't use .NET's JavaScriptSerializer in Unity and MonoDevelop on MacOS
    primarykey
    data
    text
    <p>I'm trying to use .NET's <code>System.Web.Script.Serialization.JavaScriptSerializer</code> to read a JSON file into a Dictionary in Unity with MonoDevelop on MacOS.</p> <p>So far I've added the <code>System.Web.Extensions</code> assembly to MonoDevelop which makes it build the "Assembly-CSharp" project fine.</p> <p>But when I go back to Unity, it still shows the error: <em>error CS0234: The type or namespace name `Web' does not exist in the namespace `System'. Are you missing an assembly reference?</em></p> <p>Then I read on the web that adding the DLL anywhere into the assets folder would do, so I found some versions of the file <code>System.Web.Extensions.dll</code> inside MonoDevelop's path, they are in: <code>/Applications/Unity/MonoDevelop.app/Contents/Frameworks/Mono.framework/Versions/2.10.2/lib/mono/gac/System.Web.Extensions</code></p> <p>There are 3 folders with different versions of the file: <code>1.0.61025.0__31bf3856ad364e35</code>, <code>3.5.0.0__31bf3856ad364e35</code> and <code>4.0.0.0__31bf3856ad364e35</code></p> <p>Tried all of them, but none works, Unity gives this error: </p> <pre><code>Internal compiler error. See the console log for more information. output was: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. File name: 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at (wrapper managed-to-native) System.Reflection.Assembly:InternalGetType (System.Reflection.Module,string,bool,bool) at System.Reflection.Assembly.GetType (System.String name, Boolean throwOnError, Boolean ignoreCase) [0x00000] in &lt;filename unknown&gt;:0 at System.Reflection.Assembly.GetType (System.String name) [0x00000] in &lt;filename unknown&gt;:0 at Mono.CSharp.RootNamespace.GetTypeInAssembly (System.Reflection.Assembly assembly, System.String name) [0x00000] in &lt;filename unknown&gt;:0 at Mono.CSharp.RootNamespace.LookupTypeReflection (Mono.CSharp.CompilerContext ctx, System.String name, Location loc, Boolean must_be_unique) [0x00000] in &lt;filename unknown&gt;:0 at Mono.CSharp.GlobalRootNamespace.LookupTypeReflection (Mono.CSharp.CompilerContext ctx, System.String name, Location loc, Boolean must_be_unique) [0x00000] in &lt;filename unknown&gt;:0 at Mono.CSharp.Namespace.LookupType (Mono.CSharp.CompilerContext ctx, System.String name, Location loc) [0x00000] in &lt;filename unknown&gt;:0 at Mono.CSharp.Namespace.Lookup (Mono.CSharp.CompilerContext ctx, System.String name, Location loc) [0x00000] in &lt;filename unknown&gt;:0 at Mono.CSharp.TypeManager.CoreLookupType (Mono.CSharp.CompilerContext ctx, System.String ns_name, System.String name, Kind type_kind, Boolean required) [0x00000] in &lt;filename unknown&gt;:0 at Mono.CSharp.TypeManager.InitCoreTypes (Mono.CSharp.CompilerContext ctx) [0x00000] in &lt;filename unknown&gt;:0 at Mono.CSharp.Driver.Compile () [0x00000] in &lt;filename unknown&gt;:0 at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in &lt;filename unknown&gt;:0 </code></pre> <p>So, what now?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload