Assembly reference error

Hello. I recently downloaded the latest release of Unity and am learning C Sharp. I tried running the standard ‘Hello World’ and it gave a compiler error relating to a failure to load some DLL files for the UnityEditor DLL, specifically these errors:

can’t load ICSharp Code NRefactory Version 3.2.1.6466, culture is neutral, the public key token is efe927acf176eea2

There was similar errors for unity script, the nunit framework, ‘Mono Cecil’ and the Unity engine.

I searched for discussions on this via google but nothing arose

how did you try doing hello world?

–

2 Answers

2

let’s make a debug hello world:

go to project tab right click and create new C# script dubble click it

this is what you get

using UnityEngine;
using System.Collections;

public class NewBehaviourScript : MonoBehaviour {

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}
}

now modify it: don’t delete anything just add the debug

	void Update () {
	    Debug.Log("Hello World");
	}

now attach this script to main camera in Hierarchy

and run the project you’ll see Hello World in Console tab

Hello World
UnityEngine.Debug:Log(Object)
NewBehaviourScript:Update() (at Assets/NewBehaviourScript.cs:13)

Both the debug method and the WriteLine method. But it hardly matters. The issue appears to be that some files can’t be found, thus the assembly reference error saying there wasn’t a UnityEditor namespace

I don’t know if it is an error with the download but the list of DLLs shows that with an error next to it when I look under the assembly references

It won’t compile in the first place, before I try to add it to an object, and when I try to add it to an object it says it isn’t compiled correctly.