Hallo
I have a running project under .NET3.5 and VisualStudio 2015.
It uses an external dll "OSIsoft.AFSDK". Everting is fine, no issues.
THEN
I moved all dll's (I copied the files one by one from references) to the plugin folder of the Unity project and got the error below.
WHAT I tried
1. Changing plattform setting in Unity of all dll's set to x86_64 and back to "Any CPU"/"Windows"
2. Inspected the dll's with ildasm for the right version and existence of the methods.
Result -> All Methods/Functions are existing.
3. Several restarts of Unity and Windows
4. Checked all solution found with google
5. Removed the System.*.dll's (The error is the same in this case!)
WHAT I don't understand
1. What is the difference between VisualStudio and Unity? Why do they handle the dll's different?
2. When I change the System.Core.dll setting to x86 / Windows it should not be loaded. When I revert the setting it should load it. Whats wrong here?
3. Where can I reliable see what dll's are loaded and where from?
4. Why is the System.Core.dll not loaded when I put it into the Plugin folder?
Target is just Windows / x86_64
Unity 5.4.2f2 Personal
Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in :0
at Mono.CSharp.RootNamespace.ComputeNamespaces (System.Reflection.Assembly assembly, System.Type extensionType) [0x00000] in :0
at Mono.CSharp.RootNamespace.ComputeNamespace (Mono.CSharp.CompilerContext ctx, System.Type extensionType) [0x00000] in :0
at Mono.CSharp.GlobalRootNamespace.ComputeNamespaces (Mono.CSharp.CompilerContext ctx) [0x00000] in :0
at Mono.CSharp.Driver.LoadReferences () [0x00000] in :0
at Mono.CSharp.Driver.Compile () [0x00000] in :0
at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in :0
The class System.Diagnostics.Eventing.EventProvider could not be loaded, used in System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
The class OSIsoft.AF.Diagnostics.EventProviderVersionTwo could not be loaded, used in OSIsoft.AFSDK, Version=2.0.0.0, Culture=neutral, PublicKeyToken=6238be57836698e6
The class EventData could not be loaded, used in OSIsoft.AFSDK, Version=2.0.0.0, Culture=neutral, PublicKeyToken=6238be57836698e6
↧