TwitchLib / TwitchLib.Unity

TwitchLib repository representing all code belonging to the implementation of TwitchLib for Unity. Maintained primarily by LuckyNoS7evin.
164 stars 33 forks source link

"Assembly 'Assets/Plugins/TwitchLib.Unity.dll' will not be loaded due to errors" #63

Open DapperNurd opened 3 years ago

DapperNurd commented 3 years ago

I get this when I try to import TwitchLib.Unity into my project. I followed the guide and placed the dll in a folder called Plugins inside of my Assets folder. The only thing I can think of that might be why is possibly my Unity version. I'm using 2020.3.12f1, and there is no "Scripting Runtime Version" in the Player settings. Instead I changed "Api Compatibility Level" to .NET 4.x instead of .NET Standard 2.0 as that seemed relatively similar. This is what I see in my project: image

TylerCode commented 3 years ago

Having the same issue with the same version of unity.

For giggles I tried manually installing the version 11 of Newtonsoft.Json into the plugins folder and that didn't make it any better. (.net standard and .Net 4.x version)

TylerCode commented 3 years ago

So going into the package manager settings (Project Settings > Package Manager) I disabled the Version Control package which depends on Newtonsoft's package so I could remove it. After the newtonsoft package was removed from the project I could take the latest dll from their github repo and use it without issue.

It might be important to note that I am using the NetStandard 2.0 version.

shizurumaya commented 2 years ago

Same problem, I am using unity 2021.2.3 and plastic scm.

I have this error when importing DLL :

Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Unable to cast object of type 'System.Boolean' to type 'System.String'. at ApiUpdater.MovedFromOptimizer.Program.ShouldUpdate(CustomAttribute movedFromAttr, TypeDefinition movedType, String& sourceNamespace, String& sourceTypeName) at ApiUpdater.MovedFromOptimizer.Program.CollectMovedFromTypeNamesFromAssembly(String assemblyPath, StreamWriter outputFile, IAPIUpdaterListener logger) at ApiUpdater.MovedFromOptimizer.Program.Main(String[] args) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at Program.Main(String[] args)