我在尝试构建项目时甚至在编辑器模式下,在我导入外部dll时,我在Unity中发现了几个错误,该创建者的目标是.NET 4.x框架。我已经使用API 4.6将项目设置为.NET 4.6(实验性) (顺便说一下Unity v.2017.2.0f3)
在编辑器中有这些例外
TypeLoadException:无法解析虚方法的签名 System.RuntimeType.GetMethodsByName(System.String name, System.Reflection.BindingFlags bindingAttr,System.Boolean ignoreCase, System.RuntimeType reflectType)(at < 9c9f068c46c64ffd91fda7af157b4d15>:0) System.RuntimeType.GetMethodCandidates(System.String name, System.Reflection.BindingFlags bindingAttr, System.Reflection.CallingConventions callConv,System.Type []类型, System.Boolean allowPrefixLookup)(at < 9c9f068c46c64ffd91fda7af157b4d15>:0)System.RuntimeType.GetMethods (System.Reflection.BindingFlags bindingAttr)(at < 9c9f068c46c64ffd91fda7af157b4d15>:0) UnityEditor.EditorAssemblies.ProcessStaticMethodAttributes (System.Type类型)(at C:/buildslave/unity/build/Editor/Mono/EditorAssemblies.cs:97) UnityEditor.EditorAssemblies.ProcessInitializeOnLoadAttributes()(at C:/buildslave/unity/build/Editor/Mono/EditorAssemblies.cs:164) UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes()
和
卸载损坏的程序集资产/插件// x86_64 / .dll,此程序集可能导致运行时崩溃
但是当我尝试构建项目时,错误变得越来越具体:
ArgumentException:程序集Windows由GSdkNet引用('Assets / Plugins / GSdkNet / x86_64 / GSDKNet.dll')。但是不允许包含或无法找到dll。 UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse(System.String assemblyPath,System.Collections.Generic.List
1[T] alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary
2 [TKey,TValue] cache,UnityEditor.BuildTarget target)(在C:/ buildslave / unity / build / Editor / Mono) /AssemblyHelper.cs:152) UnityEditor.AssemblyHelper.FindAssembliesReferencedBy(System.String [] paths,System.String [] foldersToSearch,UnityEditor.BuildTarget target)(at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:192) UnityEngine.GUIUtility:ProcessEvent(Int32,IntPtr)
以及TypeLoadException。
注意:VS2017中的项目不会在引用中显示此dll。
我也安装了Windows SDK,没有结果。