- Home /
The type or namespace name... again
My Unity cannot see my class from dll, which comes from my own c++/cli wrapper, built on v2.0 .net(on VS2008). That project is added as reference to unity project and Visual Studio 2012 built it without any errors. Creating instance of that class, and setting some value works fine too.
When I open Unity, my project throws an error: "error CS0246: The type or namespace name `testLib' could not be found. Are you missing a using directive or an assembly reference?"
I checked .net versions inside Unity environment(2.0), lib .net build version(2.0). My wrapper has setter and getter(over a int), nothing else. I've copied dll file to plugins folder and root project.
I realize that there are similar questions, but I didn't found any correct solution for my problem. I've been struggling with this error for couple of days and I'll be grateful for any help.
UPDATE
After couple of hours checking, building, searching that problem dissapeared. Right now, when I press play, Unity can't see my dll lib I've added to c++/cli wrapper.
FileNotFoundException: Could not load file or assembly 'testLib, Version=1.0.5588.42801, Culture=neutral, PublicKeyToken=null' or one of its dependencies. ObjLoader.Start () (at Assets/ObjLoader.cs:27)
I removed from testLib.dll all dependencies, right now it's simple class with one function. It's kind of strange, because I signed that dll, and it has some publicKeyToken. Dunno why it's null here.
When I was trying to read that key, by using PowerShell's statement ([system.reflection.assembly]::loadfile("c:\MyDLL.dll")).FullName it returns the same error. Maybe it's somehow related.
yup, after 'using' keyword intelisense gives me prompt with namespace and dll. During build error came out...
and testLib is public class with public contructor if it has one?