FileNotFoundException: Could not load file or assembly 'PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.
I have encounter a big problem, someone plz help me~~
I have reference a dll called CommonAP.dll into unity project.
It could play but it will show two errors :
【1】: FileNotFoundException: Could not load file or assembly 'PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. System.Reflection.MonoMethodInfo.GetMethodInfo (System.IntPtr handle) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:67) System.Reflection.MonoMethod.GetPseudoCustomAttributes () (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:405) System.MonoCustomAttrs.GetPseudoCustomAttributes (System.Reflection.ICustomAttributeProvider obj, System.Type attributeType) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/MonoCustomAttrs.cs:77) System.MonoCustomAttrs.IsDefined (System.Reflection.ICustomAttributeProvider obj, System.Type attributeType, System.Boolean inherit) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/MonoCustomAttrs.cs:320) System.Reflection.MonoMethod.IsDefined (System.Type attributeType, System.Boolean inherit) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:386) System.Attribute.IsDefined (System.Reflection.MemberInfo element, System.Type attributeType, System.Boolean inherit) (at /Users/builduser/buildslave/mono/build/mcs/class/referencesource/mscorlib/system/attribute.cs:627) System.Attribute.IsDefined (System.Reflection.MemberInfo element, System.Type attributeType) (at /Users/builduser/buildslave/mono/build/mcs/class/referencesource/mscorlib/system/attribute.cs:602) UnityEditor.EditorAssemblies.ProcessStaticMethodAttributes (System.Type type) (at C:/buildslave/unity/build/Editor/Mono/EditorAssemblies.cs:101) UnityEditor.EditorAssemblies.ProcessInitializeOnLoadAttributes () (at C:/buildslave/unity/build/Editor/Mono/EditorAssemblies.cs:164) UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes()
【2】: Unloading broken assembly Assets/Plugins/CommonAP.dll, this assembly can cause crashes in the runtime
[1]: /storage/temp/102072-2.png
I have checked that the CommonAP.dll, it's right in the Assets/Plugins folder.
And I have checked the API compatibility level is .NET 4.6
If I changed to .NET 2.0, the more errors related other dlls I have referenced errors will show:
And if I want to build for webGL, it will show two errors:
【1】: Can't verify script data layout. Uncheck 'Scripts Only Build' and try again.
【2】: UnityEditor.BuildPlayerWindow+BuildMethodException: Build failed with errors. at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x001b9] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:162 at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00050] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:83 UnityEditor.HostView:OnGUI()
I have searched and looked for answers for a while, but still cannot fix my problem..
Could anyone know how to fix it?
Thanks in advanced :)
Having same issue, a solution would be quite interesting : )
Your answer
![](https://koobas.hobune.stream/wayback/20220612135105im_/https://answers.unity.com/themes/thub/images/avi.jpg)