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 TheHeftyCoder · Oct 07, 2017 at 04:48 AM · editorcrashdatabasedllexception

Npgsql dll working in Standalone Build but not in Editor

Hello. I'm currently using an Npgsql.dll which I have placed in my Plugins folder. I'm using it in two different projects. Both my projects work fine when built. The dll does its job and allows me to change my PostgreSQL database . The problem lies when I try to run the same scenes in the Editor.

For the first project, I get a MissingMethodException : Method not found : 'NpgsqlParameterCollection.AddWithValue . The weird thing is that a few lines before, sever methods from the Npgsql library have been called and they never produced an error.

For the second project, I got the same error if I use the same method. The game completely crashes though when I'm trying to read from the database.

As you can see, the problem is probably caused by the Editor being unable to access parts of the library. For anyone wondering, the import settings for the dll are at default to all platforms and it's targeting .NET 3.5. If you have any ideas on why this is caused, I'd greatly appreciate it since it's quite nerve-wracking not being able to easily check a debug.

Comment
Add comment
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

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Nicola-Patti · Oct 12, 2017 at 01:48 PM

Hello Xontros, I had the same problem as yours. I Tried almost everything to figure out what caused the issue. At the end, I found a solution but I don't know why it works (maybe someone can tell us). To fix the problem let's take the Npgsql.dll and put it into the Asset folder (so you have the file into \Asset\Npgsql.dll). In my case, I've copied even the System.Data.dll for another error (I'm trying to use Postgre DB on the Master Server Framework). Now everything works fine in my case.

Let me know if the tip resolved your problem.

Comment
Add comment · 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
0

Answer by Randy-Lee · Apr 16, 2018 at 08:41 PM

I've got a similar problem right now: Using npgsdql 2.2.3 and Unity 2017.3... When I build out a project in 32bit it runs (and also on a MAC oddly enough) but when I attempt to do anything with this DLL in the editor it causes the entire IDE to crash.

I'm assuming this is a 64bit vs 32bit thing but I don't see how since this is built in C# which should be platform independent.

Anyone have any ideas of how to get this to run?

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 Randy-Lee · Apr 16, 2018 at 08:57 PM 0
Share

just found another thing here: https://github.com/alvyxaz/barebones-masterserver/issues/143 that talks about this as a namespace problem.

I haven't built the application to see if it'll work there or not but it does work in the IDE now

avatar image
0

Answer by kalavinka13 · Jul 16, 2019 at 02:40 AM

I currently had a same problem as Nicola-Patti describes that the application requires Npgsql.dll and System.Data.dll in /Asset, and I had to add dlls by drag-and-drop from my working version of UnityEditor. For example I used 2018.2.16 and dlls were from C:\Program Files\Unity\Hub\Editor\2018.2.16f1\Editor\Data\Mono\lib\mono\2.0 . When I added dlls by "Import new Asset", or used Npgsql downloaded from web or System.Data from other similar version of Unity Editor accidentaly, more and more files were required and never worked well. I hope it might help somebody else.

Comment
Add comment · 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

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

101 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 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

MonoDevelop - Uncaught Exceptions 2 Answers

In 5.2.1f1 Editor freezes in play mode 3 Answers

Unity crashing after a few minutes 3 Answers

What does the log tell me about editor crash on play? 1 Answer

Baking Realtime GI for very large worlds is crashing 0 Answers


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