Custom DLL not (quite) recognized by Unity

Hi all

Apologies for the vague title. I have an odd situation where I have added my proprietary DLLs to my Unity project and one is not usable.

My DLLs are made in Visual Studio 2013 as a Class Library. The projects have been setup for compatibility with .NET 2.0 as described here: http://fernandogamedev-en.blogspot.co.uk/2012/08/how-to-create-dll-library-to-unity3d.html

I have added the compiled DLLs to my UnityProject/Assets/Plugins directory:

alt text

I’m able to use the DataLayer DLL, however the BusinessLayer DLL does not show in autocomplete:

alt text

Now, the interesting this is if go ahead anyway I soon find that autocomplete starts working on objects contained in the DLL:

alt text

So something strange is going on with Monodevelop’s autocompletion. Unfortunately, this isn’t all. Running the following script causes errors:

using UnityEngine;
using System.Collections;
using System.Collections.Generic;

using Athgo.Services.Common.BusinessLayer;


public class AthgoLibraryTest : AthgoMonoBehaviour
{

	protected override void Awake()
	{
		base.Awake();

		NoteManager noteManager = new NoteManager();
		List<Note> notes = noteManager.GetAllNotesList();
		Debug.Log(notes.Count);
	}

}

Assets/Scripts/Test Scripts/AthgoLibraryTest.cs(17,17): error CS0246: The type or namespace name `NoteManager' could not be found. Are you missing a using directive or an assembly reference?
Assets/Scripts/Test Scripts/AthgoLibraryTest.cs(19,22): error CS0246: The type or namespace name `Note' could not be found. Are you missing a using directive or an assembly reference?

I’m really not sure how to debug this. Can anyone suggest what I may be doing wrong, or perhaps there’s a bug in Unity?

Thanks,
Ves

Try moving your DLLs to the asset folder (out of the plugins folder). The plugins folder is usually for native code libraries. “normal” managed dlls can just be placed somewhere in your project like any other script. Make sure the mono-solution is updated once the dll has been added (Sync MonoDevelop Project)