Plugin load troubleshooting

Hi everyone!

I have a problem loading plugin on Unity3d 4.0.0f7 Pro Trial.

Plugin - LoggerTemplate.dll, that is written on .NET 2.0 for platform x86, is placed into the “Plugins” folder.

Kender.dll, that is used by LoggerTemplate.dll is also the same and there.

The error text is:

System.IO.FileNotFoundException: Could not load file or assembly ‘LoggerTemplate, Version=, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The system cannot find the file specified.
File name: ‘LoggerTemplate, Version=, Culture=neutral, PublicKeyToken=null’
at (wrapper xdomain-invoke) System.AppDomain:CreateInstanceAndUnwrap (string,string)
at (wrapper remoting-invoke-with-check) System.AppDomain:CreateInstanceAndUnwrap (string,string)
at Kender.Plugin…ctor (Kender.Logger logger, System.String name, System.Type type, System.Reflection.Assembly assembly, System.String interfaceToLoad) [0x00000] in :0
KenderClient:OnNewEntry(LogEntry) (at Assets/Scripts/KenderClient.cs:46)
KenderClient:Start() (at Assets/Scripts/KenderClient.cs:23)

Plugin is loaded by the following line

this.Interface = (IPlugin)this.AppDomain.CreateInstanceAndUnwrap(assembly.FullName, type.FullName);

Actually, only Unity has problems. VisualStudio projects load plugin fine.
Player Api Compatibility Level - .NET 2.0

Please help. Thanks in advance!

Well, I solved the problem by changing “this.appDomain” to “AppDomain.CurrentDomain”. For some reason AppDomain creator class must be placed in a separate dll file.