{"id":1149,"date":"2021-12-29T12:44:35","date_gmt":"2021-12-29T10:44:35","guid":{"rendered":"https:\/\/www.rocworks.at\/wordpress\/?p=1149"},"modified":"2022-08-01T08:31:37","modified_gmt":"2022-08-01T06:31:37","slug":"graphql-on-unity-newtonsoft-12-0-0-0-reference-error","status":"publish","type":"post","link":"https:\/\/www.rocworks.at\/wordpress\/?p=1149","title":{"rendered":"GraphQL on Unity &#038; Newtonsoft 12.0.0.0 Reference Error"},"content":{"rendered":"\n<p>The <a href=\"https:\/\/u3d.as\/2D81\">GraphQL for Unity Asset <\/a>uses the Newtonsoft version which is built in newer version of Unity (2020+). If you get an error like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Assembly 'Library\/ScriptAssemblies\/Assembly-CSharp.dll' will not be loaded due to errors: Reference has errors 'GraphQL'.\n \nAssembly 'Assets\/GraphQL\/Libs\/GraphQL.dll' will not be loaded due to errors: \n\nGraphQL references strong named Newtonsoft.Json Assembly references: 12.0.0.0 Found in project: 12.0.1.0.\n\nAssembly Version Validation can be disabled in Player Settings \"Assembly Version Validation\"<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>Then you can try to remove NewtonSoft dependency from your project &#8211; if you have a dependency. And just use the NewtonSoft version which is already built in and shipped with Unity 2020+. If you use an older version of Unity then you can try to copy the NewtonSoft DLL from 2020 and use this in your older Unity version.<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Or you can go to Project Settings -&gt; Player -&gt; Other Settings and deactivate \u201cAssembly Version Validation\u201d<\/li><li>Install the newtonsoft package from Unity. Go into the package manager and click &#8220;+&#8221; and then select &#8220;Add package from git URL&#8221; and fill in &#8220;com.unity.nuget.newtonsoft-json&#8221;.<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>The GraphQL for Unity Asset uses the Newtonsoft version which is built in newer version of Unity (2020+). If you get an error like this: Then you can try to remove NewtonSoft dependency from your project &#8211; if you have a dependency. And just use the NewtonSoft version which is already built in and shipped &hellip; <a href=\"https:\/\/www.rocworks.at\/wordpress\/?p=1149\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">GraphQL on Unity &#038; Newtonsoft 12.0.0.0 Reference Error<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[52],"tags":[48,51,49,50],"class_list":["post-1149","post","type-post","status-publish","format-standard","hentry","category-graphql","tag-graphql","tag-newtonsoft","tag-unity","tag-unity3d"],"_links":{"self":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1149","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1149"}],"version-history":[{"count":3,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1149\/revisions"}],"predecessor-version":[{"id":1164,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1149\/revisions\/1164"}],"wp:attachment":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1149"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}