Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
DapperNurd opened this issue Jul 7, 2021 · 3 comments

Comments

@DapperNurd
Copy link

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
Copy link

TylerCode commented Jul 9, 2021

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
Copy link

TylerCode commented Jul 9, 2021

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
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants