I already wrote the answer to a similar question. CSharp and JS can’t see each other at compile time (different compilers are used for each language), but already compiled scripts can be seen by any language. If you place the C# script in Plugins or StandardAssets, and the JS script in another Assets folder (Assets/Scripts, for example), the C# script will be compiled in the “first wave”, thus the JS script will know it and compile ok. And in code:
var csharpcomponent:CSharpComp;
function Start(){
csharpcomponent = this.gameObject.GetComponent(CSharpComp);
}
But this is bad practice to have a project with both JS and C#. You should consider translating all scripts to one unique language. I hope that it will help you.
A common example is where a UnityScript file needs to reference a class defined in a C# file. You can achieve this by placing the C# file inside a Plugins folder and the UnityScript file in a non-special folder. If you don’t do this, you will get an error saying the C# class cannot be found.