Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by simoncw · Sep 24, 2017 at 05:02 PM · dllplugins

TypeLoadException: Could not load type from assembly

I create a plugin and import the dll reference to my project. When execute it, it has the following error:

TypeLoadException: Could not load type 'HOH_SQLite.HOH_SQLiteConnection' from assembly 'HOH_SQLite, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

My library targets at .NET 2.0 ( also tried 3.5 but nothing helped ). Can anyone help? ;(

UPDATE

I wrote a rough program testing my dll, it also throws an error but more specific : System.Data.SQLite not found

I suspect it is the cause of TypeLoadException, any ways that I can embed my System.Data.SQLite.dll into HOH_SQLite.dll?

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image simoncw · Sep 25, 2017 at 11:20 AM 0
Share

Anyone help? ;( importing a dll is such a hardness in Unity?

avatar image qaz0778899 · Oct 24, 2017 at 04:53 PM 0
Share

I got a similar problem. TypeLoadException: Count not load type 'System.data.Oledb.OledbConnection' from assembly ‘System.Data, Version=2.0.0.0, Cultrue=neutral, Public$$anonymous$$eyToken=b77a5c561934e089’ . Looking for help.

avatar image pako · Oct 24, 2017 at 05:14 PM 1
Share

So, you have followed all the guidelines in the manual, and it's not working for you?

https://docs.unity3d.com/$$anonymous$$anual/UsingDLL.html

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Bunny83 · Oct 24, 2017 at 09:48 PM

You need all dependencies that aren't already part of the Mono core / Unity engine inside your project. So have you copied the "System.Data.SQLite.dll" into your project? Unity does not rely on any external framework like .NET. Everything need to be inside the project itself.

Keep in mind that if you use assemblies which have native DLL dependencies you might not be able to use those at all depending on your target platform.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Hefaistus · Aug 25, 2018 at 07:47 PM 0
Share

For anyone co$$anonymous$$g in from Google (like me): check your NuGet dependencies. I had a self-made library that copied automatically to my Unity project, but didn't copy NuGet DLLs. This is what caused the error whenever I tried to instantiate a class from the self-made library.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

72 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How do I include added dll's to a android apk build? 1 Answer

How to add a custom module to Unity? 0 Answers

XInputDotNetPure plugin: Namespace could not be found. 1 Answer

Mono and missing types using external library 2 Answers

Error loading a 3.0 framework dll (WFC) 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges