I'm getting this error when I'm running the compiled .cs script: Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly 'TheEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
File name: 'TheEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
This is the .cs script:
using TheEngine;
public class Class1
{
void Start ()
{
TheGameObject go = new TheGameObject(); //TheGameObject is a class in TheEngine.dll
go.SetName("Hi!");
}
void Update ()
{
}
}
This is the command used to compile the script: mcs_path\mcs -target:library -out:scripts_assemblies_path\Class1.dll -lib:assemblies_path\TheEngine.dll -r:assemblies_path\TheEngine.dll script_path\Class1.cs
If I move the TheEngine.dll to the same folder as the newly created Class1.dll when I'm running the script it works but I want to have the compiled scripts in a folder and the reference .dlls in another.
Edit: Sorry I used incorrect tags and some info is missing.
I'm implementing a C# scripting system for a C++ project (Game Engine) using Mono.
I'm actually calling the compile command inside this project using System(..);
. I don't have the .cs scripts inside a C# project to compile them when compiling the project.